tx · 8bP27cBvTuTg9QpT89hwg1XT8wCrn9f3rau2sSm1eDiQ 3Mz7AZHqAeMecF7aaE9HVsK94XVQKf1QCKg: -0.01400000 Waves 2022.03.11 17:01 [1959379] smart account 3Mz7AZHqAeMecF7aaE9HVsK94XVQKf1QCKg > SELF 0.00000000 Waves
{ "type": 13, "id": "8bP27cBvTuTg9QpT89hwg1XT8wCrn9f3rau2sSm1eDiQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1647007342122, "version": 1, "sender": "3Mz7AZHqAeMecF7aaE9HVsK94XVQKf1QCKg", "senderPublicKey": "9o6mYaNcbcTi647J8XhDQg2VsHJCv5Jon1QFPCbFPoFh", "proofs": [ "53xgWo7yFbP97gM7nsyfcSMKR9B1Ci4iwCAL919LgHS4WRuanUD1Ay5JGyqEdm9Na1BxmHvkRvU9EKooRMTWsRKq" ], "script": "base64:AAIFAAAAAAAAABcIAhIFCgMBAQgSABIDCgEIEgMKAQgSAAAAABIBAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABQlc19fbWFuYWdlclB1YmxpY0tleQEAAAAaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAACXNlcGFyYXRvcgIAAAACX18BAAAAD2dldFN0cmluZ09yRmFpbAAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAKbWFuZGF0b3J5IAkABCUAAAABBQAAAAdhZGRyZXNzAgAAAAEuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAAAAAAIa2V5U3RhcnQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAVzdGFydAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAA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1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXmx4s+t", "chainId": 84, "height": 1959379, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FJpctF1YcHbZMrtBTDWsD1Bw9rzggSVn4Z6BST5erE9k Next: BftZoJ9A1HJVoXugiK3WneSojGCKKXCpRGr318jUfmY6 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = "__" | |
5 | - | ||
6 | - | func b (c,d) = valueOrErrorMessage(getString(c, d), (((("mandatory " + toString(c)) + ".") + d) + " is not defined")) | |
4 | + | func a () = "%s__managerPublicKey" | |
7 | 5 | ||
8 | 6 | ||
9 | - | let e = makeString(["%s", "start"], a) | |
10 | - | ||
11 | - | let f = makeString(["%s", "duration"], a) | |
12 | - | ||
13 | - | let g = makeString(["%s", "asset"], a) | |
14 | - | ||
15 | - | let h = makeString(["%s", "isDataReady"], a) | |
16 | - | ||
17 | - | func i (c) = makeString(["%s%s", "userRewardInfo", toString(c)], a) | |
7 | + | func b () = "%s__pendingManagerPublicKey" | |
18 | 8 | ||
19 | 9 | ||
20 | - | func j (c,k) = makeString(["%s%s%s", "claimHistoryRecord", toString(c), toBase58String(k)], a) | |
10 | + | let c = "__" | |
11 | + | ||
12 | + | func d (e,f) = valueOrErrorMessage(getString(e, f), (((("mandatory " + toString(e)) + ".") + f) + " is not defined")) | |
21 | 13 | ||
22 | 14 | ||
23 | - | func l (m) = makeString(["%d%d%d", toString(height), toString(lastBlock.timestamp), toString(m)], a) | |
15 | + | let g = makeString(["%s", "start"], c) | |
16 | + | ||
17 | + | let h = makeString(["%s", "duration"], c) | |
18 | + | ||
19 | + | let i = makeString(["%s", "asset"], c) | |
20 | + | ||
21 | + | let j = makeString(["%s", "isDataReady"], c) | |
22 | + | ||
23 | + | func k (e) = makeString(["%s%s", "userRewardInfo", toString(e)], c) | |
24 | 24 | ||
25 | 25 | ||
26 | - | func | |
26 | + | func l (e,m) = makeString(["%s%s%s", "claimHistoryRecord", toString(e), toBase58String(m)], c) | |
27 | 27 | ||
28 | 28 | ||
29 | - | func | |
29 | + | func n (o) = makeString(["%d%d%d", toString(height), toString(lastBlock.timestamp), toString(o)], c) | |
30 | 30 | ||
31 | 31 | ||
32 | - | func s () = { | |
33 | - | let t = valueOrElse(getBoolean(this, h), false) | |
34 | - | if (t) | |
32 | + | func p (q,r) = makeString(["%d%d", toString(q), toString(r)], c) | |
33 | + | ||
34 | + | ||
35 | + | func s (t) = split(d(this, k(t)), c) | |
36 | + | ||
37 | + | ||
38 | + | func u () = { | |
39 | + | let v = valueOrElse(getBoolean(this, j), false) | |
40 | + | if (v) | |
35 | 41 | then true | |
36 | 42 | else throw("Data is not ready") | |
37 | 43 | } | |
38 | 44 | ||
39 | 45 | ||
40 | - | func | |
41 | - | let | |
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | let | |
46 | - | let | |
47 | - | let | |
48 | - | $Tuple3( | |
46 | + | func w (e) = { | |
47 | + | let x = valueOrErrorMessage(getInteger(this, g), "Start block is not specified") | |
48 | + | let y = valueOrErrorMessage(getInteger(this, h), "Duration is not specified") | |
49 | + | let z = s(e) | |
50 | + | let A = parseIntValue(z[1]) | |
51 | + | let B = parseIntValue(z[2]) | |
52 | + | let C = fraction(A, min([y, max([0, (height - x)])]), y) | |
53 | + | let D = max([0, (C - B)]) | |
54 | + | $Tuple3(A, B, D) | |
49 | 55 | } | |
50 | 56 | ||
51 | 57 | ||
52 | - | @Callable(C) | |
53 | - | func constructor (v,w,D) = { | |
54 | - | let E = [if ((C.caller == this)) | |
55 | - | then true | |
56 | - | else throw("Access denied")] | |
57 | - | if ((E == E)) | |
58 | - | then [IntegerEntry(e, v), IntegerEntry(f, w), StringEntry(g, D), BooleanEntry(h, false)] | |
58 | + | func E () = { | |
59 | + | let F = getString(a()) | |
60 | + | if ($isInstanceOf(F, "String")) | |
61 | + | then { | |
62 | + | let G = F | |
63 | + | fromBase58String(G) | |
64 | + | } | |
65 | + | else if ($isInstanceOf(F, "Unit")) | |
66 | + | then unit | |
67 | + | else throw("Match error") | |
68 | + | } | |
69 | + | ||
70 | + | ||
71 | + | func H () = { | |
72 | + | let F = getString(b()) | |
73 | + | if ($isInstanceOf(F, "String")) | |
74 | + | then { | |
75 | + | let G = F | |
76 | + | fromBase58String(G) | |
77 | + | } | |
78 | + | else if ($isInstanceOf(F, "Unit")) | |
79 | + | then unit | |
80 | + | else throw("Match error") | |
81 | + | } | |
82 | + | ||
83 | + | ||
84 | + | func I (J) = { | |
85 | + | let K = throw("Permission denied") | |
86 | + | let F = E() | |
87 | + | if ($isInstanceOf(F, "ByteVector")) | |
88 | + | then { | |
89 | + | let L = F | |
90 | + | if ((J.callerPublicKey == L)) | |
91 | + | then true | |
92 | + | else K | |
93 | + | } | |
94 | + | else if ($isInstanceOf(F, "Unit")) | |
95 | + | then if ((J.caller == this)) | |
96 | + | then true | |
97 | + | else K | |
98 | + | else throw("Match error") | |
99 | + | } | |
100 | + | ||
101 | + | ||
102 | + | @Callable(J) | |
103 | + | func constructor (x,y,M) = { | |
104 | + | let N = I(J) | |
105 | + | if ((N == N)) | |
106 | + | then [IntegerEntry(g, x), IntegerEntry(h, y), StringEntry(i, M), BooleanEntry(j, false)] | |
59 | 107 | else throw("Strict value is not equal to itself.") | |
60 | 108 | } | |
61 | 109 | ||
62 | 110 | ||
63 | 111 | ||
64 | - | @Callable( | |
112 | + | @Callable(J) | |
65 | 113 | func claim () = { | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | let | |
72 | - | let | |
114 | + | let O = w(J.caller) | |
115 | + | let A = O._1 | |
116 | + | let B = O._2 | |
117 | + | let D = O._3 | |
118 | + | let P = fromBase58String(d(this, i)) | |
119 | + | let Q = assetBalance(this, P) | |
120 | + | let R = [u(), if ((D > 0)) | |
73 | 121 | then true | |
74 | - | else throw("No reward available"), if (( | |
122 | + | else throw("No reward available"), if ((Q >= D)) | |
75 | 123 | then true | |
76 | 124 | else throw("Insufficient funds. Contact support")] | |
77 | - | if (( | |
78 | - | then [ScriptTransfer( | |
125 | + | if ((R == R)) | |
126 | + | then [ScriptTransfer(J.caller, D, P), StringEntry(k(J.caller), p(A, (B + D))), StringEntry(l(J.caller, J.transactionId), n(D))] | |
79 | 127 | else throw("Strict value is not equal to itself.") | |
80 | 128 | } | |
81 | 129 | ||
82 | 130 | ||
83 | 131 | ||
84 | - | @Callable( | |
85 | - | func getUserRewardsREADONLY ( | |
86 | - | let | |
87 | - | if (( | |
132 | + | @Callable(J) | |
133 | + | func getUserRewardsREADONLY (e) = { | |
134 | + | let R = [u()] | |
135 | + | if ((R == R)) | |
88 | 136 | then { | |
89 | - | let | |
90 | - | let | |
91 | - | let | |
92 | - | let | |
93 | - | $Tuple2(nil, makeString(["%d%d%d", toString( | |
137 | + | let S = w(addressFromStringValue(e)) | |
138 | + | let A = S._1 | |
139 | + | let B = S._2 | |
140 | + | let D = S._3 | |
141 | + | $Tuple2(nil, makeString(["%d%d%d", toString(A), toString(B), toString(D)], c)) | |
94 | 142 | } | |
95 | 143 | else throw("Strict value is not equal to itself.") | |
96 | 144 | } | |
97 | 145 | ||
98 | 146 | ||
147 | + | ||
148 | + | @Callable(J) | |
149 | + | func setManager (T) = { | |
150 | + | let N = I(J) | |
151 | + | if ((N == N)) | |
152 | + | then { | |
153 | + | let U = fromBase58String(T) | |
154 | + | if ((U == U)) | |
155 | + | then [StringEntry(b(), T)] | |
156 | + | else throw("Strict value is not equal to itself.") | |
157 | + | } | |
158 | + | else throw("Strict value is not equal to itself.") | |
159 | + | } | |
160 | + | ||
161 | + | ||
162 | + | ||
163 | + | @Callable(J) | |
164 | + | func confirmManager () = { | |
165 | + | let V = H() | |
166 | + | let W = if (isDefined(V)) | |
167 | + | then true | |
168 | + | else throw("No pending manager") | |
169 | + | if ((W == W)) | |
170 | + | then { | |
171 | + | let X = if ((J.callerPublicKey == value(V))) | |
172 | + | then true | |
173 | + | else throw("You are not pending manager") | |
174 | + | if ((X == X)) | |
175 | + | then [StringEntry(a(), toBase58String(value(V))), DeleteEntry(b())] | |
176 | + | else throw("Strict value is not equal to itself.") | |
177 | + | } | |
178 | + | else throw("Strict value is not equal to itself.") | |
179 | + | } | |
180 | + | ||
181 | + | ||
182 | + | @Verifier(Y) | |
183 | + | func Z () = { | |
184 | + | let aa = { | |
185 | + | let F = E() | |
186 | + | if ($isInstanceOf(F, "ByteVector")) | |
187 | + | then { | |
188 | + | let L = F | |
189 | + | L | |
190 | + | } | |
191 | + | else if ($isInstanceOf(F, "Unit")) | |
192 | + | then Y.senderPublicKey | |
193 | + | else throw("Match error") | |
194 | + | } | |
195 | + | sigVerify(Y.bodyBytes, Y.proofs[0], aa) | |
196 | + | } | |
197 | + |
github/deemru/w8io/169f3d6 43.22 ms ◑