tx · AcG73AascJjsA5136DAHZxoZQSQWdrEjBJKLc8BskNVE 3MyJoBjw9nC4uhgWULVJUaEZEL6z9As7Yfq: -0.00900000 Waves 2022.07.06 20:40 [2128140] smart account 3MyJoBjw9nC4uhgWULVJUaEZEL6z9As7Yfq > SELF 0.00000000 Waves
{ "type": 13, "id": "AcG73AascJjsA5136DAHZxoZQSQWdrEjBJKLc8BskNVE", "fee": 900000, "feeAssetId": null, "timestamp": 1657129266487, "version": 2, "chainId": 84, "sender": "3MyJoBjw9nC4uhgWULVJUaEZEL6z9As7Yfq", "senderPublicKey": "6E1saVK6whrqLsuLBQRGg6smask3XK5nkfiAWyGd3pEm", "proofs": [ "4PFKhJAZL7wquK1pL7DfmSC4UCSJ8GTL21Eq5c33EcS37VXbRwH2HDdkkcMNKxJMB1cdaMQEcyFgXDm8FGUcxRhj" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgMKAQgSAwoBCBIECgIICAAAABIAAAAADVZPVElOR19CTE9DS1MAAAAAAAAAAGQAAAAAC1ZPVEVfQ0xPU0VEAgAAAAZDTE9TRUQAAAAAC1ZPVEVfT1BFTkVEAgAAAARPUEVOAAAAAAxEWVpfQVNTRVRfSUQCAAAALEcyUGI3Q016dHBzN1hFVkdDaVV1SmtMaVMzWkNvNjlBUFFOYkpzMm56MjFqAAAAAA5NSU5fRFlaX0FNT1VOVAAAAAAABfXhAAAAAAAPc3RhdHVzS2V5UHJlZml4AgAAAAdzdGF0dXNfAAAAAA1vcGVuS2V5UHJlZml4AgAAAAVvcGVuXwAAAAAOdG90YWxZZXNTdWZmaXgCAAAACl90b3RhbF95ZXMAAAAADXRvdGFsTm9TdWZmaXgCAAAACV90b3RhbF9ubwAAAAAPcmVwYXltZW50UHJlZml4AgAAAApyZXBheW1lbnRfAQAAAAxnZXRTdGF0dXNLZXkAAAABAAAAAmlkCQABLAAAAAIFAAAAD3N0YXR1c0tleVByZWZpeAUAAAACaWQBAAAACmdldE9wZW5LZXkAAAABAAA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F5bWVudEtleQUAAAAGYW1vdW50BQAAAANuaWwDCQAAAAAAAAIFAAAABHZvdGUCAAAAAm5vBAAAAAlub1ZvdGVLZXkJAQAAAA1nZXRUb3RhbE5vS2V5AAAAAQUAAAACaWQEAAAADG5vVm90ZXNTb0ZhcgQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAAlub1ZvdGVLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAKbmV3Tm9Wb3RlcwkAAGQAAAACBQAAAAxub1ZvdGVzU29GYXIAAAAAAAAAAAEJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAACW5vVm90ZUtleQUAAAAKbmV3Tm9Wb3RlcwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAMcmVwYXltZW50S2V5BQAAAAZhbW91bnQFAAAAA25pbAUAAAADbmlsBQAAAAhuZXdFbnRyeQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5OZTMlQ==", "height": 2128140, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EYaR3BHXGddTaVa4ZKoWNBk93z8m7KUfSfkWar7NFenp Next: HoaLEY4orje8FnnPmpTcDgTgv2E6pogBrdY3KXgEEGah Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = 100 | |
5 | 5 | ||
6 | 6 | let b = "CLOSED" | |
7 | 7 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = 100 | |
5 | 5 | ||
6 | 6 | let b = "CLOSED" | |
7 | 7 | ||
8 | 8 | let c = "OPEN" | |
9 | 9 | ||
10 | 10 | let d = "G2Pb7CMztps7XEVGCiUuJkLiS3ZCo69APQNbJs2nz21j" | |
11 | 11 | ||
12 | 12 | let e = 100000000 | |
13 | 13 | ||
14 | 14 | let f = "status_" | |
15 | 15 | ||
16 | 16 | let g = "open_" | |
17 | 17 | ||
18 | 18 | let h = "_total_yes" | |
19 | 19 | ||
20 | 20 | let i = "_total_no" | |
21 | 21 | ||
22 | 22 | let j = "repayment_" | |
23 | 23 | ||
24 | 24 | func k (l) = (f + l) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func m (l) = (g + l) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func n (l) = (l + h) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func o (l) = (l + h) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func p (l) = { | |
37 | 37 | let q = k(l) | |
38 | 38 | let r = getString(this, q) | |
39 | 39 | r | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func s (l,t) = (((j + l) + "_") + toString(t)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func u (l) = { | |
47 | 47 | let v = { | |
48 | 48 | let w = getInteger(this, m(l)) | |
49 | 49 | if ($isInstanceOf(w, "Int")) | |
50 | 50 | then { | |
51 | 51 | let x = w | |
52 | 52 | x | |
53 | 53 | } | |
54 | 54 | else -1 | |
55 | 55 | } | |
56 | 56 | v | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func y (l,t) = { | |
61 | 61 | let z = s(l, t) | |
62 | 62 | let v = { | |
63 | 63 | let w = getInteger(this, z) | |
64 | 64 | if ($isInstanceOf(w, "Int")) | |
65 | 65 | then { | |
66 | 66 | let x = w | |
67 | 67 | x | |
68 | 68 | } | |
69 | 69 | else -1 | |
70 | 70 | } | |
71 | 71 | v | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | @Callable(A) | |
76 | 76 | func openVote (l) = { | |
77 | 77 | let B = m(l) | |
78 | 78 | let q = k(l) | |
79 | 79 | [StringEntry(q, c), IntegerEntry(B, height)] | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | ||
84 | 84 | @Callable(A) | |
85 | 85 | func closeVote (l) = { | |
86 | 86 | let q = k(l) | |
87 | 87 | [StringEntry(q, b)] | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | ||
92 | 92 | @Callable(A) | |
93 | 93 | func claim (l) = { | |
94 | 94 | let C = u(l) | |
95 | 95 | if ((C == -1)) | |
96 | 96 | then throw("No vote started for this id!") | |
97 | 97 | else if (((C + a) >= height)) | |
98 | 98 | then throw("You can only claim after vote ends!") | |
99 | 99 | else { | |
100 | 100 | let D = A.caller | |
101 | 101 | let E = y(l, D) | |
102 | 102 | let q = k(l) | |
103 | 103 | let z = s(l, D) | |
104 | 104 | if ((E > 0)) | |
105 | 105 | then [ScriptTransfer(D, E, toBytes(d)), StringEntry(q, b), IntegerEntry(z, 0)] | |
106 | 106 | else throw("Nothing to claim!") | |
107 | 107 | } | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(A) | |
113 | 113 | func vote (l,F) = if ((size(A.payments) != 1)) | |
114 | 114 | then throw("One payment in DZY needs to be attached") | |
115 | 115 | else { | |
116 | 116 | let G = value(A.payments[0]) | |
117 | 117 | let D = A.caller | |
118 | 118 | let H = G.amount | |
119 | 119 | if (!(isDefined(G.assetId))) | |
120 | 120 | then throw("Payment in Waves not allowed!") | |
121 | 121 | else { | |
122 | 122 | let I = toBase58String(value(G.assetId)) | |
123 | 123 | if ((I != d)) | |
124 | 124 | then throw("payment in DZY necessary!") | |
125 | 125 | else if ((H != e)) | |
126 | 126 | then throw("payment amount wrong!") | |
127 | 127 | else { | |
128 | 128 | let z = s(l, D) | |
129 | 129 | let J = p(l) | |
130 | 130 | if ((J == b)) | |
131 | 131 | then throw("vote closed!") | |
132 | 132 | else { | |
133 | 133 | let K = { | |
134 | 134 | let w = getInteger(this, m(l)) | |
135 | 135 | if ($isInstanceOf(w, "Int")) | |
136 | 136 | then { | |
137 | 137 | let x = w | |
138 | 138 | x | |
139 | 139 | } | |
140 | 140 | else 0 | |
141 | 141 | } | |
142 | 142 | if ((height > (K + a))) | |
143 | 143 | then throw("voting ended!") | |
144 | 144 | else { | |
145 | 145 | let L = if ((F == "yes")) | |
146 | 146 | then { | |
147 | 147 | let M = n(l) | |
148 | 148 | let N = { | |
149 | 149 | let w = getInteger(this, M) | |
150 | 150 | if ($isInstanceOf(w, "Int")) | |
151 | 151 | then { | |
152 | 152 | let O = w | |
153 | 153 | O | |
154 | 154 | } | |
155 | 155 | else 0 | |
156 | 156 | } | |
157 | 157 | let P = (N + 1) | |
158 | 158 | [IntegerEntry(M, P), IntegerEntry(z, H)] | |
159 | 159 | } | |
160 | 160 | else if ((F == "no")) | |
161 | 161 | then { | |
162 | 162 | let Q = o(l) | |
163 | 163 | let R = { | |
164 | 164 | let w = getInteger(this, Q) | |
165 | 165 | if ($isInstanceOf(w, "Int")) | |
166 | 166 | then { | |
167 | 167 | let O = w | |
168 | 168 | O | |
169 | 169 | } | |
170 | 170 | else 0 | |
171 | 171 | } | |
172 | 172 | let S = (R + 1) | |
173 | 173 | [IntegerEntry(Q, S), IntegerEntry(z, H)] | |
174 | 174 | } | |
175 | 175 | else nil | |
176 | 176 | L | |
177 | 177 | } | |
178 | 178 | } | |
179 | 179 | } | |
180 | 180 | } | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | @Verifier(T) | |
185 | 185 | func U () = sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey) | |
186 | 186 |
github/deemru/w8io/169f3d6 42.99 ms ◑