tx · J7teaWohvqdtLqRFwkWHtSZ62YgprYcBYiH7CLaHEgpF 3MqySDQxn5jzBUc144oks9fQzAXCBvJ2B8Y: -0.01000000 Waves 2021.08.25 20:01 [1674128] smart account 3MqySDQxn5jzBUc144oks9fQzAXCBvJ2B8Y > SELF 0.00000000 Waves
{ "type": 13, "id": "J7teaWohvqdtLqRFwkWHtSZ62YgprYcBYiH7CLaHEgpF", "fee": 1000000, "feeAssetId": null, "timestamp": 1629910935423, "version": 1, "sender": "3MqySDQxn5jzBUc144oks9fQzAXCBvJ2B8Y", "senderPublicKey": "3YcAqsm6P2UYnzeZng9DPfjNQbEcHithbYzPy3ZMzLMk", "proofs": [ "CHbKG6yjsDnFC9E8CP5WSuW7TDs6yBBz8tQ1V2NVohQ2p7MK1fvrYgSsPTS9nZuoVR4YBZuPuPuSNh2xMsuKuT1" ], "script": "base64:AAIFAAAAAAAAABsIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgAAAAqAQAAAA9nZXRTdHJpbmdPckZhaWwAAAABAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEIgAAAAEFAAAAA2tleQkAASwAAAACCQABLAAAAAICAAAAD21hbmRhdG9yeSB0aGlzLgUAAAADa2V5AgAAAA8gaXMgbm90IGRlZmluZWQAAAAAA1NFUAIAAAACX18AAAAACEJVRlNDQUxFCQABNgAAAAEADeC2s6dkAAABAAAAHWNvbnZlcnRQcmljZUFzc2V0SW50b0lkb0Fzc2V0AAAABQAAABBwcmljZUFzc2V0QW1vdW50AAAADnByaWNlQXNzZXRNVUxUAAAABXByaWNlAAAACXByaWNlTVVMVAAAAAxpZG9Bc3NldE1VTFQEAAAACmJQcmljZU1VTFQJAAE2AAAAAQUAAAAOcHJpY2VBc3NldE1VTFQEAAAADmJQcmljZUFzc2V0QlVGCQABPAAAAAMJAAE2AAAAAQUAAAAQcHJpY2VBc3NldEFtb3VudAUAAAAIQlVGU0NBTEUFAAAACmJQcmljZ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R1cGxlAAAAAl81BAAAABVhdmFpbGFibGVUb0NsYWltQXJyYXkIBQAAABBjbGFpbVJlc3VsdFR1cGxlAAAAAl82BAAAABthdmFpbGFibGVQcmljZUFtb3VudFRvQ2xhaW0JAAGRAAAAAgUAAAAVYXZhaWxhYmxlVG9DbGFpbUFycmF5AAAAAAAAAAAABAAAABlhdmFpbGFibGVJZG9BbW91bnRUb0NsYWltCQABkQAAAAIFAAAAFWF2YWlsYWJsZVRvQ2xhaW1BcnJheQAAAAAAAAAAAQkABRQAAAACBQAAAANuaWwJAAS5AAAAAgkABEwAAAACAgAAAAYlcyVkJWQJAARMAAAAAgUAAAANdXNlckFkZHJlc3M1OAkABEwAAAACCQABpAAAAAEFAAAAG2F2YWlsYWJsZVByaWNlQW1vdW50VG9DbGFpbQkABEwAAAACCQABpAAAAAEFAAAAGWF2YWlsYWJsZUlkb0Ftb3VudFRvQ2xhaW0FAAAAA25pbAUAAAADU0VQAAAAALRRY/Q=", "chainId": 84, "height": 1674128, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4FUjXe68xDAhr1gnzRmuPBYENxxrTnJ9rQaGN6tmbVyU Next: EVPGbwWXxQU4D3xZoNFV4eGgJ2RcbmLD9aGaW6T9WiS9 Diff:
Old | New | Differences | |
---|---|---|---|
139 | 139 | let aJ = parseIntValue(aH[O]) | |
140 | 140 | let aK = if ((height > aD)) | |
141 | 141 | then aD | |
142 | - | else height | |
143 | - | let aL = (aJ - aK) | |
142 | + | else if ((B > height)) | |
143 | + | then B | |
144 | + | else height | |
145 | + | let aL = (aK - aJ) | |
144 | 146 | let aM = fraction(aI, aL, C) | |
145 | 147 | let aN = e(aM, H, h, D, F) | |
146 | - | | |
147 | - | then $ | |
148 | + | if ((aB == G)) | |
149 | + | then $Tuple6([0, -(aM), aM, 0], aM, aF, aH, aK, [aM, aN]) | |
148 | 150 | else if ((aB == E)) | |
149 | - | then $ | |
151 | + | then $Tuple6([0, -(aM), 0, aN], aN, aE, aH, aK, [aM, aN]) | |
150 | 152 | else throw(("unsupported assetId: " + aB)) | |
151 | - | let aP = aO._1 | |
152 | - | let aQ = aO._2 | |
153 | - | let aR = aO._3 | |
154 | - | let aS = aP[an] | |
155 | - | let aT = aP[ao] | |
156 | - | [ScriptTransfer(aa, aQ, aR), ap(Z(aG), aH, aP, aK), ap(ab(), ai(), aP, aK), az(aG, aS, aT, ay)] | |
157 | 153 | } | |
158 | 154 | ||
159 | 155 | ||
160 | - | func aU (aB,aG) = aA(aB, addressFromStringValue(aG), fromBase58String("")) | |
161 | - | ||
162 | - | ||
163 | - | @Callable(aV) | |
156 | + | @Callable(aO) | |
164 | 157 | func constructor (z,A,B,C,h,G,I) = { | |
165 | 158 | let D = ((100 * 1000) * 1000) | |
166 | - | let | |
159 | + | let aP = (z + A) | |
167 | 160 | if (isDefined(getString(Y()))) | |
168 | 161 | then throw("already initialized") | |
169 | - | else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString( | |
162 | + | else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString(aO.caller))) | |
170 | 163 | then throw("not authorized") | |
171 | - | else if ((size( | |
164 | + | else if ((size(aO.payments) != 1)) | |
172 | 165 | then throw("exactly 1 payment must be attached") | |
173 | - | else if (( | |
166 | + | else if ((aP >= B)) | |
174 | 167 | then throw("claimStart must be greater than idoEnd") | |
175 | 168 | else { | |
176 | - | let | |
177 | - | let aE = value( | |
178 | - | let | |
169 | + | let aQ = value(aO.payments[0]) | |
170 | + | let aE = value(aQ.assetId) | |
171 | + | let aR = valueOrErrorMessage(assetInfo(aE), "fail to load ido asset info") | |
179 | 172 | let E = toBase58String(aE) | |
180 | - | let F = pow(10, 0, | |
173 | + | let F = pow(10, 0, aR.decimals, 0, 0, DOWN) | |
181 | 174 | let aF = fromBase58String(G) | |
182 | - | let | |
183 | - | let H = pow(10, 0, | |
175 | + | let aS = valueOrErrorMessage(assetInfo(aF), "fail to load price asset info") | |
176 | + | let H = pow(10, 0, aS.decimals, 0, 0, DOWN) | |
184 | 177 | [StringEntry(Y(), J(z, A, B, C, h, D, E, F, G, H, I))] | |
185 | 178 | } | |
186 | 179 | } | |
187 | 180 | ||
188 | 181 | ||
189 | 182 | ||
190 | - | @Callable( | |
183 | + | @Callable(aO) | |
191 | 184 | func invest () = { | |
192 | 185 | let aC = af() | |
193 | 186 | let z = parseIntValue(aC[n]) | |
194 | 187 | let A = parseIntValue(aC[o]) | |
195 | - | let | |
188 | + | let aP = (z + A) | |
196 | 189 | let B = parseIntValue(aC[p]) | |
197 | 190 | let C = parseIntValue(aC[q]) | |
198 | 191 | let h = parseIntValue(aC[r]) | |
203 | 196 | let G = aC[v] | |
204 | 197 | let aF = fromBase58String(G) | |
205 | 198 | let H = parseIntValue(aC[w]) | |
206 | - | let | |
207 | - | let aa = toString( | |
199 | + | let aT = parseIntValue(aC[x]) | |
200 | + | let aa = toString(aO.caller) | |
208 | 201 | if ((z > height)) | |
209 | 202 | then throw("ido has not been started yet") | |
210 | - | else if ((height > | |
203 | + | else if ((height > aP)) | |
211 | 204 | then throw("ido has been already ended") | |
212 | - | else if ((size( | |
205 | + | else if ((size(aO.payments) != 1)) | |
213 | 206 | then throw("exactly 1 payment is expected") | |
214 | 207 | else { | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | if (( | |
219 | - | then throw((("invalid payment asset id: " + toBase58String( | |
220 | - | else if (( | |
221 | - | then throw(((("payment amount is less then min allowed: pmtAmount=" + toString( | |
208 | + | let aQ = value(aO.payments[0]) | |
209 | + | let aU = value(aQ.assetId) | |
210 | + | let aV = aQ.amount | |
211 | + | if ((aU != aF)) | |
212 | + | then throw((("invalid payment asset id: " + toBase58String(aU)) + " is expected")) | |
213 | + | else if ((aT > aV)) | |
214 | + | then throw(((("payment amount is less then min allowed: pmtAmount=" + toString(aV)) + " minIvestAmount=") + toString(aT))) | |
222 | 215 | else { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | if (( | |
216 | + | let aW = aj(aa) | |
217 | + | let aX = ai() | |
218 | + | let aY = (parseIntValue(aX[K]) + aV) | |
219 | + | let aZ = e(aY, H, h, D, F) | |
220 | + | if ((aZ > assetBalance(this, aE))) | |
228 | 221 | then throw("IDO asset has been - sold consider to use smaller payment") | |
229 | 222 | else { | |
230 | - | let | |
231 | - | [ap(Z(aa), | |
223 | + | let ba = [aV, aV, 0, 0] | |
224 | + | [ap(Z(aa), aW, ba, B), ap(ab(), aX, ba, B), ax(aa, aV, 0, aO.transactionId)] | |
232 | 225 | } | |
233 | 226 | } | |
234 | 227 | } | |
236 | 229 | ||
237 | 230 | ||
238 | 231 | ||
239 | - | @Callable( | |
232 | + | @Callable(aO) | |
240 | 233 | func claim (aB,aG) = { | |
241 | - | let | |
242 | - | if ((aG != | |
234 | + | let bb = toString(aO.caller) | |
235 | + | if ((aG != bb)) | |
243 | 236 | then throw("not authorized") | |
244 | - | else $Tuple2(aA(aB, aV.caller, aV.transactionId), unit) | |
237 | + | else { | |
238 | + | let bc = aA(aB, aO.caller, aO.transactionId) | |
239 | + | let ba = bc._1 | |
240 | + | let bd = bc._2 | |
241 | + | let be = bc._3 | |
242 | + | let aH = bc._4 | |
243 | + | let aK = bc._5 | |
244 | + | let bf = ba[an] | |
245 | + | let bg = ba[ao] | |
246 | + | $Tuple2([ScriptTransfer(aO.caller, bd, be), ap(Z(aG), aH, ba, aK), ap(ab(), ai(), ba, aK), az(aG, bf, bg, aO.transactionId)], unit) | |
247 | + | } | |
245 | 248 | } | |
246 | 249 | ||
247 | 250 | ||
248 | 251 | ||
249 | - | @Callable(aV) | |
250 | - | func claimREADONLY (aB,aG) = $Tuple2(nil, aA(aB, addressFromStringValue(aG), fromBase58String(""))) | |
252 | + | @Callable(aO) | |
253 | + | func claimREADONLY (aB,aG) = { | |
254 | + | let bc = aA(aB, addressFromStringValue(aG), fromBase58String("")) | |
255 | + | let ba = bc._1 | |
256 | + | let bd = bc._2 | |
257 | + | let be = bc._3 | |
258 | + | let aH = bc._4 | |
259 | + | let aK = bc._5 | |
260 | + | let bh = bc._6 | |
261 | + | let bi = bh[0] | |
262 | + | let bj = bh[1] | |
263 | + | $Tuple2(nil, makeString(["%s%d%d", aG, toString(bi), toString(bj)], c)) | |
264 | + | } | |
251 | 265 | ||
252 | 266 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrErrorMessage(getString(b), (("mandatory this." + b) + " is not defined")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let c = "__" | |
8 | 8 | ||
9 | 9 | let d = toBigInt(1000000000000000000) | |
10 | 10 | ||
11 | 11 | func e (f,g,h,i,j) = { | |
12 | 12 | let k = toBigInt(g) | |
13 | 13 | let l = fraction(toBigInt(f), d, k) | |
14 | 14 | let m = fraction(l, k, toBigInt(h)) | |
15 | 15 | toInt(fraction(m, toBigInt(j), d)) | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | let n = 1 | |
20 | 20 | ||
21 | 21 | let o = 2 | |
22 | 22 | ||
23 | 23 | let p = 3 | |
24 | 24 | ||
25 | 25 | let q = 4 | |
26 | 26 | ||
27 | 27 | let r = 5 | |
28 | 28 | ||
29 | 29 | let s = 6 | |
30 | 30 | ||
31 | 31 | let t = 7 | |
32 | 32 | ||
33 | 33 | let u = 8 | |
34 | 34 | ||
35 | 35 | let v = 9 | |
36 | 36 | ||
37 | 37 | let w = 10 | |
38 | 38 | ||
39 | 39 | let x = 11 | |
40 | 40 | ||
41 | 41 | func y (z,A,B,C,h,D,E,F,G,H,I) = makeString(["%d%d%d%d%d%d%s%d%s%d%d", z, A, B, C, h, D, E, F, G, H, I], c) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func J (z,A,B,C,h,D,E,F,G,H,I) = y(toString(z), toString(A), toString(B), toString(C), toString(h), toString(D), E, toString(F), G, toString(H), toString(I)) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | let K = 1 | |
48 | 48 | ||
49 | 49 | let L = 2 | |
50 | 50 | ||
51 | 51 | let M = 3 | |
52 | 52 | ||
53 | 53 | let N = 4 | |
54 | 54 | ||
55 | 55 | let O = 5 | |
56 | 56 | ||
57 | 57 | func P (Q,R,S,T,U) = makeString(["%d%d%d%d%d", Q, R, S, T, U], c) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func V (Q,R,S,T,U) = P(toString(Q), toString(R), toString(S), toString(T), toString(U)) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func W (f,X) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(f), toString(X)], c) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func Y () = "%s__config" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func Z (aa) = ("%s__" + aa) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func ab () = "%s__totals" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func ac (ad,aa,ae) = makeString(["%s%s%s%s__history", ad, aa, ae], c) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func af () = split(a(Y()), c) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func ag (ah) = split(valueOrElse(getString(ah), P("0", "0", "0", "0", "0")), c) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func ai () = ag(ab()) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func aj (aa) = ag(Z(aa)) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func ak (aa) = split(a(Z(aa)), c) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | let al = 0 | |
94 | 94 | ||
95 | 95 | let am = 1 | |
96 | 96 | ||
97 | 97 | let an = 2 | |
98 | 98 | ||
99 | 99 | let ao = 3 | |
100 | 100 | ||
101 | 101 | func ap (b,aq,ar,as) = { | |
102 | 102 | let Q = parseIntValue(aq[K]) | |
103 | 103 | let R = parseIntValue(aq[L]) | |
104 | 104 | let S = parseIntValue(aq[M]) | |
105 | 105 | let T = parseIntValue(aq[N]) | |
106 | 106 | let U = parseIntValue(aq[O]) | |
107 | 107 | let at = (Q + ar[al]) | |
108 | 108 | let au = (R + ar[am]) | |
109 | 109 | let av = (S + ar[an]) | |
110 | 110 | let aw = (T + ar[ao]) | |
111 | 111 | if ((0 > au)) | |
112 | 112 | then throw("invalid math") | |
113 | 113 | else StringEntry(b, V(at, au, av, aw, as)) | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func ax (aa,f,X,ay) = StringEntry(ac("invest", aa, toBase58String(ay)), W(f, X)) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func az (aa,f,X,ay) = StringEntry(ac("claim", aa, toBase58String(ay)), W(f, X)) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func aA (aB,aa,ay) = { | |
124 | 124 | let aC = af() | |
125 | 125 | let B = parseIntValue(aC[p]) | |
126 | 126 | let C = parseIntValue(aC[q]) | |
127 | 127 | let aD = (B + C) | |
128 | 128 | let h = parseIntValue(aC[r]) | |
129 | 129 | let D = parseIntValue(aC[s]) | |
130 | 130 | let E = aC[t] | |
131 | 131 | let aE = fromBase58String(E) | |
132 | 132 | let F = parseIntValue(aC[u]) | |
133 | 133 | let G = aC[v] | |
134 | 134 | let aF = fromBase58String(G) | |
135 | 135 | let H = parseIntValue(aC[w]) | |
136 | 136 | let aG = toString(aa) | |
137 | 137 | let aH = ak(aG) | |
138 | 138 | let aI = parseIntValue(aH[K]) | |
139 | 139 | let aJ = parseIntValue(aH[O]) | |
140 | 140 | let aK = if ((height > aD)) | |
141 | 141 | then aD | |
142 | - | else height | |
143 | - | let aL = (aJ - aK) | |
142 | + | else if ((B > height)) | |
143 | + | then B | |
144 | + | else height | |
145 | + | let aL = (aK - aJ) | |
144 | 146 | let aM = fraction(aI, aL, C) | |
145 | 147 | let aN = e(aM, H, h, D, F) | |
146 | - | | |
147 | - | then $ | |
148 | + | if ((aB == G)) | |
149 | + | then $Tuple6([0, -(aM), aM, 0], aM, aF, aH, aK, [aM, aN]) | |
148 | 150 | else if ((aB == E)) | |
149 | - | then $ | |
151 | + | then $Tuple6([0, -(aM), 0, aN], aN, aE, aH, aK, [aM, aN]) | |
150 | 152 | else throw(("unsupported assetId: " + aB)) | |
151 | - | let aP = aO._1 | |
152 | - | let aQ = aO._2 | |
153 | - | let aR = aO._3 | |
154 | - | let aS = aP[an] | |
155 | - | let aT = aP[ao] | |
156 | - | [ScriptTransfer(aa, aQ, aR), ap(Z(aG), aH, aP, aK), ap(ab(), ai(), aP, aK), az(aG, aS, aT, ay)] | |
157 | 153 | } | |
158 | 154 | ||
159 | 155 | ||
160 | - | func aU (aB,aG) = aA(aB, addressFromStringValue(aG), fromBase58String("")) | |
161 | - | ||
162 | - | ||
163 | - | @Callable(aV) | |
156 | + | @Callable(aO) | |
164 | 157 | func constructor (z,A,B,C,h,G,I) = { | |
165 | 158 | let D = ((100 * 1000) * 1000) | |
166 | - | let | |
159 | + | let aP = (z + A) | |
167 | 160 | if (isDefined(getString(Y()))) | |
168 | 161 | then throw("already initialized") | |
169 | - | else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString( | |
162 | + | else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString(aO.caller))) | |
170 | 163 | then throw("not authorized") | |
171 | - | else if ((size( | |
164 | + | else if ((size(aO.payments) != 1)) | |
172 | 165 | then throw("exactly 1 payment must be attached") | |
173 | - | else if (( | |
166 | + | else if ((aP >= B)) | |
174 | 167 | then throw("claimStart must be greater than idoEnd") | |
175 | 168 | else { | |
176 | - | let | |
177 | - | let aE = value( | |
178 | - | let | |
169 | + | let aQ = value(aO.payments[0]) | |
170 | + | let aE = value(aQ.assetId) | |
171 | + | let aR = valueOrErrorMessage(assetInfo(aE), "fail to load ido asset info") | |
179 | 172 | let E = toBase58String(aE) | |
180 | - | let F = pow(10, 0, | |
173 | + | let F = pow(10, 0, aR.decimals, 0, 0, DOWN) | |
181 | 174 | let aF = fromBase58String(G) | |
182 | - | let | |
183 | - | let H = pow(10, 0, | |
175 | + | let aS = valueOrErrorMessage(assetInfo(aF), "fail to load price asset info") | |
176 | + | let H = pow(10, 0, aS.decimals, 0, 0, DOWN) | |
184 | 177 | [StringEntry(Y(), J(z, A, B, C, h, D, E, F, G, H, I))] | |
185 | 178 | } | |
186 | 179 | } | |
187 | 180 | ||
188 | 181 | ||
189 | 182 | ||
190 | - | @Callable( | |
183 | + | @Callable(aO) | |
191 | 184 | func invest () = { | |
192 | 185 | let aC = af() | |
193 | 186 | let z = parseIntValue(aC[n]) | |
194 | 187 | let A = parseIntValue(aC[o]) | |
195 | - | let | |
188 | + | let aP = (z + A) | |
196 | 189 | let B = parseIntValue(aC[p]) | |
197 | 190 | let C = parseIntValue(aC[q]) | |
198 | 191 | let h = parseIntValue(aC[r]) | |
199 | 192 | let D = parseIntValue(aC[s]) | |
200 | 193 | let E = aC[t] | |
201 | 194 | let aE = fromBase58String(E) | |
202 | 195 | let F = parseIntValue(aC[u]) | |
203 | 196 | let G = aC[v] | |
204 | 197 | let aF = fromBase58String(G) | |
205 | 198 | let H = parseIntValue(aC[w]) | |
206 | - | let | |
207 | - | let aa = toString( | |
199 | + | let aT = parseIntValue(aC[x]) | |
200 | + | let aa = toString(aO.caller) | |
208 | 201 | if ((z > height)) | |
209 | 202 | then throw("ido has not been started yet") | |
210 | - | else if ((height > | |
203 | + | else if ((height > aP)) | |
211 | 204 | then throw("ido has been already ended") | |
212 | - | else if ((size( | |
205 | + | else if ((size(aO.payments) != 1)) | |
213 | 206 | then throw("exactly 1 payment is expected") | |
214 | 207 | else { | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | if (( | |
219 | - | then throw((("invalid payment asset id: " + toBase58String( | |
220 | - | else if (( | |
221 | - | then throw(((("payment amount is less then min allowed: pmtAmount=" + toString( | |
208 | + | let aQ = value(aO.payments[0]) | |
209 | + | let aU = value(aQ.assetId) | |
210 | + | let aV = aQ.amount | |
211 | + | if ((aU != aF)) | |
212 | + | then throw((("invalid payment asset id: " + toBase58String(aU)) + " is expected")) | |
213 | + | else if ((aT > aV)) | |
214 | + | then throw(((("payment amount is less then min allowed: pmtAmount=" + toString(aV)) + " minIvestAmount=") + toString(aT))) | |
222 | 215 | else { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | if (( | |
216 | + | let aW = aj(aa) | |
217 | + | let aX = ai() | |
218 | + | let aY = (parseIntValue(aX[K]) + aV) | |
219 | + | let aZ = e(aY, H, h, D, F) | |
220 | + | if ((aZ > assetBalance(this, aE))) | |
228 | 221 | then throw("IDO asset has been - sold consider to use smaller payment") | |
229 | 222 | else { | |
230 | - | let | |
231 | - | [ap(Z(aa), | |
223 | + | let ba = [aV, aV, 0, 0] | |
224 | + | [ap(Z(aa), aW, ba, B), ap(ab(), aX, ba, B), ax(aa, aV, 0, aO.transactionId)] | |
232 | 225 | } | |
233 | 226 | } | |
234 | 227 | } | |
235 | 228 | } | |
236 | 229 | ||
237 | 230 | ||
238 | 231 | ||
239 | - | @Callable( | |
232 | + | @Callable(aO) | |
240 | 233 | func claim (aB,aG) = { | |
241 | - | let | |
242 | - | if ((aG != | |
234 | + | let bb = toString(aO.caller) | |
235 | + | if ((aG != bb)) | |
243 | 236 | then throw("not authorized") | |
244 | - | else $Tuple2(aA(aB, aV.caller, aV.transactionId), unit) | |
237 | + | else { | |
238 | + | let bc = aA(aB, aO.caller, aO.transactionId) | |
239 | + | let ba = bc._1 | |
240 | + | let bd = bc._2 | |
241 | + | let be = bc._3 | |
242 | + | let aH = bc._4 | |
243 | + | let aK = bc._5 | |
244 | + | let bf = ba[an] | |
245 | + | let bg = ba[ao] | |
246 | + | $Tuple2([ScriptTransfer(aO.caller, bd, be), ap(Z(aG), aH, ba, aK), ap(ab(), ai(), ba, aK), az(aG, bf, bg, aO.transactionId)], unit) | |
247 | + | } | |
245 | 248 | } | |
246 | 249 | ||
247 | 250 | ||
248 | 251 | ||
249 | - | @Callable(aV) | |
250 | - | func claimREADONLY (aB,aG) = $Tuple2(nil, aA(aB, addressFromStringValue(aG), fromBase58String(""))) | |
252 | + | @Callable(aO) | |
253 | + | func claimREADONLY (aB,aG) = { | |
254 | + | let bc = aA(aB, addressFromStringValue(aG), fromBase58String("")) | |
255 | + | let ba = bc._1 | |
256 | + | let bd = bc._2 | |
257 | + | let be = bc._3 | |
258 | + | let aH = bc._4 | |
259 | + | let aK = bc._5 | |
260 | + | let bh = bc._6 | |
261 | + | let bi = bh[0] | |
262 | + | let bj = bh[1] | |
263 | + | $Tuple2(nil, makeString(["%s%d%d", aG, toString(bi), toString(bj)], c)) | |
264 | + | } | |
251 | 265 | ||
252 | 266 |
github/deemru/w8io/169f3d6 70.40 ms ◑