tx · Ej5mXpi8bmLQ8jkfvvxwTSaZ9LkQi4nqSUtVocHjGMfE 3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq: -0.16000000 Waves 2023.07.31 15:24 [2690055] smart account 3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq > SELF 0.00000000 Waves
{ "type": 13, "id": "Ej5mXpi8bmLQ8jkfvvxwTSaZ9LkQi4nqSUtVocHjGMfE", "fee": 16000000, "feeAssetId": null, "timestamp": 1690806218192, "version": 2, "chainId": 84, "sender": "3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq", "senderPublicKey": "57SkjQUEwC1ayCqLbXLuzBqifK6B6SR6rfxtGsbAo3zW", "proofs": [ "4Etp4civJHTYPSdUykKSz2PM32GtAQHf9q65A6afM2ED8fNxkB9hainyEXxDaU5QspAY9o4BLz8xXSz54RqKxTKU" ], "script": "base64:BgIkCAISAwoBARIDCgEBEgASAwoBCBIDCgEBEgMKAQgSABIDCgEIMgAMY29udHJhY3RGaWxlAhFsMm1wX3N0YWtpbmcucmlkZQADU0VQAgJfXwAGc2NhbGU4AIDC1y8AB3NjYWxlMTgAgICQu7rWrfANAA1zY2FsZTE4QmlnSW50CQC2AgEFB3NjYWxlMTgAEkFERFJFU1NfQllURVNfU0laRQAaAA1CTE9DS1NfSU5fREFZAKALAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQABNrZXlFbWlzc2lvblBlckJsb2NrCQC5CQIJAMwIAgICJXMJAMwIAgIQZW1pc3Npb25QZXJCbG9jawUDbmlsBQNTRVAAGWtleUVtaXNzaW9uUGVyaW9kSW5CbG9ja3MJALkJAgkAzAgCAgIlcwkAzAgCAhZlbWlzc2lvblBlcmlvZEluQmxvY2tzBQNuaWwFA1NFUAANa2V5U3RhcnRCbG9jawkAuQkCC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mLgECdHgBBnZlcmlmeQAECGJ5QWRtaW5zCQAAAggFAnR4AmlkCQDZBAEJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBDmtleUFsbG93ZWRUeElkAAIABAdieU93bmVyAwkAZwIJAJADAQkBDWdldEFkbWluc0xpc3QABQZRVU9SVU0HCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5AwUIYnlBZG1pbnMGBQdieU93bmVyRoGTgQ==", "height": 2690055, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GNgVpsstBv7bavKTgTETGZYsy6cQaeSpTNXBXTYkAZgf Next: 7vWYwan9jcdEdRYtSZsqJWFF7WB9HV4sY8WE5PbwmLuB Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = " | |
4 | + | let a = "l2mp_staking.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = 1000000000000000000 | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = toBigInt(d) | |
13 | 13 | ||
14 | - | func f (g) = throw(((a + ": ") + g)) | |
14 | + | let f = 26 | |
15 | + | ||
16 | + | let g = 1440 | |
17 | + | ||
18 | + | func h (i) = throw(((a + ": ") + i)) | |
15 | 19 | ||
16 | 20 | ||
17 | - | let | |
21 | + | let j = makeString(["%s", "assetId"], b) | |
18 | 22 | ||
19 | - | let | |
23 | + | let k = makeString(["%s", "emissionPerBlock"], b) | |
20 | 24 | ||
21 | - | let | |
25 | + | let l = makeString(["%s", "emissionPeriodInBlocks"], b) | |
22 | 26 | ||
23 | - | let | |
27 | + | let m = makeString(["%s", "startBlock"], b) | |
24 | 28 | ||
25 | - | let | |
29 | + | let n = makeString(["%s", "totalLpAmount"], b) | |
26 | 30 | ||
27 | - | let | |
31 | + | let o = makeString(["%s", "totalAssetAmount"], b) | |
28 | 32 | ||
29 | - | func | |
33 | + | func p (q) = makeString(["%s%s", "userLpAmount", q], b) | |
30 | 34 | ||
31 | 35 | ||
32 | - | func | |
36 | + | func r (q) = makeString(["%s%s", "totalAssetWithdrawn", q], b) | |
33 | 37 | ||
34 | 38 | ||
35 | - | func | |
39 | + | func s (q) = makeString(["%s%s", "totalAssetStaked", q], b) | |
36 | 40 | ||
37 | 41 | ||
38 | - | let r = valueOrElse(getInteger(this, l), 0) | |
39 | - | ||
40 | - | let s = valueOrElse(getInteger(this, m), 0) | |
41 | - | ||
42 | - | let t = valueOrElse(getString(this, h), "WAVES") | |
43 | - | ||
44 | - | let u = if ((t == "WAVES")) | |
45 | - | then unit | |
46 | - | else fromBase58String(t) | |
47 | - | ||
48 | - | let v = valueOrElse(getInteger(this, j), e) | |
49 | - | ||
50 | - | let w = (valueOrElse(getInteger(this, i), 0) * v) | |
51 | - | ||
52 | - | let x = fraction(height, 1, v) | |
53 | - | ||
54 | - | let y = 5 | |
55 | - | ||
56 | - | let z = 3 | |
57 | - | ||
58 | - | let A = 32 | |
59 | - | ||
60 | - | func B (C) = makeString(["%s%s%s", "allowTxId", C], b) | |
42 | + | func t (u,q,v) = makeString(["%s%s%s", u, q, toBase58String(v)], b) | |
61 | 43 | ||
62 | 44 | ||
63 | - | func | |
45 | + | func w (x,y,z,A) = makeString(["%d%d", toString(x), toString(y), toString(z), toString(A)], b) | |
64 | 46 | ||
65 | 47 | ||
66 | - | func G () = makeString(["%s", "adminAddressList"], b) | |
48 | + | let A = valueOrElse(getInteger(this, n), 0) | |
49 | + | ||
50 | + | let z = valueOrElse(getInteger(this, o), 0) | |
51 | + | ||
52 | + | let B = valueOrElse(getString(this, j), "WAVES") | |
53 | + | ||
54 | + | let C = if ((B == "WAVES")) | |
55 | + | then unit | |
56 | + | else fromBase58String(B) | |
57 | + | ||
58 | + | let D = valueOrElse(getInteger(this, l), g) | |
59 | + | ||
60 | + | let E = (valueOrElse(getInteger(this, k), 0) * D) | |
61 | + | ||
62 | + | let F = 5 | |
63 | + | ||
64 | + | let G = 3 | |
65 | + | ||
66 | + | let H = 32 | |
67 | + | ||
68 | + | func I (v) = makeString(["%s%s%s", "allowTxId", v], b) | |
67 | 69 | ||
68 | 70 | ||
69 | - | func | |
71 | + | func J (K,L) = makeString([K, L], b) | |
70 | 72 | ||
71 | 73 | ||
72 | - | func I (E,J) = { | |
73 | - | let K = D(E, J) | |
74 | - | valueOrElse(getInteger(K), 0) | |
74 | + | func M () = makeString(["%s", "adminAddressList"], b) | |
75 | + | ||
76 | + | ||
77 | + | func N () = makeString(["%s", "txId"], b) | |
78 | + | ||
79 | + | ||
80 | + | func O (K,P) = { | |
81 | + | let Q = J(K, P) | |
82 | + | valueOrElse(getInteger(Q), 0) | |
75 | 83 | } | |
76 | 84 | ||
77 | 85 | ||
78 | - | func | |
79 | - | let | |
80 | - | if ($isInstanceOf( | |
86 | + | func R () = { | |
87 | + | let S = getString(this, M()) | |
88 | + | if ($isInstanceOf(S, "String")) | |
81 | 89 | then { | |
82 | - | let | |
83 | - | split( | |
90 | + | let T = S | |
91 | + | split(T, b) | |
84 | 92 | } | |
85 | 93 | else nil | |
86 | 94 | } | |
87 | 95 | ||
88 | 96 | ||
89 | - | func | |
97 | + | func U (V) = containsElement(R(), V) | |
90 | 98 | ||
91 | 99 | ||
92 | - | func | |
93 | - | let | |
94 | - | let | |
95 | - | let | |
96 | - | $Tuple2(( | |
100 | + | func W (X,L) = { | |
101 | + | let Y = X | |
102 | + | let Z = Y._1 | |
103 | + | let K = Y._2 | |
104 | + | $Tuple2((Z :+ J(K, L)), K) | |
97 | 105 | } | |
98 | 106 | ||
99 | 107 | ||
100 | - | func | |
101 | - | let | |
102 | - | let | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | func | |
107 | - | then | |
108 | - | else | |
108 | + | func aa (ab) = { | |
109 | + | let ac = M() | |
110 | + | let ad = { | |
111 | + | let ae = R() | |
112 | + | let af = size(ae) | |
113 | + | let ag = $Tuple2(nil, ab) | |
114 | + | func ah (ai,aj) = if ((aj >= af)) | |
115 | + | then ai | |
116 | + | else W(ai, ae[aj]) | |
109 | 117 | ||
110 | - | func | |
111 | - | then | |
118 | + | func ak (ai,aj) = if ((aj >= af)) | |
119 | + | then ai | |
112 | 120 | else throw("List size exceeds 5") | |
113 | 121 | ||
114 | - | | |
122 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
115 | 123 | } | |
116 | - | let | |
117 | - | let | |
118 | - | | |
124 | + | let Z = ad._1 | |
125 | + | let K = ad._2 | |
126 | + | Z | |
119 | 127 | } | |
120 | 128 | ||
121 | 129 | ||
122 | - | func | |
130 | + | func al (Z,Q) = (Z + valueOrElse(getInteger(Q), 0)) | |
123 | 131 | ||
124 | 132 | ||
125 | - | func | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | func | |
131 | - | then | |
132 | - | else | |
133 | + | func am (K) = { | |
134 | + | let an = aa(K) | |
135 | + | let ae = an | |
136 | + | let af = size(ae) | |
137 | + | let ag = 0 | |
138 | + | func ah (ai,aj) = if ((aj >= af)) | |
139 | + | then ai | |
140 | + | else al(ai, ae[aj]) | |
133 | 141 | ||
134 | - | func | |
135 | - | then | |
142 | + | func ak (ai,aj) = if ((aj >= af)) | |
143 | + | then ai | |
136 | 144 | else throw("List size exceeds 5") | |
137 | 145 | ||
138 | - | | |
146 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
139 | 147 | } | |
140 | 148 | ||
141 | 149 | ||
142 | - | func | |
150 | + | func ao (Z,ap) = (Z :+ DeleteEntry(ap)) | |
143 | 151 | ||
144 | 152 | ||
145 | - | func | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | func | |
151 | - | then | |
152 | - | else ai | |
153 | + | func aq (K) = { | |
154 | + | let an = aa(K) | |
155 | + | let ae = an | |
156 | + | let af = size(ae) | |
157 | + | let ag = nil | |
158 | + | func ah (ai,aj) = if ((aj >= af)) | |
159 | + | then ai | |
160 | + | else ao(ai, ae[aj]) | |
153 | 161 | ||
154 | - | func | |
155 | - | then | |
162 | + | func ak (ai,aj) = if ((aj >= af)) | |
163 | + | then ai | |
156 | 164 | else throw("List size exceeds 5") | |
157 | 165 | ||
158 | - | | |
166 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
159 | 167 | } | |
160 | 168 | ||
161 | 169 | ||
162 | - | func | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | then | |
167 | - | else if (( | |
168 | - | then | |
170 | + | func ar (as,ab,at,au) = { | |
171 | + | let Q = J(ab, as) | |
172 | + | let av = O(ab, as) | |
173 | + | let aw = if (!(U(as))) | |
174 | + | then h((("Address: " + as) + " not in Admin list")) | |
175 | + | else if ((av == 1)) | |
176 | + | then h((Q + " you already voted")) | |
169 | 177 | else unit | |
170 | - | if (( | |
178 | + | if ((aw == aw)) | |
171 | 179 | then { | |
172 | - | let | |
173 | - | if ((( | |
180 | + | let an = am(ab) | |
181 | + | if (((an + 1) >= at)) | |
174 | 182 | then { | |
175 | - | let | |
176 | - | ( | |
183 | + | let ax = aq(ab) | |
184 | + | (ax ++ au) | |
177 | 185 | } | |
178 | - | else [IntegerEntry( | |
186 | + | else [IntegerEntry(Q, 1)] | |
179 | 187 | } | |
180 | 188 | else throw("Strict value is not equal to itself.") | |
181 | 189 | } | |
182 | 190 | ||
183 | 191 | ||
184 | - | func | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | max([0, ( | |
192 | + | func ay (az) = { | |
193 | + | let aA = valueOrElse(getInteger(this, m), 0) | |
194 | + | let aB = fraction(aA, 1, D) | |
195 | + | let aC = ((az / D) - aB) | |
196 | + | max([0, (E * aC)]) | |
189 | 197 | } | |
190 | 198 | ||
191 | 199 | ||
192 | - | func aw () = { | |
193 | - | let ax = (s + as()) | |
194 | - | let ay = { | |
195 | - | let M = u | |
196 | - | if ($isInstanceOf(M, "Unit")) | |
200 | + | func aD () = ay(height) | |
201 | + | ||
202 | + | ||
203 | + | func aE () = { | |
204 | + | let aF = (z + aD()) | |
205 | + | let aG = { | |
206 | + | let S = C | |
207 | + | if ($isInstanceOf(S, "Unit")) | |
197 | 208 | then { | |
198 | - | let | |
199 | - | min([ | |
209 | + | let aH = S | |
210 | + | min([aF, wavesBalance(this).available]) | |
200 | 211 | } | |
201 | - | else if ($isInstanceOf( | |
212 | + | else if ($isInstanceOf(S, "ByteVector")) | |
202 | 213 | then { | |
203 | - | let | |
204 | - | min([ | |
214 | + | let aI = S | |
215 | + | min([aF, assetBalance(this, aI)]) | |
205 | 216 | } | |
206 | 217 | else throw("Match error") | |
207 | 218 | } | |
208 | - | if (( | |
219 | + | if ((A == 0)) | |
209 | 220 | then 0 | |
210 | - | else | |
221 | + | else aG | |
211 | 222 | } | |
212 | 223 | ||
213 | 224 | ||
214 | - | func | |
215 | - | then fraction( | |
216 | - | else | |
225 | + | func aJ () = if ((A != 0)) | |
226 | + | then fraction(toBigInt(aE()), e, toBigInt(A)) | |
227 | + | else e | |
217 | 228 | ||
218 | 229 | ||
219 | - | func | |
230 | + | func aK (q) = valueOrElse(getInteger(this, p(q)), 0) | |
220 | 231 | ||
221 | 232 | ||
222 | - | func | |
223 | - | let | |
224 | - | let | |
225 | - | | |
226 | - | | |
227 | - | | |
233 | + | func aL (q) = { | |
234 | + | let aM = aK(q) | |
235 | + | let aN = toInt(fraction(toBigInt(aM), aJ(), e)) | |
236 | + | let aO = toInt(fraction(toBigInt(aN), e, aJ())) | |
237 | + | let aP = toInt(fraction(toBigInt(aO), aJ(), e)) | |
238 | + | max([0, min([aN, aO])]) | |
228 | 239 | } | |
229 | 240 | ||
230 | 241 | ||
231 | - | func | |
232 | - | let | |
242 | + | func aQ (aR,q) = { | |
243 | + | let aS = [if ((size(aR.payments) == 1)) | |
233 | 244 | then true | |
234 | - | else | |
245 | + | else h("should include 1 payment"), if ((aR.payments[0].assetId == C)) | |
235 | 246 | then true | |
236 | - | else | |
247 | + | else h(("payment should be in " + B)), if ((aR.payments[0].amount > 0)) | |
237 | 248 | then true | |
238 | 249 | else "payment amount should be greater than 0"] | |
239 | - | if (( | |
250 | + | if ((aS == aS)) | |
240 | 251 | then { | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | then [IntegerEntry( | |
252 | + | let aT = aR.payments[0].amount | |
253 | + | let aU = toInt(fraction(toBigInt(aT), e, aJ())) | |
254 | + | let aM = aK(q) | |
255 | + | let aV = valueOrElse(getInteger(this, s(q)), 0) | |
256 | + | let aW = (A + aU) | |
257 | + | let aX = (z + aT) | |
258 | + | let aY = (aM + aU) | |
259 | + | let aZ = (aV + aT) | |
260 | + | let ba = if ((A == 0)) | |
261 | + | then [IntegerEntry(m, height)] | |
251 | 262 | else nil | |
252 | - | ([ | |
263 | + | ([StringEntry(t("stake", q, aR.transactionId), w(aD(), aJ(), A, z)), IntegerEntry(n, aW), IntegerEntry(o, aX), IntegerEntry(p(q), aY), IntegerEntry(s(q), aZ)] ++ ba) | |
253 | 264 | } | |
254 | 265 | else throw("Strict value is not equal to itself.") | |
255 | 266 | } | |
256 | 267 | ||
257 | 268 | ||
258 | - | func | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
269 | + | func bb (aR,bc) = { | |
270 | + | let q = toString(aR.caller) | |
271 | + | let aM = aK(q) | |
272 | + | let bd = [if ((bc > 0)) | |
262 | 273 | then true | |
263 | - | else | |
274 | + | else h("LP amount should be more than 0"), if ((aM >= bc)) | |
264 | 275 | then true | |
265 | - | else | |
266 | - | if (( | |
276 | + | else h((("cannot withdraw more than available LP (" + toString(aM)) + ")"))] | |
277 | + | if ((bd == bd)) | |
267 | 278 | then { | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | [IntegerEntry( | |
279 | + | let aY = (aM - bc) | |
280 | + | let be = toInt(fraction(toBigInt(bc), aJ(), e)) | |
281 | + | let aW = (A - bc) | |
282 | + | let aX = toInt(fraction(toBigInt(aW), aJ(), e)) | |
283 | + | let bf = valueOrElse(getInteger(this, r(q)), 0) | |
284 | + | let bg = (bf + be) | |
285 | + | [StringEntry(t("withdraw", q, aR.transactionId), w(aD(), aJ(), A, z)), IntegerEntry(n, aW), IntegerEntry(o, aX), IntegerEntry(p(q), aY), IntegerEntry(r(q), bg), IntegerEntry(m, height), ScriptTransfer(aR.caller, be, C)] | |
275 | 286 | } | |
276 | 287 | else throw("Strict value is not equal to itself.") | |
277 | 288 | } | |
278 | 289 | ||
279 | 290 | ||
280 | - | @Callable( | |
281 | - | func setEmissionPerBlock ( | |
282 | - | let | |
291 | + | @Callable(aR) | |
292 | + | func setEmissionPerBlock (bh) = { | |
293 | + | let bd = [if ((aR.caller == this)) | |
283 | 294 | then true | |
284 | - | else | |
285 | - | if (( | |
286 | - | then [IntegerEntry(m, | |
295 | + | else h("permission denied")] | |
296 | + | if ((bd == bd)) | |
297 | + | then [IntegerEntry(o, aE()), IntegerEntry(m, height), IntegerEntry(k, max([0, bh]))] | |
287 | 298 | else throw("Strict value is not equal to itself.") | |
288 | 299 | } | |
289 | 300 | ||
290 | 301 | ||
291 | 302 | ||
292 | - | @Callable(aH) | |
293 | - | func stake () = aG(aH, toString(aH.caller)) | |
294 | - | ||
295 | - | ||
296 | - | ||
297 | - | @Callable(aH) | |
298 | - | func stakeFor (o) = { | |
299 | - | let aT = [if ((size(fromBase58String(o)) == d)) | |
303 | + | @Callable(aR) | |
304 | + | func setEmissionPeriodInBlocks (bi) = { | |
305 | + | let bd = [if ((bi > 0)) | |
300 | 306 | then true | |
301 | - | else f("address is not valid")] | |
302 | - | if ((aT == aT)) | |
303 | - | then aG(aH, o) | |
307 | + | else h("emission period should be greater than 0"), if ((aR.caller == this)) | |
308 | + | then true | |
309 | + | else h("permission denied")] | |
310 | + | if ((bd == bd)) | |
311 | + | then [IntegerEntry(o, aE()), IntegerEntry(m, height), IntegerEntry(l, bi)] | |
304 | 312 | else throw("Strict value is not equal to itself.") | |
305 | 313 | } | |
306 | 314 | ||
307 | 315 | ||
308 | 316 | ||
309 | - | @Callable( | |
310 | - | func | |
311 | - | ||
312 | - | ||
313 | - | ||
314 | - | ||
315 | - | ||
316 | - | let | |
317 | + | @Callable(aR) | |
318 | + | func stake () = aQ(aR, toString(aR.caller)) | |
319 | + | ||
320 | + | ||
321 | + | ||
322 | + | @Callable(aR) | |
323 | + | func stakeFor (q) = { | |
324 | + | let bd = [if ((size(fromBase58String(q)) == f)) | |
317 | 325 | then true | |
318 | - | else f("withdraw amount should be more than 0"), if ((aF >= aU)) | |
319 | - | then true | |
320 | - | else f((("cannot withdraw more than available (" + toString(aF)) + ")")), if ((aU >= aZ)) | |
321 | - | then true | |
322 | - | else f((("withdraw amount is too small. Min: (" + toString(aZ)) + ")"))] | |
323 | - | if ((aT == aT)) | |
324 | - | then aR(aH, aY) | |
326 | + | else h("address is not valid")] | |
327 | + | if ((bd == bd)) | |
328 | + | then aQ(aR, q) | |
325 | 329 | else throw("Strict value is not equal to itself.") | |
326 | 330 | } | |
327 | 331 | ||
328 | 332 | ||
329 | 333 | ||
330 | - | @Callable(aH) | |
331 | - | func getUserAssetsREADONLY (o) = { | |
332 | - | let aE = aC(o) | |
333 | - | let aF = aD(o) | |
334 | - | let aL = valueOrElse(getInteger(this, q(o)), 0) | |
335 | - | let aV = valueOrElse(getInteger(this, p(o)), 0) | |
336 | - | $Tuple2(nil, $Tuple5(aE, aF, aB(), aL, aV)) | |
334 | + | @Callable(aR) | |
335 | + | func withdraw (be) = { | |
336 | + | let q = toString(aR.caller) | |
337 | + | let aM = aK(q) | |
338 | + | let bj = toInt(fraction(toBigInt(be), e, aJ())) | |
339 | + | let aN = aL(q) | |
340 | + | let bk = toInt(fraction(aJ(), toBigInt(1), e, CEILING)) | |
341 | + | let bd = [if ((be > 0)) | |
342 | + | then true | |
343 | + | else h("withdraw amount should be more than 0"), if ((aN >= be)) | |
344 | + | then true | |
345 | + | else h((("cannot withdraw more than available (" + toString(aN)) + ")")), if ((be >= bk)) | |
346 | + | then true | |
347 | + | else h((("withdraw amount is too small. Min: (" + toString(bk)) + ")"))] | |
348 | + | if ((bd == bd)) | |
349 | + | then bb(aR, bj) | |
350 | + | else throw("Strict value is not equal to itself.") | |
337 | 351 | } | |
338 | 352 | ||
339 | 353 | ||
340 | 354 | ||
341 | - | @Callable(aH) | |
342 | - | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(r, aw(), aB())) | |
355 | + | @Callable(aR) | |
356 | + | func getUserAssetsREADONLY (q) = { | |
357 | + | let aM = aK(q) | |
358 | + | let aN = aL(q) | |
359 | + | let aV = valueOrElse(getInteger(this, s(q)), 0) | |
360 | + | let bf = valueOrElse(getInteger(this, r(q)), 0) | |
361 | + | $Tuple2(nil, $Tuple5(aM, aN, aJ(), aV, bf)) | |
362 | + | } | |
343 | 363 | ||
344 | 364 | ||
345 | 365 | ||
346 | - | @Callable(aH) | |
347 | - | func voteForTxId (C) = { | |
348 | - | let am = toBase58String(aH.caller.bytes) | |
349 | - | let V = B(C) | |
350 | - | let T = [StringEntry(H(), C)] | |
351 | - | let ba = getString(this, H()) | |
352 | - | let aq = [if ((size(fromBase58String(C)) == A)) | |
366 | + | @Callable(aR) | |
367 | + | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(A, aE(), aJ())) | |
368 | + | ||
369 | + | ||
370 | + | ||
371 | + | @Callable(aR) | |
372 | + | func voteForTxId (v) = { | |
373 | + | let as = toBase58String(aR.caller.bytes) | |
374 | + | let ab = I(v) | |
375 | + | let Z = [StringEntry(N(), v)] | |
376 | + | let bl = getString(this, N()) | |
377 | + | let aw = [if ((size(fromBase58String(v)) == H)) | |
353 | 378 | then true | |
354 | - | else | |
379 | + | else h((v + " is not valid txId")), if (if ((bl == unit)) | |
355 | 380 | then true | |
356 | - | else (value( | |
381 | + | else (value(bl) != v)) | |
357 | 382 | then true | |
358 | - | else | |
359 | - | if (( | |
360 | - | then | |
383 | + | else h((v + " is already allowed"))] | |
384 | + | if ((aw == aw)) | |
385 | + | then ar(as, ab, G, Z) | |
361 | 386 | else throw("Strict value is not equal to itself.") | |
362 | 387 | } | |
363 | 388 | ||
364 | 389 | ||
365 | - | @Verifier( | |
366 | - | func | |
367 | - | let | |
368 | - | let | |
390 | + | @Verifier(bm) | |
391 | + | func bn () = { | |
392 | + | let bo = (bm.id == fromBase58String(valueOrElse(getString(this, N()), ""))) | |
393 | + | let bp = if ((size(R()) >= G)) | |
369 | 394 | then false | |
370 | - | else sigVerify( | |
371 | - | if ( | |
395 | + | else sigVerify(bm.bodyBytes, bm.proofs[0], bm.senderPublicKey) | |
396 | + | if (bo) | |
372 | 397 | then true | |
373 | - | else | |
398 | + | else bp | |
374 | 399 | } | |
375 | 400 |
github/deemru/w8io/169f3d6 134.61 ms ◑