tx · 6yGwMDsuKTzZDMHpc4DapLN2xUeCR4mgz59sDr2uCVja 3Mown6tyCBRFAXSRwAzUpW1YR9L61mM7FFu: -0.01400000 Waves 2022.11.23 17:20 [2329859] smart account 3Mown6tyCBRFAXSRwAzUpW1YR9L61mM7FFu > SELF 0.00000000 Waves
{ "type": 13, "id": "6yGwMDsuKTzZDMHpc4DapLN2xUeCR4mgz59sDr2uCVja", "fee": 1400000, "feeAssetId": null, "timestamp": 1669213255561, "version": 2, "chainId": 84, "sender": "3Mown6tyCBRFAXSRwAzUpW1YR9L61mM7FFu", "senderPublicKey": "4oWUXkTfb3sTD75A8rRUWDDqjhEKp8wdoJ6AQgGZ6pnD", "proofs": [ "4oeiBMuFkghXpvGuihJGcoCjpoRQVgFou7cYAkKWX2BhSTDz9JcbC27kok5qZsLx3rrbBVVPxZt2hT6QH4CzqF78" ], "script": "base64:BgIsCAISBgoECAgIARIAEgMKAQESABIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQEZAAlTRVBBUkFUT1ICAl9fAAhLRVlfSU5JVAIESU5JVAAMS0VZX01VTFRJU0lHAghNVUxUSVNJRwAKS0VZX1NUQVRVUwIGU1RBVFVTAApLRVlfVEFSR0VUAgZUQVJHRVQAC0tFWV9BREFQVEVFAgdBREFQVEVFAAtLRVlfTUFOQUdFUgIHTUFOQUdFUgAMS0VZX0ZFRV9SQVRFAghGRUVfUkFURQAOS0VZX0xBU1RfQ0xBSU0CCkxBU1RfQ0xBSU0ADEtFWV9MRUFTRV9JRAIITEVBU0VfSUQAEEtFWV9MRUFTRV9BTU9VTlQCDExFQVNFX0FNT1VOVAAKRlVOQ19DTEFJTQIFY2xhaW0ACklOVk9LRV9GRUUAoMIeAAxDT01QRU5TQVRJT04FCklOVk9LRV9GRUUADkNMQUlNX0lOVEVSVkFMAKALAA5QRVJDRU5UX0ZBQ1RPUgCQTgEQX3ZhbGlkYXRlQWRkcmVzcwEIYWRkcmVzc18EByRtYXRjaDAJAKYIAQUIYWR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Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "__" | |
5 | + | ||
6 | + | let b = "INIT" | |
7 | + | ||
8 | + | let c = "MULTISIG" | |
9 | + | ||
10 | + | let d = "STATUS" | |
11 | + | ||
12 | + | let e = "TARGET" | |
13 | + | ||
14 | + | let f = "ADAPTEE" | |
15 | + | ||
16 | + | let g = "MANAGER" | |
17 | + | ||
18 | + | let h = "FEE_RATE" | |
19 | + | ||
20 | + | let i = "LAST_CLAIM" | |
21 | + | ||
22 | + | let j = "LEASE_ID" | |
23 | + | ||
24 | + | let k = "LEASE_AMOUNT" | |
25 | + | ||
26 | + | let l = "claim" | |
27 | + | ||
28 | + | let m = 500000 | |
29 | + | ||
30 | + | let n = m | |
31 | + | ||
32 | + | let o = 1440 | |
33 | + | ||
34 | + | let p = 10000 | |
35 | + | ||
36 | + | func q (r) = { | |
37 | + | let s = addressFromString(r) | |
38 | + | if ($isInstanceOf(s, "Address")) | |
39 | + | then { | |
40 | + | let t = s | |
41 | + | true | |
42 | + | } | |
43 | + | else false | |
44 | + | } | |
45 | + | ||
46 | + | ||
47 | + | func u () = { | |
48 | + | let s = getString(e) | |
49 | + | if ($isInstanceOf(s, "String")) | |
50 | + | then { | |
51 | + | let t = s | |
52 | + | addressFromStringValue(t) | |
53 | + | } | |
54 | + | else throw("_loadTarget: no target address") | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | func v () = { | |
59 | + | let s = getString(f) | |
60 | + | if ($isInstanceOf(s, "String")) | |
61 | + | then { | |
62 | + | let t = s | |
63 | + | addressFromStringValue(t) | |
64 | + | } | |
65 | + | else throw("_loadAdaptee: no adaptee address") | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | func w () = { | |
70 | + | let s = getString(g) | |
71 | + | if ($isInstanceOf(s, "String")) | |
72 | + | then { | |
73 | + | let t = s | |
74 | + | addressFromStringValue(t) | |
75 | + | } | |
76 | + | else throw("_loadManager: no manager address") | |
77 | + | } | |
78 | + | ||
79 | + | ||
80 | + | func x () = { | |
81 | + | let s = getInteger(h) | |
82 | + | if ($isInstanceOf(s, "Int")) | |
83 | + | then { | |
84 | + | let t = s | |
85 | + | t | |
86 | + | } | |
87 | + | else throw("_loadFeeRate: no fee rate") | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | func y () = { | |
92 | + | let s = getInteger(i) | |
93 | + | if ($isInstanceOf(s, "Int")) | |
94 | + | then { | |
95 | + | let t = s | |
96 | + | t | |
97 | + | } | |
98 | + | else throw("_loadLastClaim: no last claim") | |
99 | + | } | |
100 | + | ||
101 | + | ||
102 | + | func z (A,B) = { | |
103 | + | let s = getInteger(A) | |
104 | + | if ($isInstanceOf(s, "Int")) | |
105 | + | then { | |
106 | + | let t = s | |
107 | + | t | |
108 | + | } | |
109 | + | else B | |
110 | + | } | |
111 | + | ||
112 | + | ||
113 | + | func C (D,E) = { | |
114 | + | let F = getBinary(j) | |
115 | + | let G = z(k, 0) | |
116 | + | let H = (G + D) | |
117 | + | let I = if (isDefined(F)) | |
118 | + | then [LeaseCancel(value(F))] | |
119 | + | else nil | |
120 | + | let J = if ((H > 0)) | |
121 | + | then { | |
122 | + | let K = Lease(E, H) | |
123 | + | [K, BinaryEntry(j, calculateLeaseId(K)), IntegerEntry(k, H)] | |
124 | + | } | |
125 | + | else [DeleteEntry(j), IntegerEntry(k, 0)] | |
126 | + | (I ++ J) | |
127 | + | } | |
128 | + | ||
129 | + | ||
130 | + | func L () = { | |
131 | + | let M = y() | |
132 | + | let N = v() | |
133 | + | let O = wavesBalance(N).regular | |
134 | + | let P = x() | |
135 | + | let Q = fraction(O, P, p) | |
136 | + | let R = (O - Q) | |
137 | + | if ((n >= R)) | |
138 | + | then $Tuple4(false, 0, 0, 0) | |
139 | + | else if (((M + o) > height)) | |
140 | + | then $Tuple4(false, 0, 0, 0) | |
141 | + | else { | |
142 | + | let S = invoke(N, l, [O], nil) | |
143 | + | if ((S == S)) | |
144 | + | then $Tuple4(true, (R - n), n, Q) | |
145 | + | else throw("Strict value is not equal to itself.") | |
146 | + | } | |
147 | + | } | |
148 | + | ||
149 | + | ||
150 | + | @Callable(T) | |
151 | + | func init (U,V,W,X) = { | |
152 | + | let Y = valueOrErrorMessage(getString(c), "init: no multisig set") | |
153 | + | let Z = valueOrElse(getBoolean(b), false) | |
154 | + | let aa = if ((T.caller != this)) | |
155 | + | then throw("init: permission denied") | |
156 | + | else if (Z) | |
157 | + | then throw("init: already initialized") | |
158 | + | else if (!(q(U))) | |
159 | + | then throw("init: invalid target address") | |
160 | + | else if (!(q(V))) | |
161 | + | then throw("init: invalid adaptee address") | |
162 | + | else if (!(q(W))) | |
163 | + | then throw("init: invalid manager address") | |
164 | + | else if (if ((0 > X)) | |
165 | + | then true | |
166 | + | else (X > p)) | |
167 | + | then throw("init: invalid fee rate") | |
168 | + | else unit | |
169 | + | if ((aa == aa)) | |
170 | + | then $Tuple2([BooleanEntry(b, true), StringEntry(e, U), StringEntry(f, V), StringEntry(g, W), IntegerEntry(h, X), IntegerEntry(i, height)], unit) | |
171 | + | else throw("Strict value is not equal to itself.") | |
172 | + | } | |
173 | + | ||
174 | + | ||
175 | + | ||
176 | + | @Callable(T) | |
177 | + | func stake () = { | |
178 | + | let aa = if ((T.caller != u())) | |
179 | + | then throw("stake: permission denied") | |
180 | + | else if ((size(T.payments) != 1)) | |
181 | + | then throw("stake: no payments") | |
182 | + | else if ((T.payments[0].assetId != unit)) | |
183 | + | then throw("stake: payment is not in waves") | |
184 | + | else if ((0 >= T.payments[0].amount)) | |
185 | + | then throw("stake: invalid payment amount") | |
186 | + | else unit | |
187 | + | if ((aa == aa)) | |
188 | + | then $Tuple2(C(T.payments[0].amount, v()), unit) | |
189 | + | else throw("Strict value is not equal to itself.") | |
190 | + | } | |
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | @Callable(T) | |
195 | + | func unstake (D) = { | |
196 | + | let aa = if ((T.caller != u())) | |
197 | + | then throw("unstake: permission denied") | |
198 | + | else if ((0 >= D)) | |
199 | + | then throw("unstake: invalid amount") | |
200 | + | else unit | |
201 | + | if ((aa == aa)) | |
202 | + | then $Tuple2((C((-1 * D), v()) :+ ScriptTransfer(T.caller, D, unit)), unit) | |
203 | + | else throw("Strict value is not equal to itself.") | |
204 | + | } | |
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | @Callable(T) | |
209 | + | func claimReward () = { | |
210 | + | let ab = L() | |
211 | + | if ((T.caller != u())) | |
212 | + | then throw("claimReward: permission denied") | |
213 | + | else if (!(ab._1)) | |
214 | + | then $Tuple2(nil, unit) | |
215 | + | else $Tuple2([ScriptTransfer(T.caller, (ab._2 + ab._3), unit), ScriptTransfer(w(), ab._4, unit), IntegerEntry(i, height)], $Tuple3(ab._2, ab._3, o)) | |
216 | + | } | |
217 | + | ||
218 | + | ||
219 | + | ||
220 | + | @Callable(T) | |
221 | + | func setMultisig (ac) = { | |
222 | + | let aa = if ((T.caller != this)) | |
223 | + | then throw("setMultisig: permission denied") | |
224 | + | else if (!(q(ac))) | |
225 | + | then throw("setMultisig: invalid multisig address") | |
226 | + | else unit | |
227 | + | if ((aa == aa)) | |
228 | + | then $Tuple2([StringEntry(c, ac)], unit) | |
229 | + | else throw("Strict value is not equal to itself.") | |
230 | + | } | |
231 | + | ||
232 | + | ||
233 | + | ||
234 | + | @Callable(T) | |
235 | + | func setTarget (U) = { | |
236 | + | let aa = if ((T.caller != this)) | |
237 | + | then throw("setTarget: permission denied") | |
238 | + | else if (!(q(U))) | |
239 | + | then throw("setTarget: invalid target address") | |
240 | + | else unit | |
241 | + | if ((aa == aa)) | |
242 | + | then $Tuple2([StringEntry(e, U)], unit) | |
243 | + | else throw("Strict value is not equal to itself.") | |
244 | + | } | |
245 | + | ||
246 | + | ||
247 | + | ||
248 | + | @Callable(T) | |
249 | + | func setAdaptee (V) = { | |
250 | + | let aa = if ((T.caller != this)) | |
251 | + | then throw("setAdaptee: permission denied") | |
252 | + | else if (!(q(V))) | |
253 | + | then throw("setAdaptee: invalid target address") | |
254 | + | else unit | |
255 | + | if ((aa == aa)) | |
256 | + | then $Tuple2([StringEntry(f, V)], unit) | |
257 | + | else throw("Strict value is not equal to itself.") | |
258 | + | } | |
259 | + | ||
260 | + | ||
261 | + | ||
262 | + | @Callable(T) | |
263 | + | func setManager (W) = { | |
264 | + | let aa = if ((T.caller != this)) | |
265 | + | then throw("setManager: permission denied") | |
266 | + | else if (!(q(W))) | |
267 | + | then throw("setManager: invalid target address") | |
268 | + | else unit | |
269 | + | if ((aa == aa)) | |
270 | + | then $Tuple2([StringEntry(g, W)], unit) | |
271 | + | else throw("Strict value is not equal to itself.") | |
272 | + | } | |
273 | + | ||
274 | + | ||
275 | + | ||
276 | + | @Callable(T) | |
277 | + | func setFeeRate (X) = { | |
278 | + | let aa = if ((T.caller != this)) | |
279 | + | then throw("setFeeRate: permission denied") | |
280 | + | else if (if ((0 > X)) | |
281 | + | then true | |
282 | + | else (X > p)) | |
283 | + | then throw("setFeeRate: invalid infrastructure fee") | |
284 | + | else unit | |
285 | + | if ((aa == aa)) | |
286 | + | then $Tuple2([IntegerEntry(h, X)], unit) | |
287 | + | else throw("Strict value is not equal to itself.") | |
288 | + | } | |
289 | + | ||
290 | + | ||
291 | + | @Verifier(ad) | |
292 | + | func ae () = { | |
293 | + | let s = getString(c) | |
294 | + | if ($isInstanceOf(s, "String")) | |
295 | + | then { | |
296 | + | let Y = s | |
297 | + | valueOrElse(getBoolean(addressFromStringValue(Y), makeString([d, toString(this), toBase58String(ad.id)], a)), false) | |
298 | + | } | |
299 | + | else sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey) | |
300 | + | } | |
301 | + |
github/deemru/w8io/169f3d6 34.09 ms ◑