tx · D1LXPPZNTjX4fgKEm4FJXsWs2p3gfxv3afRvrgizTxgC 3N33da2nqrqyBQgBkrpYhUVyzmS2bjZvepH: -0.01300000 Waves 2024.08.26 12:06 [3255649] smart account 3N33da2nqrqyBQgBkrpYhUVyzmS2bjZvepH > SELF 0.00000000 Waves
{ "type": 13, "id": "D1LXPPZNTjX4fgKEm4FJXsWs2p3gfxv3afRvrgizTxgC", "fee": 1300000, "feeAssetId": null, "timestamp": 1724663261682, "version": 2, "chainId": 84, "sender": "3N33da2nqrqyBQgBkrpYhUVyzmS2bjZvepH", "senderPublicKey": "239f6DdWGZWnw9VwYUYPnK1MeEvAymD9U5pfrBYpjPLS", "proofs": [ "67abekfWmj2jiC3GmPTNTNQv9kbo1WP13PTLmkdgFnYRFAV32RLgGzzyUSaAtR8j7bAu2Jhkc5on4f2ohfBfn8VE" ], "script": "base64:BwJTCAISBgoECAgCARIECgIICBIECgIIARIECgIIBBIECgIIAhIDCgEIEgUKAwIBBBIECgICARIFCgMCAQISBQoDAhIREgQKAgIBEgQKAggYEgMKAQgYAAlzZXBhcmF0b3ICAl9fAAdjaGFpbklkCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAhjaGFpbklkVwEBVwAQY29udHJhY3RGaWxlbmFtZQIUZnV0dXJlc19mYWN0b3J5LnJpZGUACWtNdWx0aXNpZwIMJXNfX211bHRpc2lnAQdrU3RhdHVzAgRkYXBwBHR4SWQJALkJAgkAzAgCAgolc19fc3RhdHVzCQDMCAIFBGRhcHAJAMwIAgUEdHhJZAUDbmlsBQlzZXBhcmF0b3IACWtTaHV0ZG93bgIMJXNfX3NodXRkb3duAAhzaHV0ZG93bgkBC3ZhbHVlT3JFbHNlAgkAoAgBBQlrU2h1dGRvd24HAQ92YWxpZGF0ZUFkZHJlc3MBB2FkZHJlc3MJAQlpc0RlZmluZWQBCQCmCAEFB2FkZHJlc3MBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lA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i4BAnR4AQZ2ZXJpZnkABAlzaWduQ2hlY2sJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwUJa011bHRpc2lnAwkAAQIFByRtYXRjaDACBlN0cmluZwQIbXVsdGlzaWcFByRtYXRjaDADAwkBAiE9AgUIbXVsdGlzaWcJAKUIAQUEdGhpcwkBD3ZhbGlkYXRlQWRkcmVzcwEFCG11bHRpc2lnBwQJc3RhdHVzS2V5CQEHa1N0YXR1cwIJAKUIAQUEdGhpcwkA2AQBCAUCdHgCaWQEBnN0YXR1cwkBC3ZhbHVlT3JFbHNlAgkAmwgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQhtdWx0aXNpZwUJc3RhdHVzS2V5BwUGc3RhdHVzBQlzaWduQ2hlY2sFCXNpZ25DaGVja3Tt95U=", "height": 3255649, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4tpbHcBskjhu3ziBux1qYSHNeb5arGuVBbiZRLtneTaG Next: none Diff:
Old | New | Differences | |
---|---|---|---|
216 | 216 | func setMultisig (ao) = { | |
217 | 217 | let ap = [y(x), if (k(ao)) | |
218 | 218 | then true | |
219 | - | else o("setMultisig: invalid multisig address")] | |
219 | + | else o("setMultisig: invalid multisig address"), if ((ao != toString(this))) | |
220 | + | then true | |
221 | + | else o("setMultisig: factory address cannot be multisig address")] | |
220 | 222 | if ((ap == ap)) | |
221 | 223 | then $Tuple2([StringEntry(e, ao)], unit) | |
222 | 224 | else throw("Strict value is not equal to itself.") | |
225 | 227 | ||
226 | 228 | @Verifier(aq) | |
227 | 229 | func ar () = { | |
228 | - | let s = getString(e) | |
230 | + | let as = sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey) | |
231 | + | let s = getString(this, e) | |
229 | 232 | if ($isInstanceOf(s, "String")) | |
230 | 233 | then { | |
231 | 234 | let ao = s | |
232 | - | let as = f(toString(this), toBase58String(aq.id)) | |
233 | - | let at = valueOrElse(getBoolean(addressFromStringValue(ao), as), false) | |
234 | - | at | |
235 | + | if (if ((ao != toString(this))) | |
236 | + | then k(ao) | |
237 | + | else false) | |
238 | + | then { | |
239 | + | let at = f(toString(this), toBase58String(aq.id)) | |
240 | + | let au = valueOrElse(getBoolean(addressFromStringValue(ao), at), false) | |
241 | + | au | |
242 | + | } | |
243 | + | else as | |
235 | 244 | } | |
236 | - | else | |
245 | + | else as | |
237 | 246 | } | |
238 | 247 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let c = base58'2W' | |
9 | 9 | ||
10 | 10 | let d = "futures_factory.ride" | |
11 | 11 | ||
12 | 12 | let e = "%s__multisig" | |
13 | 13 | ||
14 | 14 | func f (g,h) = makeString(["%s__status", g, h], a) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | let i = "%s__shutdown" | |
18 | 18 | ||
19 | 19 | let j = valueOrElse(getBoolean(i), false) | |
20 | 20 | ||
21 | 21 | func k (l) = isDefined(addressFromString(l)) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func m (n) = ((d + ": ") + n) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func o (n) = throw(m(n)) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | let p = "%s__matcherPublicKey" | |
31 | 31 | ||
32 | 32 | let q = "%s__calculatorAddress" | |
33 | 33 | ||
34 | 34 | let r = { | |
35 | 35 | let s = getString(this, q) | |
36 | 36 | if ($isInstanceOf(s, "String")) | |
37 | 37 | then { | |
38 | 38 | let n = s | |
39 | 39 | addressFromString(n) | |
40 | 40 | } | |
41 | 41 | else if ($isInstanceOf(s, "Unit")) | |
42 | 42 | then unit | |
43 | 43 | else throw("Match error") | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | let t = valueOrErrorMessage(r, m("invalid calculator address")) | |
47 | 47 | ||
48 | 48 | let u = "%s__accountScript" | |
49 | 49 | ||
50 | 50 | let v = "%s__rewardAmount" | |
51 | 51 | ||
52 | 52 | func w (x,l) = if ((x.caller == l)) | |
53 | 53 | then true | |
54 | 54 | else o("permission denied") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func y (x) = w(x, this) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func z (x) = w(x, t) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | let A = "WAVES" | |
64 | 64 | ||
65 | 65 | let B = 32 | |
66 | 66 | ||
67 | 67 | func C (D) = if ((D == A)) | |
68 | 68 | then unit | |
69 | 69 | else fromBase58String(D) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func E (D) = if ((D == unit)) | |
73 | 73 | then A | |
74 | 74 | else toBase58String(value(D)) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Callable(x) | |
78 | 78 | func init (F,G,H,I) = { | |
79 | 79 | let J = y(x) | |
80 | 80 | if ((J == J)) | |
81 | 81 | then $Tuple2([StringEntry(q, F), StringEntry(p, G), BinaryEntry(u, H), IntegerEntry(v, I)], unit) | |
82 | 82 | else throw("Strict value is not equal to itself.") | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | ||
87 | 87 | @Callable(x) | |
88 | 88 | func stringEntry (K,L) = if (if (!(j)) | |
89 | 89 | then z(x) | |
90 | 90 | else false) | |
91 | 91 | then $Tuple2([StringEntry(K, L)], K) | |
92 | 92 | else o("not allowed") | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Callable(x) | |
97 | 97 | func integerEntry (K,L) = if (if (!(j)) | |
98 | 98 | then z(x) | |
99 | 99 | else false) | |
100 | 100 | then $Tuple2([IntegerEntry(K, L)], K) | |
101 | 101 | else o("not allowed") | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(x) | |
106 | 106 | func booleanEntry (K,L) = if (if (!(j)) | |
107 | 107 | then z(x) | |
108 | 108 | else false) | |
109 | 109 | then $Tuple2([BooleanEntry(K, L)], K) | |
110 | 110 | else o("not allowed") | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(x) | |
115 | 115 | func binaryEntry (K,L) = if (if (!(j)) | |
116 | 116 | then z(x) | |
117 | 117 | else false) | |
118 | 118 | then $Tuple2([BinaryEntry(K, L)], K) | |
119 | 119 | else o("not allowed") | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(x) | |
124 | 124 | func deleteEntry (K) = if (if (!(j)) | |
125 | 125 | then z(x) | |
126 | 126 | else false) | |
127 | 127 | then $Tuple2([DeleteEntry(K)], K) | |
128 | 128 | else o("not allowed") | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | 132 | @Callable(x) | |
133 | 133 | func reissue (M,N,O) = if (if (!(j)) | |
134 | 134 | then z(x) | |
135 | 135 | else false) | |
136 | 136 | then $Tuple2([Reissue(M, N, O)], N) | |
137 | 137 | else o("not allowed") | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(x) | |
142 | 142 | func burn (M,N) = if (if (!(j)) | |
143 | 143 | then z(x) | |
144 | 144 | else false) | |
145 | 145 | then $Tuple2([Burn(M, N)], N) | |
146 | 146 | else o("not allowed") | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | ||
150 | 150 | @Callable(x) | |
151 | 151 | func transferAsset (P,N,M) = if (if (!(j)) | |
152 | 152 | then z(x) | |
153 | 153 | else false) | |
154 | 154 | then $Tuple2([ScriptTransfer(Address(P), N, M)], N) | |
155 | 155 | else o("not allowed") | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | 159 | @Callable(x) | |
160 | 160 | func transferAssets (P,Q,R) = if (if (!(j)) | |
161 | 161 | then z(x) | |
162 | 162 | else false) | |
163 | 163 | then { | |
164 | 164 | func S (T,U) = { | |
165 | 165 | let V = T | |
166 | 166 | let W = V._1 | |
167 | 167 | let X = V._2 | |
168 | 168 | let Y = ScriptTransfer(Address(P), R[X], Q[X]) | |
169 | 169 | let Z = (W :+ Y) | |
170 | 170 | $Tuple2(Z, (X + 1)) | |
171 | 171 | } | |
172 | 172 | ||
173 | 173 | let aa = { | |
174 | 174 | let ab = Q | |
175 | 175 | let ac = size(ab) | |
176 | 176 | let ad = $Tuple2(nil, 0) | |
177 | 177 | func ae (af,ag) = if ((ag >= ac)) | |
178 | 178 | then af | |
179 | 179 | else S(af, ab[ag]) | |
180 | 180 | ||
181 | 181 | func ah (af,ag) = if ((ag >= ac)) | |
182 | 182 | then af | |
183 | 183 | else throw("List size exceeds 10") | |
184 | 184 | ||
185 | 185 | ah(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
186 | 186 | } | |
187 | 187 | let ai = aa._1 | |
188 | 188 | let aj = aa._2 | |
189 | 189 | $Tuple2(ai, unit) | |
190 | 190 | } | |
191 | 191 | else o("not allowed") | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(x) | |
196 | 196 | func transferWaves (P,N) = if (if (!(j)) | |
197 | 197 | then z(x) | |
198 | 198 | else false) | |
199 | 199 | then $Tuple2([ScriptTransfer(Address(P), N, unit)], N) | |
200 | 200 | else o("not allowed") | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | ||
204 | 204 | @Callable(x) | |
205 | 205 | func call (ak,al) = { | |
206 | 206 | let am = if ((x.callerPublicKey == base58'11111111111111111111111111111111')) | |
207 | 207 | then nil | |
208 | 208 | else x.payments | |
209 | 209 | let an = reentrantInvoke(t, ak, [x.callerPublicKey, al], am) | |
210 | 210 | $Tuple2(nil, an) | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | ||
215 | 215 | @Callable(x) | |
216 | 216 | func setMultisig (ao) = { | |
217 | 217 | let ap = [y(x), if (k(ao)) | |
218 | 218 | then true | |
219 | - | else o("setMultisig: invalid multisig address")] | |
219 | + | else o("setMultisig: invalid multisig address"), if ((ao != toString(this))) | |
220 | + | then true | |
221 | + | else o("setMultisig: factory address cannot be multisig address")] | |
220 | 222 | if ((ap == ap)) | |
221 | 223 | then $Tuple2([StringEntry(e, ao)], unit) | |
222 | 224 | else throw("Strict value is not equal to itself.") | |
223 | 225 | } | |
224 | 226 | ||
225 | 227 | ||
226 | 228 | @Verifier(aq) | |
227 | 229 | func ar () = { | |
228 | - | let s = getString(e) | |
230 | + | let as = sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey) | |
231 | + | let s = getString(this, e) | |
229 | 232 | if ($isInstanceOf(s, "String")) | |
230 | 233 | then { | |
231 | 234 | let ao = s | |
232 | - | let as = f(toString(this), toBase58String(aq.id)) | |
233 | - | let at = valueOrElse(getBoolean(addressFromStringValue(ao), as), false) | |
234 | - | at | |
235 | + | if (if ((ao != toString(this))) | |
236 | + | then k(ao) | |
237 | + | else false) | |
238 | + | then { | |
239 | + | let at = f(toString(this), toBase58String(aq.id)) | |
240 | + | let au = valueOrElse(getBoolean(addressFromStringValue(ao), at), false) | |
241 | + | au | |
242 | + | } | |
243 | + | else as | |
235 | 244 | } | |
236 | - | else | |
245 | + | else as | |
237 | 246 | } | |
238 | 247 |
github/deemru/w8io/026f985 33.98 ms ◑