tx · DyeEnGvQ9VF7asVeY3wWvAuTENpD9D2JcKqepC3MopT3 3N86AryjXNvAuNs3mV9xKPTjXnAYQimiHDF: -0.01000000 Waves 2023.09.18 17:06 [2760926] smart account 3N86AryjXNvAuNs3mV9xKPTjXnAYQimiHDF > SELF 0.00000000 Waves
{ "type": 13, "id": "DyeEnGvQ9VF7asVeY3wWvAuTENpD9D2JcKqepC3MopT3", "fee": 1000000, "feeAssetId": null, "timestamp": 1695046024662, "version": 2, "chainId": 84, "sender": "3N86AryjXNvAuNs3mV9xKPTjXnAYQimiHDF", "senderPublicKey": "7Zo8C4qkZishvcPg5SUixQPySKeM49Jeui21Tih7iPr9", "proofs": [ "2Qf6BS1js7wXoMTexMMAg3EC2SVzmmJTyTMUeQhQJ3tjGjfTBSxyuFmCHnAR7J9Rm3g5unqaTpzUsozUWDueJbUd" ], "script": "base64:BgIbCAISABIDCgEBEgQKAgICEgQKAggIEgQKAgEEGAADU0VQAgJfXwAPcmVwdXRhdGlvbkFzc2V0ASBp6x+DcpBVAG0dTZ5QIAuA7CaS8wuiEOK6KQOBSERbTgAMcHJvcG9zYWxUaW1lCQBoAgkAaAIJAGgCCQBoAgDoBwA8ADwAGAADAQtwcm9wb3NhbEtleQECaWQJALkJAgkAzAgCAgFwCQDMCAIJAKQDAQUCaWQFA25pbAUDU0VQAQtzZXRQcm9wb3NhbAcCaWQHY3JlYXRvcgV0aXRsZQR0ZXh0EXRpbWVzdGFtcENyZWF0aW9uDWNvdW50Vm90ZXNGb3IRQ291bnRWb3Rlc0FnYWluc3QJAQtTdHJpbmdFbnRyeQIJAQtwcm9wb3NhbEtleQEFAmlkCQC5CQIJAMwIAgkA3AQBCAUHY3JlYXRvcgVieXRlcwkAzAgCBQV0aXRsZQkAzAgCBQR0ZXh0CQDMCAIJAKQDAQURdGltZXN0YW1wQ3JlYXRpb24JAMwIAgkApAMBBQ1jb3VudFZvdGVzRm9yCQDMCAIJAKQDAQURQ291bnRWb3Rlc0FnYWluc3QFA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5AggIBQFpBmNhbGxlcgVieXRlcwUCaWQFBHZvdGUJAMwIAgkBDEludGVnZXJFbnRyeQIJARh1c2VyUHJvcG9zYWxWb3RlUG93ZXJLZXkCCAgFAWkGY2FsbGVyBWJ5dGVzBQJpZAkBFmJhbGFuY2VSZXB1dGF0aW9uQXNzZXQBCAgFAWkGY2FsbGVyBWJ5dGVzBQNuaWwJAMwIAgkBDEludGVnZXJFbnRyeQIJARxwcm9wb3NhbENvdW50Vm90ZXNBZ2FpbnN0S2V5AQUCaWQJAGQCCQERY291bnRWb3Rlc0FnYWluc3QBBQJpZAkBFmJhbGFuY2VSZXB1dGF0aW9uQXNzZXQBCAgFAWkGY2FsbGVyBWJ5dGVzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQESdW5sb2NrVGltZXN0YW1wS2V5AQgIBQFpBmNhbGxlcgVieXRlcwUKdW5sb2NrVGltZQkAzAgCCQEMQm9vbGVhbkVudHJ5AgkBE3VzZXJQcm9wb3NhbFZvdGVLZXkCCAgFAWkGY2FsbGVyBWJ5dGVzBQJpZAUEdm90ZQkAzAgCCQEMSW50ZWdlckVudHJ5AgkBGHVzZXJQcm9wb3NhbFZvdGVQb3dlcktleQIICAUBaQZjYWxsZXIFYnl0ZXMFAmlkCQEWYmFsYW5jZVJlcHV0YXRpb25Bc3NldAEICAUBaQZjYWxsZXIFYnl0ZXMFA25pbAkAAgECEHByb3Bvc2FsTm90QWxpdmUBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5H7keHw==", "height": 2760926, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3b6YjoVMye43yA3vMbLB12odXsBhdWNVAD7fze31aWNR Next: 3qRuZm73k9JML2bntUPa6WPBXHhYd51VoCJRFCuZ6iDj Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | func d (e) = makeString(["p", toString(e)], a) | |
11 | 11 | ||
12 | 12 | ||
13 | - | func f (e,g,h,i,j,k,l) = StringEntry(d(e), makeString([ | |
13 | + | func f (e,g,h,i,j,k,l) = StringEntry(d(e), makeString([toBase16String(g.bytes), h, i, toString(j), toString(k), toString(l)], a)) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func m (e) = { | |
23 | 23 | } | |
24 | 24 | else throw("proposal not found") | |
25 | 25 | }, a) | |
26 | - | $Tuple6( | |
26 | + | $Tuple6(fromBase16String(n[0]), n[1], n[2], parseInt(n[3]), parseInt(n[4]), parseInt(n[5])) | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = base58'88Tkdpqchhiqc9tNNG3SWQ2gfhZB4rBJKhMNS5Xmxhqw' | |
7 | 7 | ||
8 | 8 | let c = ((((1000 * 60) * 60) * 24) * 3) | |
9 | 9 | ||
10 | 10 | func d (e) = makeString(["p", toString(e)], a) | |
11 | 11 | ||
12 | 12 | ||
13 | - | func f (e,g,h,i,j,k,l) = StringEntry(d(e), makeString([ | |
13 | + | func f (e,g,h,i,j,k,l) = StringEntry(d(e), makeString([toBase16String(g.bytes), h, i, toString(j), toString(k), toString(l)], a)) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func m (e) = { | |
17 | 17 | let n = split({ | |
18 | 18 | let o = getString(this, d(e)) | |
19 | 19 | if ($isInstanceOf(o, "String")) | |
20 | 20 | then { | |
21 | 21 | let p = o | |
22 | 22 | p | |
23 | 23 | } | |
24 | 24 | else throw("proposal not found") | |
25 | 25 | }, a) | |
26 | - | $Tuple6( | |
26 | + | $Tuple6(fromBase16String(n[0]), n[1], n[2], parseInt(n[3]), parseInt(n[4]), parseInt(n[5])) | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func q (r) = makeString(["ut", toBase58String(r)], a) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func s () = "cp" | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func t (e) = makeString(["pti", toString(e)], a) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func u (e) = makeString(["pte", toString(e)], a) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func v (e) = makeString(["ptc", toString(e)], a) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func w (e) = makeString(["pcvf", toString(e)], a) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func x (e) = makeString(["pcva", toString(e)], a) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func y (r,e) = makeString(["upv", toString(e), toBase58String(r)], a) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func z (r,e) = makeString(["upvp", toString(e), toBase58String(r)], a) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func A (B) = if ((size(B.payments) == 1)) | |
58 | 58 | then if ((B.payments[0].assetId == b)) | |
59 | 59 | then true | |
60 | 60 | else throw("only reputation assets") | |
61 | 61 | else throw("only 1 payment") | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func C (r) = { | |
65 | 65 | let o = getInteger(this, q(r)) | |
66 | 66 | if ($isInstanceOf(o, "Int")) | |
67 | 67 | then { | |
68 | 68 | let D = o | |
69 | 69 | D | |
70 | 70 | } | |
71 | 71 | else 0 | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func E () = { | |
76 | 76 | let o = getInteger(this, s()) | |
77 | 77 | if ($isInstanceOf(o, "Int")) | |
78 | 78 | then { | |
79 | 79 | let D = o | |
80 | 80 | D | |
81 | 81 | } | |
82 | 82 | else 0 | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func k (e) = { | |
87 | 87 | let o = getInteger(this, w(e)) | |
88 | 88 | if ($isInstanceOf(o, "Int")) | |
89 | 89 | then { | |
90 | 90 | let D = o | |
91 | 91 | D | |
92 | 92 | } | |
93 | 93 | else 0 | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func F (e) = { | |
98 | 98 | let o = getInteger(this, x(e)) | |
99 | 99 | if ($isInstanceOf(o, "Int")) | |
100 | 100 | then { | |
101 | 101 | let D = o | |
102 | 102 | D | |
103 | 103 | } | |
104 | 104 | else 0 | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func G (r,e) = { | |
109 | 109 | let o = getInteger(this, z(r, e)) | |
110 | 110 | if ($isInstanceOf(o, "Int")) | |
111 | 111 | then { | |
112 | 112 | let D = o | |
113 | 113 | D | |
114 | 114 | } | |
115 | 115 | else 0 | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func H (r) = { | |
120 | 120 | let o = getInteger(this, toBase58String(r)) | |
121 | 121 | if ($isInstanceOf(o, "Int")) | |
122 | 122 | then { | |
123 | 123 | let D = o | |
124 | 124 | D | |
125 | 125 | } | |
126 | 126 | else 0 | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func I (e) = { | |
131 | 131 | let o = getInteger(this, v(e)) | |
132 | 132 | if ($isInstanceOf(o, "Int")) | |
133 | 133 | then { | |
134 | 134 | let D = o | |
135 | 135 | D | |
136 | 136 | } | |
137 | 137 | else throw("proposal not created") | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func J (e) = if (if ((E() > e)) | |
142 | 142 | then ((I(e) + c) > lastBlock.timestamp) | |
143 | 143 | else false) | |
144 | 144 | then true | |
145 | 145 | else throw("proposalNotAlive") | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(B) | |
149 | 149 | func deposit () = { | |
150 | 150 | let K = [A(B)] | |
151 | 151 | if ((K == K)) | |
152 | 152 | then { | |
153 | 153 | let L = toBase58String(B.caller.bytes) | |
154 | 154 | let M = H(B.caller.bytes) | |
155 | 155 | let N = (M + B.payments[0].amount) | |
156 | 156 | [IntegerEntry(L, N)] | |
157 | 157 | } | |
158 | 158 | else throw("onlyReputationAsset") | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(B) | |
164 | 164 | func withdraw (O) = { | |
165 | 165 | let L = toBase58String(B.caller.bytes) | |
166 | 166 | let M = { | |
167 | 167 | let o = getInteger(this, L) | |
168 | 168 | if ($isInstanceOf(o, "Int")) | |
169 | 169 | then { | |
170 | 170 | let D = o | |
171 | 171 | D | |
172 | 172 | } | |
173 | 173 | else 0 | |
174 | 174 | } | |
175 | 175 | let N = (M - O) | |
176 | 176 | if ((0 > O)) | |
177 | 177 | then throw("Can't withdraw negative amount") | |
178 | 178 | else if ((C(B.caller.bytes) > lastBlock.timestamp)) | |
179 | 179 | then throw("Locked") | |
180 | 180 | else if ((0 > N)) | |
181 | 181 | then throw("Not enough balance") | |
182 | 182 | else [IntegerEntry(L, N), ScriptTransfer(B.caller, O, b)] | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | ||
187 | 187 | @Callable(B) | |
188 | 188 | func createProposalNew (h,i) = { | |
189 | 189 | let P = E() | |
190 | 190 | [f(P, B.caller, toBase16String(h), toBase16String(i), lastBlock.timestamp, 0, 0)] | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(B) | |
196 | 196 | func createProposal (h,i) = { | |
197 | 197 | let P = E() | |
198 | 198 | [StringEntry(t(P), h), StringEntry(u(P), i), IntegerEntry(v(P), lastBlock.timestamp), IntegerEntry(s(), (P + 1))] | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | ||
203 | 203 | @Callable(B) | |
204 | 204 | func vote (e,Q) = if (J(e)) | |
205 | 205 | then { | |
206 | 206 | let R = max([(I(e) + c), C(B.caller.bytes)]) | |
207 | 207 | let S = { | |
208 | 208 | let o = getBoolean(this, y(B.caller.bytes, e)) | |
209 | 209 | if ($isInstanceOf(o, "Boolean")) | |
210 | 210 | then { | |
211 | 211 | let D = o | |
212 | 212 | if (D) | |
213 | 213 | then IntegerEntry(w(e), (k(e) - G(B.caller.bytes, e))) | |
214 | 214 | else IntegerEntry(x(e), (k(e) - G(B.caller.bytes, e))) | |
215 | 215 | } | |
216 | 216 | else unit | |
217 | 217 | } | |
218 | 218 | if ((Q == true)) | |
219 | 219 | then [IntegerEntry(w(e), (k(e) + H(B.caller.bytes))), IntegerEntry(q(B.caller.bytes), R), BooleanEntry(y(B.caller.bytes, e), Q), IntegerEntry(z(B.caller.bytes, e), H(B.caller.bytes))] | |
220 | 220 | else [IntegerEntry(x(e), (F(e) + H(B.caller.bytes))), IntegerEntry(q(B.caller.bytes), R), BooleanEntry(y(B.caller.bytes, e), Q), IntegerEntry(z(B.caller.bytes, e), H(B.caller.bytes))] | |
221 | 221 | } | |
222 | 222 | else throw("proposalNotAlive") | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | @Verifier(T) | |
226 | 226 | func U () = sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey) | |
227 | 227 |
github/deemru/w8io/026f985 55.17 ms ◑