tx · Hq2jw7mQaM9AKWTJ8tdbXiGETFKmrbGH7GJNMr3cuhiX 3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt: -0.01200000 Waves 2023.12.11 09:59 [2881708] smart account 3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt > SELF 0.00000000 Waves
{ "type": 13, "id": "Hq2jw7mQaM9AKWTJ8tdbXiGETFKmrbGH7GJNMr3cuhiX", "fee": 1200000, "feeAssetId": null, "timestamp": 1702278050495, "version": 1, "sender": "3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt", "senderPublicKey": "FACNGaFYnR8yFbQFg9sRBpzGVCyzMyLeVw3JMhGQT1wn", "proofs": [ "rE9wKLG8kB4HyCeoRmZZxxWjiz9unyy1q3w83iDn5vCRXuoE1VSK953xDAtz9CwxYuXRix8d7j3bLvnJFgUVqfu" ], "script": "base64:BgIWCAISBAoCCAESBQoDGBEBEgMKAQgSADAADGNvbnRyYWN0RmlsZQIRbDJtcF9zdGFraW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAAdzY2FsZTE4AICAkLu61q3wDQANc2NhbGUxOEJpZ0ludAkAtgIBBQdzY2FsZTE4ABJBRERSRVNTX0JZVEVTX1NJWkUAGgANQkxPQ0tTX0lOX0RBWQCgCwAMYWRtaW5BZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzTXBzN0NacUI5blViRWlyWXlDTU1vQTdWYnFyeEx2SkZTQgEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAATa2V5RW1pc3Npb25QZXJCbG9jawkAuQkCCQDMCAICAiVzCQDMCAICEGVtaXNzaW9uUGVyQmxvY2sFA25pbAUDU0VQABlrZXlFbWlzc2lvblBlcmlvZEluQmxvY2tzCQC5CQIJAMwIAgICJXMJAMwIAgIWZW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tpbmdOb2Rlc0xpc3QIBQ0kdDAxMDY3MjEwNzY0Al8xBBl1c2VyU3Rha2luZ05vZGVTaGFyZXNMaXN0CAUNJHQwMTA2NzIxMDc2NAJfMgkAlAoCBQNuaWwJAJwKCgUMdXNlckxwQW1vdW50BRx1c2VyQXZhaWxhYmxlQXNzZXRUb1dpdGhkcmF3CQEPZ2V0Q3VycmVudFByaWNlAAUVdXNlclRvdGFsU3Rha2VkQW1vdW50BRd1c2VyVG90YWxBc3NldFdpdGhkcmF3bgUSdXNlckxvY2tlZExwQW1vdW50BRV1c2VyTG9ja2VkQXNzZXRBbW91bnQFFHVzZXJTdGFraW5nTm9kZXNMaXN0BRl1c2VyU3Rha2luZ05vZGVTaGFyZXNMaXN0CQESZ2V0UmVtYWluaW5nQmxvY2tzAAFpARZnZXRUb3RhbEFzc2V0c1JFQURPTkxZAAkAlAoCBQNuaWwJAJgKBgUNdG90YWxMcEFtb3VudAkBK2dldFRvdGFsQXNzZXRBbW91bnRXaXRoUHJvZml0T3JNYXhBdmFpbGFibGUBBQZoZWlnaHQJAQ9nZXRDdXJyZW50UHJpY2UABRN0b3RhbExvY2tlZExwQW1vdW50CQEPY2FsY0Fzc2V0RnJvbUxwAgUTdG90YWxMb2NrZWRMcEFtb3VudAUGaGVpZ2h0CQESZ2V0UmVtYWluaW5nQmxvY2tzAABtidG5", "chainId": 84, "height": 2881708, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5dPMa5Sz2QcHQrn5piwiHR2YZkjh1MZbUJt5MG5gath Next: 86f1wMkBdKnMiHu4udATPPUkn5M37Bhy7qGtJPuoxPDc Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = 1440 | |
17 | 17 | ||
18 | - | func h (i) = throw(((a + ": ") + i)) | |
18 | + | let h = addressFromStringValue("3Mps7CZqB9nUbEirYyCMMoA7VbqrxLvJFSB") | |
19 | + | ||
20 | + | func i (j) = throw(((a + ": ") + j)) | |
19 | 21 | ||
20 | 22 | ||
21 | - | let | |
23 | + | let k = makeString(["%s", "assetId"], b) | |
22 | 24 | ||
23 | - | let | |
25 | + | let l = makeString(["%s", "emissionPerBlock"], b) | |
24 | 26 | ||
25 | - | let | |
27 | + | let m = makeString(["%s", "emissionPeriodInBlocks"], b) | |
26 | 28 | ||
27 | - | let | |
29 | + | let n = makeString(["%s", "startBlock"], b) | |
28 | 30 | ||
29 | - | let | |
31 | + | let o = makeString(["%s", "totalLpAmount"], b) | |
30 | 32 | ||
31 | - | let | |
33 | + | let p = makeString(["%s", "totalAssetAmount"], b) | |
32 | 34 | ||
33 | - | let | |
35 | + | let q = makeString(["%s", "totalLockedLpAmount"], b) | |
34 | 36 | ||
35 | - | func | |
37 | + | func r (s) = makeString(["%s%s", "userLpAmount", s], b) | |
36 | 38 | ||
37 | 39 | ||
38 | - | func | |
40 | + | func t (s) = makeString(["%s%s", "userLockedLpAmount", s], b) | |
39 | 41 | ||
40 | 42 | ||
41 | - | func | |
43 | + | func u (s) = makeString(["%s%s", "userStakingNodes", s], b) | |
42 | 44 | ||
43 | 45 | ||
44 | - | func | |
46 | + | func v (s) = makeString(["%s%s", "userStakingNodesShares", s], b) | |
45 | 47 | ||
46 | 48 | ||
47 | - | func | |
49 | + | func w (s) = makeString(["%s%s", "totalAssetWithdrawn", s], b) | |
48 | 50 | ||
49 | 51 | ||
50 | - | func | |
52 | + | func x (s) = makeString(["%s%s", "totalAssetStaked", s], b) | |
51 | 53 | ||
52 | 54 | ||
53 | - | func | |
55 | + | func y (z,s,A) = makeString(["%s%s%s", z, s, toBase58String(A)], b) | |
54 | 56 | ||
55 | 57 | ||
56 | - | func | |
58 | + | func B (C,D,E,F) = makeString(["%d%d%d%d", toString(C), toString(D), toString(E), toString(F)], b) | |
57 | 59 | ||
58 | 60 | ||
59 | - | let | |
61 | + | let F = valueOrElse(getInteger(this, o), 0) | |
60 | 62 | ||
61 | - | let | |
63 | + | let E = valueOrElse(getInteger(this, p), 0) | |
62 | 64 | ||
63 | - | let | |
65 | + | let G = valueOrElse(getInteger(this, q), 0) | |
64 | 66 | ||
65 | - | let | |
67 | + | let H = valueOrElse(getString(this, k), "WAVES") | |
66 | 68 | ||
67 | - | let | |
69 | + | let I = if ((H == "WAVES")) | |
68 | 70 | then unit | |
69 | - | else fromBase58String( | |
71 | + | else fromBase58String(H) | |
70 | 72 | ||
71 | - | let | |
73 | + | let J = valueOrElse(getInteger(this, m), g) | |
72 | 74 | ||
73 | - | let | |
75 | + | let K = valueOrElse(getInteger(this, l), 0) | |
74 | 76 | ||
75 | - | let | |
77 | + | let L = (K * J) | |
76 | 78 | ||
77 | - | func | |
79 | + | func M (N,O) = (N :+ parseIntValue(O)) | |
78 | 80 | ||
79 | 81 | ||
80 | - | func | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | max([0, ( | |
82 | + | func P (Q) = { | |
83 | + | let R = valueOrElse(getInteger(this, n), height) | |
84 | + | let S = fraction(R, 1, J) | |
85 | + | let T = ((Q / J) - S) | |
86 | + | max([0, (L * T)]) | |
85 | 87 | } | |
86 | 88 | ||
87 | 89 | ||
88 | - | func | |
90 | + | func U () = P(height) | |
89 | 91 | ||
90 | 92 | ||
91 | - | func | |
92 | - | let | |
93 | - | if ($isInstanceOf( | |
93 | + | func V () = { | |
94 | + | let W = I | |
95 | + | if ($isInstanceOf(W, "Unit")) | |
94 | 96 | then { | |
95 | - | let | |
97 | + | let X = W | |
96 | 98 | wavesBalance(this).available | |
97 | 99 | } | |
98 | - | else if ($isInstanceOf( | |
100 | + | else if ($isInstanceOf(W, "ByteVector")) | |
99 | 101 | then { | |
100 | - | let | |
101 | - | assetBalance(this, | |
102 | + | let Y = W | |
103 | + | assetBalance(this, Y) | |
102 | 104 | } | |
103 | 105 | else throw("Match error") | |
104 | 106 | } | |
105 | 107 | ||
106 | 108 | ||
107 | - | func | |
108 | - | let | |
109 | - | let | |
110 | - | if (( | |
109 | + | func Z (aa) = { | |
110 | + | let ab = (E + P(aa)) | |
111 | + | let ac = min([ab, V()]) | |
112 | + | if ((F == 0)) | |
111 | 113 | then 0 | |
112 | - | else | |
114 | + | else ac | |
113 | 115 | } | |
114 | 116 | ||
115 | 117 | ||
116 | - | func | |
117 | - | then fraction(toBigInt( | |
118 | + | func ad (Q) = if ((F != 0)) | |
119 | + | then fraction(toBigInt(Z(Q)), e, toBigInt(F)) | |
118 | 120 | else e | |
119 | 121 | ||
120 | 122 | ||
121 | - | func | |
123 | + | func ae () = ad(height) | |
122 | 124 | ||
123 | 125 | ||
124 | - | func | |
126 | + | func af () = if ((K == 0)) | |
125 | 127 | then 0 | |
126 | - | else fraction(( | |
128 | + | else fraction((V() - Z(height)), 1, K) | |
127 | 129 | ||
128 | 130 | ||
129 | - | func af (r) = { | |
130 | - | let ag = valueOrElse(getString(this, t(r)), "") | |
131 | - | let ah = valueOrElse(getString(this, u(r)), "") | |
132 | - | let ai = if ((ag == "")) | |
133 | - | then nil | |
134 | - | else split(ag, b) | |
131 | + | func ag (s) = { | |
132 | + | let ah = valueOrElse(getString(this, u(s)), "") | |
133 | + | let ai = valueOrElse(getString(this, v(s)), "") | |
135 | 134 | let aj = if ((ah == "")) | |
136 | 135 | then nil | |
137 | 136 | else split(ah, b) | |
138 | - | let ak = { | |
139 | - | let al = aj | |
140 | - | let am = size(al) | |
141 | - | let an = nil | |
142 | - | func ao (ap,aq) = if ((aq >= am)) | |
143 | - | then ap | |
144 | - | else L(ap, al[aq]) | |
137 | + | let ak = if ((ai == "")) | |
138 | + | then nil | |
139 | + | else split(ai, b) | |
140 | + | let al = { | |
141 | + | let am = ak | |
142 | + | let an = size(am) | |
143 | + | let ao = nil | |
144 | + | func ap (aq,ar) = if ((ar >= an)) | |
145 | + | then aq | |
146 | + | else M(aq, am[ar]) | |
145 | 147 | ||
146 | - | func | |
147 | - | then | |
148 | + | func as (aq,ar) = if ((ar >= an)) | |
149 | + | then aq | |
148 | 150 | else throw("List size exceeds 20") | |
149 | 151 | ||
150 | - | | |
152 | + | as(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ao, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
151 | 153 | } | |
152 | - | $Tuple2( | |
154 | + | $Tuple2(aj, al) | |
153 | 155 | } | |
154 | 156 | ||
155 | 157 | ||
156 | - | func | |
158 | + | func at (au,aa) = max([0, toInt(fraction(toBigInt(au), ad(aa), e))]) | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
161 | + | func av (aw,aa) = max([0, toInt(fraction(toBigInt(aw), e, ad(aa)))]) | |
160 | 162 | ||
161 | 163 | ||
162 | - | func | |
164 | + | func ax (s) = valueOrElse(getInteger(this, r(s)), 0) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func | |
167 | + | func ay (s) = valueOrElse(getInteger(this, t(s)), 0) | |
166 | 168 | ||
167 | 169 | ||
168 | - | func | |
169 | - | let | |
170 | - | | |
170 | + | func az (s) = { | |
171 | + | let aA = ax(s) | |
172 | + | at(aA, height) | |
171 | 173 | } | |
172 | 174 | ||
173 | 175 | ||
174 | - | func | |
176 | + | func aB (s) = [DeleteEntry(u(s)), DeleteEntry(v(s))] | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
178 | - | let | |
179 | + | func aC (aD,s,aE) = { | |
180 | + | let aF = [if ((size(aD.payments) == 1)) | |
179 | 181 | then true | |
180 | - | else | |
182 | + | else i("should include 1 payment"), if ((aD.payments[0].assetId == I)) | |
181 | 183 | then true | |
182 | - | else | |
184 | + | else i(("payment should be in " + H)), if ((aD.payments[0].amount > 0)) | |
183 | 185 | then true | |
184 | - | else "payment amount should be greater than 0", if ((size(fromBase58String( | |
186 | + | else "payment amount should be greater than 0", if ((size(fromBase58String(s)) == f)) | |
185 | 187 | then true | |
186 | - | else | |
187 | - | if (( | |
188 | + | else i("user address is not valid")] | |
189 | + | if ((aF == aF)) | |
188 | 190 | then { | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
197 | - | [StringEntry( | |
191 | + | let aG = aD.payments[0].amount | |
192 | + | let aH = av(aG, aE) | |
193 | + | let aA = ax(s) | |
194 | + | let aI = valueOrElse(getInteger(this, x(s)), 0) | |
195 | + | let aJ = (F + aH) | |
196 | + | let aK = at(aJ, aE) | |
197 | + | let aL = (aA + aH) | |
198 | + | let aM = (aI + aG) | |
199 | + | [StringEntry(y("stake", s, aD.transactionId), B(U(), ae(), F, E)), IntegerEntry(o, aJ), IntegerEntry(p, aK), IntegerEntry(r(s), aL), IntegerEntry(x(s), aM), IntegerEntry(n, height)] | |
198 | 200 | } | |
199 | 201 | else throw("Strict value is not equal to itself.") | |
200 | 202 | } | |
201 | 203 | ||
202 | 204 | ||
203 | - | @Callable( | |
204 | - | func stakeForAdmin ( | |
205 | - | let | |
205 | + | @Callable(aD) | |
206 | + | func stakeForAdmin (s,aE) = { | |
207 | + | let aN = [if ((aD.caller == h)) | |
206 | 208 | then true | |
207 | - | else | |
208 | - | if (( | |
209 | - | then | |
209 | + | else i("permission denied")] | |
210 | + | if ((aN == aN)) | |
211 | + | then aC(aD, s, aE) | |
210 | 212 | else throw("Strict value is not equal to itself.") | |
211 | 213 | } | |
212 | 214 | ||
213 | 215 | ||
214 | 216 | ||
215 | - | @Callable( | |
216 | - | func airdrop ( | |
217 | - | func | |
218 | - | then | |
219 | - | else ( | |
217 | + | @Callable(aD) | |
218 | + | func airdrop (aO,aP,aQ) = { | |
219 | + | func aR (aS,aT) = if ((0 > aT)) | |
220 | + | then i("negative amount value in amountList") | |
221 | + | else (aS + aT) | |
220 | 222 | ||
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | func | |
226 | - | then | |
227 | - | else | |
223 | + | let aU = { | |
224 | + | let am = aP | |
225 | + | let an = size(am) | |
226 | + | let ao = 0 | |
227 | + | func ap (aq,ar) = if ((ar >= an)) | |
228 | + | then aq | |
229 | + | else aR(aq, am[ar]) | |
228 | 230 | ||
229 | - | func | |
230 | - | then | |
231 | + | func as (aq,ar) = if ((ar >= an)) | |
232 | + | then aq | |
231 | 233 | else throw("List size exceeds 90") | |
232 | 234 | ||
233 | - | | |
235 | + | as(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ao, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90) | |
234 | 236 | } | |
235 | - | let | |
237 | + | let aN = [if ((aD.caller == h)) | |
236 | 238 | then true | |
237 | - | else | |
239 | + | else i("permission denied"), if ((size(aD.payments) == 1)) | |
238 | 240 | then true | |
239 | - | else | |
241 | + | else i("should include 1 payment"), if ((aD.payments[0].assetId == I)) | |
240 | 242 | then true | |
241 | - | else | |
243 | + | else i(("payment should be in " + H)), if ((aD.payments[0].amount > 0)) | |
242 | 244 | then true | |
243 | - | else "payment amount should be greater than 0", if ((size( | |
245 | + | else "payment amount should be greater than 0", if ((size(aO) == size(aP))) | |
244 | 246 | then true | |
245 | - | else | |
247 | + | else i("addressList should be same size as amountList"), if ((aD.payments[0].amount >= aU)) | |
246 | 248 | then true | |
247 | - | else | |
248 | - | if (( | |
249 | + | else i("payment amount is less than sum of amountList")] | |
250 | + | if ((aN == aN)) | |
249 | 251 | then { | |
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | if ($isInstanceOf( | |
252 | + | func aV (aS,aw) = { | |
253 | + | let aW = aS | |
254 | + | let aX = aW._1 | |
255 | + | let aY = aW._2 | |
256 | + | let aZ = aW._3 | |
257 | + | let ba = aW._4 | |
258 | + | let bb = aO[aY] | |
259 | + | let bc = { | |
260 | + | let W = addressFromString(bb) | |
261 | + | if ($isInstanceOf(W, "Address")) | |
260 | 262 | then { | |
261 | - | let | |
262 | - | | |
263 | + | let bd = W | |
264 | + | bd | |
263 | 265 | } | |
264 | - | else | |
266 | + | else i("invalid address in addressList") | |
265 | 267 | } | |
266 | - | let | |
268 | + | let be = [if (!(containsElement(ba, bc))) | |
267 | 269 | then true | |
268 | - | else | |
269 | - | if (( | |
270 | + | else i("duplicate address is addressList")] | |
271 | + | if ((be == be)) | |
270 | 272 | then { | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | $Tuple4(( | |
273 | + | let bf = av(aw, aQ) | |
274 | + | let bg = t(bb) | |
275 | + | let bh = valueOrElse(getInteger(this, bg), 0) | |
276 | + | $Tuple4((aX :+ IntegerEntry(bg, (bh + bf))), (aY + 1), (aZ + bf), (ba :+ bc)) | |
275 | 277 | } | |
276 | 278 | else throw("Strict value is not equal to itself.") | |
277 | 279 | } | |
278 | 280 | ||
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | func | |
284 | - | then | |
285 | - | else | |
281 | + | let bi = { | |
282 | + | let am = aP | |
283 | + | let an = size(am) | |
284 | + | let ao = $Tuple4(nil, 0, 0, nil) | |
285 | + | func bj (aq,ar) = if ((ar >= an)) | |
286 | + | then aq | |
287 | + | else aV(aq, am[ar]) | |
286 | 288 | ||
287 | - | func | |
288 | - | then | |
289 | + | func bk (aq,ar) = if ((ar >= an)) | |
290 | + | then aq | |
289 | 291 | else throw("List size exceeds 90") | |
290 | 292 | ||
291 | - | bj( | |
293 | + | bk(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(ao, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90) | |
292 | 294 | } | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | ([IntegerEntry( | |
295 | + | let bl = bi._1 | |
296 | + | let bm = bi._2 | |
297 | + | let bn = bi._3 | |
298 | + | let bo = bi._4 | |
299 | + | let bp = at((F + bn), aQ) | |
300 | + | ([IntegerEntry(q, (G + bn)), IntegerEntry(o, (F + bn)), IntegerEntry(p, bp), IntegerEntry(n, height)] ++ bl) | |
299 | 301 | } | |
300 | 302 | else throw("Strict value is not equal to itself.") | |
301 | 303 | } | |
302 | 304 | ||
303 | 305 | ||
304 | 306 | ||
305 | - | @Callable( | |
306 | - | func getUserAssetsREADONLY ( | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | $Tuple2(nil, $Tuple10( | |
307 | + | @Callable(aD) | |
308 | + | func getUserAssetsREADONLY (s) = { | |
309 | + | let aA = ax(s) | |
310 | + | let bq = ay(s) | |
311 | + | let br = at(bq, height) | |
312 | + | let bs = az(s) | |
313 | + | let aI = valueOrElse(getInteger(this, x(s)), 0) | |
314 | + | let bt = valueOrElse(getInteger(this, w(s)), 0) | |
315 | + | let bu = ag(s) | |
316 | + | let bv = bu._1 | |
317 | + | let bw = bu._2 | |
318 | + | $Tuple2(nil, $Tuple10(aA, bs, ae(), aI, bt, bq, br, bv, bw, af())) | |
317 | 319 | } | |
318 | 320 | ||
319 | 321 | ||
320 | 322 | ||
321 | - | @Callable( | |
322 | - | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple6( | |
323 | + | @Callable(aD) | |
324 | + | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple6(F, Z(height), ae(), G, at(G, height), af())) | |
323 | 325 | ||
324 | 326 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "l2mp_staking.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = 1000000000000000000 | |
11 | 11 | ||
12 | 12 | let e = toBigInt(d) | |
13 | 13 | ||
14 | 14 | let f = 26 | |
15 | 15 | ||
16 | 16 | let g = 1440 | |
17 | 17 | ||
18 | - | func h (i) = throw(((a + ": ") + i)) | |
18 | + | let h = addressFromStringValue("3Mps7CZqB9nUbEirYyCMMoA7VbqrxLvJFSB") | |
19 | + | ||
20 | + | func i (j) = throw(((a + ": ") + j)) | |
19 | 21 | ||
20 | 22 | ||
21 | - | let | |
23 | + | let k = makeString(["%s", "assetId"], b) | |
22 | 24 | ||
23 | - | let | |
25 | + | let l = makeString(["%s", "emissionPerBlock"], b) | |
24 | 26 | ||
25 | - | let | |
27 | + | let m = makeString(["%s", "emissionPeriodInBlocks"], b) | |
26 | 28 | ||
27 | - | let | |
29 | + | let n = makeString(["%s", "startBlock"], b) | |
28 | 30 | ||
29 | - | let | |
31 | + | let o = makeString(["%s", "totalLpAmount"], b) | |
30 | 32 | ||
31 | - | let | |
33 | + | let p = makeString(["%s", "totalAssetAmount"], b) | |
32 | 34 | ||
33 | - | let | |
35 | + | let q = makeString(["%s", "totalLockedLpAmount"], b) | |
34 | 36 | ||
35 | - | func | |
37 | + | func r (s) = makeString(["%s%s", "userLpAmount", s], b) | |
36 | 38 | ||
37 | 39 | ||
38 | - | func | |
40 | + | func t (s) = makeString(["%s%s", "userLockedLpAmount", s], b) | |
39 | 41 | ||
40 | 42 | ||
41 | - | func | |
43 | + | func u (s) = makeString(["%s%s", "userStakingNodes", s], b) | |
42 | 44 | ||
43 | 45 | ||
44 | - | func | |
46 | + | func v (s) = makeString(["%s%s", "userStakingNodesShares", s], b) | |
45 | 47 | ||
46 | 48 | ||
47 | - | func | |
49 | + | func w (s) = makeString(["%s%s", "totalAssetWithdrawn", s], b) | |
48 | 50 | ||
49 | 51 | ||
50 | - | func | |
52 | + | func x (s) = makeString(["%s%s", "totalAssetStaked", s], b) | |
51 | 53 | ||
52 | 54 | ||
53 | - | func | |
55 | + | func y (z,s,A) = makeString(["%s%s%s", z, s, toBase58String(A)], b) | |
54 | 56 | ||
55 | 57 | ||
56 | - | func | |
58 | + | func B (C,D,E,F) = makeString(["%d%d%d%d", toString(C), toString(D), toString(E), toString(F)], b) | |
57 | 59 | ||
58 | 60 | ||
59 | - | let | |
61 | + | let F = valueOrElse(getInteger(this, o), 0) | |
60 | 62 | ||
61 | - | let | |
63 | + | let E = valueOrElse(getInteger(this, p), 0) | |
62 | 64 | ||
63 | - | let | |
65 | + | let G = valueOrElse(getInteger(this, q), 0) | |
64 | 66 | ||
65 | - | let | |
67 | + | let H = valueOrElse(getString(this, k), "WAVES") | |
66 | 68 | ||
67 | - | let | |
69 | + | let I = if ((H == "WAVES")) | |
68 | 70 | then unit | |
69 | - | else fromBase58String( | |
71 | + | else fromBase58String(H) | |
70 | 72 | ||
71 | - | let | |
73 | + | let J = valueOrElse(getInteger(this, m), g) | |
72 | 74 | ||
73 | - | let | |
75 | + | let K = valueOrElse(getInteger(this, l), 0) | |
74 | 76 | ||
75 | - | let | |
77 | + | let L = (K * J) | |
76 | 78 | ||
77 | - | func | |
79 | + | func M (N,O) = (N :+ parseIntValue(O)) | |
78 | 80 | ||
79 | 81 | ||
80 | - | func | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | max([0, ( | |
82 | + | func P (Q) = { | |
83 | + | let R = valueOrElse(getInteger(this, n), height) | |
84 | + | let S = fraction(R, 1, J) | |
85 | + | let T = ((Q / J) - S) | |
86 | + | max([0, (L * T)]) | |
85 | 87 | } | |
86 | 88 | ||
87 | 89 | ||
88 | - | func | |
90 | + | func U () = P(height) | |
89 | 91 | ||
90 | 92 | ||
91 | - | func | |
92 | - | let | |
93 | - | if ($isInstanceOf( | |
93 | + | func V () = { | |
94 | + | let W = I | |
95 | + | if ($isInstanceOf(W, "Unit")) | |
94 | 96 | then { | |
95 | - | let | |
97 | + | let X = W | |
96 | 98 | wavesBalance(this).available | |
97 | 99 | } | |
98 | - | else if ($isInstanceOf( | |
100 | + | else if ($isInstanceOf(W, "ByteVector")) | |
99 | 101 | then { | |
100 | - | let | |
101 | - | assetBalance(this, | |
102 | + | let Y = W | |
103 | + | assetBalance(this, Y) | |
102 | 104 | } | |
103 | 105 | else throw("Match error") | |
104 | 106 | } | |
105 | 107 | ||
106 | 108 | ||
107 | - | func | |
108 | - | let | |
109 | - | let | |
110 | - | if (( | |
109 | + | func Z (aa) = { | |
110 | + | let ab = (E + P(aa)) | |
111 | + | let ac = min([ab, V()]) | |
112 | + | if ((F == 0)) | |
111 | 113 | then 0 | |
112 | - | else | |
114 | + | else ac | |
113 | 115 | } | |
114 | 116 | ||
115 | 117 | ||
116 | - | func | |
117 | - | then fraction(toBigInt( | |
118 | + | func ad (Q) = if ((F != 0)) | |
119 | + | then fraction(toBigInt(Z(Q)), e, toBigInt(F)) | |
118 | 120 | else e | |
119 | 121 | ||
120 | 122 | ||
121 | - | func | |
123 | + | func ae () = ad(height) | |
122 | 124 | ||
123 | 125 | ||
124 | - | func | |
126 | + | func af () = if ((K == 0)) | |
125 | 127 | then 0 | |
126 | - | else fraction(( | |
128 | + | else fraction((V() - Z(height)), 1, K) | |
127 | 129 | ||
128 | 130 | ||
129 | - | func af (r) = { | |
130 | - | let ag = valueOrElse(getString(this, t(r)), "") | |
131 | - | let ah = valueOrElse(getString(this, u(r)), "") | |
132 | - | let ai = if ((ag == "")) | |
133 | - | then nil | |
134 | - | else split(ag, b) | |
131 | + | func ag (s) = { | |
132 | + | let ah = valueOrElse(getString(this, u(s)), "") | |
133 | + | let ai = valueOrElse(getString(this, v(s)), "") | |
135 | 134 | let aj = if ((ah == "")) | |
136 | 135 | then nil | |
137 | 136 | else split(ah, b) | |
138 | - | let ak = { | |
139 | - | let al = aj | |
140 | - | let am = size(al) | |
141 | - | let an = nil | |
142 | - | func ao (ap,aq) = if ((aq >= am)) | |
143 | - | then ap | |
144 | - | else L(ap, al[aq]) | |
137 | + | let ak = if ((ai == "")) | |
138 | + | then nil | |
139 | + | else split(ai, b) | |
140 | + | let al = { | |
141 | + | let am = ak | |
142 | + | let an = size(am) | |
143 | + | let ao = nil | |
144 | + | func ap (aq,ar) = if ((ar >= an)) | |
145 | + | then aq | |
146 | + | else M(aq, am[ar]) | |
145 | 147 | ||
146 | - | func | |
147 | - | then | |
148 | + | func as (aq,ar) = if ((ar >= an)) | |
149 | + | then aq | |
148 | 150 | else throw("List size exceeds 20") | |
149 | 151 | ||
150 | - | | |
152 | + | as(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ao, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
151 | 153 | } | |
152 | - | $Tuple2( | |
154 | + | $Tuple2(aj, al) | |
153 | 155 | } | |
154 | 156 | ||
155 | 157 | ||
156 | - | func | |
158 | + | func at (au,aa) = max([0, toInt(fraction(toBigInt(au), ad(aa), e))]) | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
161 | + | func av (aw,aa) = max([0, toInt(fraction(toBigInt(aw), e, ad(aa)))]) | |
160 | 162 | ||
161 | 163 | ||
162 | - | func | |
164 | + | func ax (s) = valueOrElse(getInteger(this, r(s)), 0) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func | |
167 | + | func ay (s) = valueOrElse(getInteger(this, t(s)), 0) | |
166 | 168 | ||
167 | 169 | ||
168 | - | func | |
169 | - | let | |
170 | - | | |
170 | + | func az (s) = { | |
171 | + | let aA = ax(s) | |
172 | + | at(aA, height) | |
171 | 173 | } | |
172 | 174 | ||
173 | 175 | ||
174 | - | func | |
176 | + | func aB (s) = [DeleteEntry(u(s)), DeleteEntry(v(s))] | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
178 | - | let | |
179 | + | func aC (aD,s,aE) = { | |
180 | + | let aF = [if ((size(aD.payments) == 1)) | |
179 | 181 | then true | |
180 | - | else | |
182 | + | else i("should include 1 payment"), if ((aD.payments[0].assetId == I)) | |
181 | 183 | then true | |
182 | - | else | |
184 | + | else i(("payment should be in " + H)), if ((aD.payments[0].amount > 0)) | |
183 | 185 | then true | |
184 | - | else "payment amount should be greater than 0", if ((size(fromBase58String( | |
186 | + | else "payment amount should be greater than 0", if ((size(fromBase58String(s)) == f)) | |
185 | 187 | then true | |
186 | - | else | |
187 | - | if (( | |
188 | + | else i("user address is not valid")] | |
189 | + | if ((aF == aF)) | |
188 | 190 | then { | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
197 | - | [StringEntry( | |
191 | + | let aG = aD.payments[0].amount | |
192 | + | let aH = av(aG, aE) | |
193 | + | let aA = ax(s) | |
194 | + | let aI = valueOrElse(getInteger(this, x(s)), 0) | |
195 | + | let aJ = (F + aH) | |
196 | + | let aK = at(aJ, aE) | |
197 | + | let aL = (aA + aH) | |
198 | + | let aM = (aI + aG) | |
199 | + | [StringEntry(y("stake", s, aD.transactionId), B(U(), ae(), F, E)), IntegerEntry(o, aJ), IntegerEntry(p, aK), IntegerEntry(r(s), aL), IntegerEntry(x(s), aM), IntegerEntry(n, height)] | |
198 | 200 | } | |
199 | 201 | else throw("Strict value is not equal to itself.") | |
200 | 202 | } | |
201 | 203 | ||
202 | 204 | ||
203 | - | @Callable( | |
204 | - | func stakeForAdmin ( | |
205 | - | let | |
205 | + | @Callable(aD) | |
206 | + | func stakeForAdmin (s,aE) = { | |
207 | + | let aN = [if ((aD.caller == h)) | |
206 | 208 | then true | |
207 | - | else | |
208 | - | if (( | |
209 | - | then | |
209 | + | else i("permission denied")] | |
210 | + | if ((aN == aN)) | |
211 | + | then aC(aD, s, aE) | |
210 | 212 | else throw("Strict value is not equal to itself.") | |
211 | 213 | } | |
212 | 214 | ||
213 | 215 | ||
214 | 216 | ||
215 | - | @Callable( | |
216 | - | func airdrop ( | |
217 | - | func | |
218 | - | then | |
219 | - | else ( | |
217 | + | @Callable(aD) | |
218 | + | func airdrop (aO,aP,aQ) = { | |
219 | + | func aR (aS,aT) = if ((0 > aT)) | |
220 | + | then i("negative amount value in amountList") | |
221 | + | else (aS + aT) | |
220 | 222 | ||
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | func | |
226 | - | then | |
227 | - | else | |
223 | + | let aU = { | |
224 | + | let am = aP | |
225 | + | let an = size(am) | |
226 | + | let ao = 0 | |
227 | + | func ap (aq,ar) = if ((ar >= an)) | |
228 | + | then aq | |
229 | + | else aR(aq, am[ar]) | |
228 | 230 | ||
229 | - | func | |
230 | - | then | |
231 | + | func as (aq,ar) = if ((ar >= an)) | |
232 | + | then aq | |
231 | 233 | else throw("List size exceeds 90") | |
232 | 234 | ||
233 | - | | |
235 | + | as(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ap(ao, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90) | |
234 | 236 | } | |
235 | - | let | |
237 | + | let aN = [if ((aD.caller == h)) | |
236 | 238 | then true | |
237 | - | else | |
239 | + | else i("permission denied"), if ((size(aD.payments) == 1)) | |
238 | 240 | then true | |
239 | - | else | |
241 | + | else i("should include 1 payment"), if ((aD.payments[0].assetId == I)) | |
240 | 242 | then true | |
241 | - | else | |
243 | + | else i(("payment should be in " + H)), if ((aD.payments[0].amount > 0)) | |
242 | 244 | then true | |
243 | - | else "payment amount should be greater than 0", if ((size( | |
245 | + | else "payment amount should be greater than 0", if ((size(aO) == size(aP))) | |
244 | 246 | then true | |
245 | - | else | |
247 | + | else i("addressList should be same size as amountList"), if ((aD.payments[0].amount >= aU)) | |
246 | 248 | then true | |
247 | - | else | |
248 | - | if (( | |
249 | + | else i("payment amount is less than sum of amountList")] | |
250 | + | if ((aN == aN)) | |
249 | 251 | then { | |
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | if ($isInstanceOf( | |
252 | + | func aV (aS,aw) = { | |
253 | + | let aW = aS | |
254 | + | let aX = aW._1 | |
255 | + | let aY = aW._2 | |
256 | + | let aZ = aW._3 | |
257 | + | let ba = aW._4 | |
258 | + | let bb = aO[aY] | |
259 | + | let bc = { | |
260 | + | let W = addressFromString(bb) | |
261 | + | if ($isInstanceOf(W, "Address")) | |
260 | 262 | then { | |
261 | - | let | |
262 | - | | |
263 | + | let bd = W | |
264 | + | bd | |
263 | 265 | } | |
264 | - | else | |
266 | + | else i("invalid address in addressList") | |
265 | 267 | } | |
266 | - | let | |
268 | + | let be = [if (!(containsElement(ba, bc))) | |
267 | 269 | then true | |
268 | - | else | |
269 | - | if (( | |
270 | + | else i("duplicate address is addressList")] | |
271 | + | if ((be == be)) | |
270 | 272 | then { | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | $Tuple4(( | |
273 | + | let bf = av(aw, aQ) | |
274 | + | let bg = t(bb) | |
275 | + | let bh = valueOrElse(getInteger(this, bg), 0) | |
276 | + | $Tuple4((aX :+ IntegerEntry(bg, (bh + bf))), (aY + 1), (aZ + bf), (ba :+ bc)) | |
275 | 277 | } | |
276 | 278 | else throw("Strict value is not equal to itself.") | |
277 | 279 | } | |
278 | 280 | ||
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | func | |
284 | - | then | |
285 | - | else | |
281 | + | let bi = { | |
282 | + | let am = aP | |
283 | + | let an = size(am) | |
284 | + | let ao = $Tuple4(nil, 0, 0, nil) | |
285 | + | func bj (aq,ar) = if ((ar >= an)) | |
286 | + | then aq | |
287 | + | else aV(aq, am[ar]) | |
286 | 288 | ||
287 | - | func | |
288 | - | then | |
289 | + | func bk (aq,ar) = if ((ar >= an)) | |
290 | + | then aq | |
289 | 291 | else throw("List size exceeds 90") | |
290 | 292 | ||
291 | - | bj( | |
293 | + | bk(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(bj(ao, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90) | |
292 | 294 | } | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | ([IntegerEntry( | |
295 | + | let bl = bi._1 | |
296 | + | let bm = bi._2 | |
297 | + | let bn = bi._3 | |
298 | + | let bo = bi._4 | |
299 | + | let bp = at((F + bn), aQ) | |
300 | + | ([IntegerEntry(q, (G + bn)), IntegerEntry(o, (F + bn)), IntegerEntry(p, bp), IntegerEntry(n, height)] ++ bl) | |
299 | 301 | } | |
300 | 302 | else throw("Strict value is not equal to itself.") | |
301 | 303 | } | |
302 | 304 | ||
303 | 305 | ||
304 | 306 | ||
305 | - | @Callable( | |
306 | - | func getUserAssetsREADONLY ( | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | $Tuple2(nil, $Tuple10( | |
307 | + | @Callable(aD) | |
308 | + | func getUserAssetsREADONLY (s) = { | |
309 | + | let aA = ax(s) | |
310 | + | let bq = ay(s) | |
311 | + | let br = at(bq, height) | |
312 | + | let bs = az(s) | |
313 | + | let aI = valueOrElse(getInteger(this, x(s)), 0) | |
314 | + | let bt = valueOrElse(getInteger(this, w(s)), 0) | |
315 | + | let bu = ag(s) | |
316 | + | let bv = bu._1 | |
317 | + | let bw = bu._2 | |
318 | + | $Tuple2(nil, $Tuple10(aA, bs, ae(), aI, bt, bq, br, bv, bw, af())) | |
317 | 319 | } | |
318 | 320 | ||
319 | 321 | ||
320 | 322 | ||
321 | - | @Callable( | |
322 | - | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple6( | |
323 | + | @Callable(aD) | |
324 | + | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple6(F, Z(height), ae(), G, at(G, height), af())) | |
323 | 325 | ||
324 | 326 |
github/deemru/w8io/026f985 258.82 ms ◑