tx · 2mbnJCJCZRVyuBcQkXcEPnUrzaWAyTDPMsuYH1yH4ngX

3MqySDQxn5jzBUc144oks9fQzAXCBvJ2B8Y:  -0.01000000 Waves

2021.08.24 13:19 [1672285] smart account 3MqySDQxn5jzBUc144oks9fQzAXCBvJ2B8Y > SELF 0.00000000 Waves

{ "type": 13, "id": "2mbnJCJCZRVyuBcQkXcEPnUrzaWAyTDPMsuYH1yH4ngX", "fee": 1000000, "feeAssetId": null, "timestamp": 1629800474575, "version": 1, "sender": "3MqySDQxn5jzBUc144oks9fQzAXCBvJ2B8Y", "senderPublicKey": "3YcAqsm6P2UYnzeZng9DPfjNQbEcHithbYzPy3ZMzLMk", "proofs": [ "2qjJ4cwPGJTZxDU2cLSb679Ff6oKzuGBCU7Ts6EXuVUtdHbL3ob24YuhpqQ3GD8sMizif32siAo7gRw2ggz4eCCf" ], "script": "base64:AAIFAAAAAAAAABQIAhIJCgcBAQEBAQgBEgASAwoBCAAAACsBAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQiAAAAAQUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPbWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAAAAAADU0VQAgAAAAJfXwAAAAAIQlVGU0NBTEUJAAE2AAAAAQAN4Lazp2QAAAEAAAAdY29udmVydFByaWNlQXNzZXRJbnRvSWRvQXNzZXQAAAAFAAAAEHByaWNlQXNzZXRBbW91bnQAAAAOcHJpY2VBc3NldE1VTFQAAAAFcHJpY2UAAAAJcHJpY2VNVUxUAAAADGlkb0Fzc2V0TVVMVAQAAAAKYlByaWNlTVVMVAkAATYAAAABBQAAAA5wcmljZUFzc2V0TVVMVAQAAAAOYlByaWNlQXNzZXRCVUYJAAE8AAAAAwkAATYAAAABBQAAABBwcmljZUFzc2V0QW1vdW50BQAAAAhCVUZTQ0FMRQUAAAAKYl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FcHJpY2UFAAAACXByaWNlTXVsdAUAAAAMaWRvQXNzZXRNdWx0AwkAAGYAAAACBQAAABZyZXF1aXJlZElkb0Fzc2V0QW1vdW50CQAD8AAAAAIFAAAABHRoaXMFAAAACmlkb0Fzc2V0SWQJAAACAAAAAQIAAAA5SURPIGFzc2V0IGhhcyBiZWVuIC0gc29sZCBjb25zaWRlciB0byB1c2Ugc21hbGxlciBwYXltZW50BAAAAAp0b3RhbHNEaWZmCQAETAAAAAIFAAAACXBtdEFtb3VudAkABEwAAAACBQAAAAlwbXRBbW91bnQJAARMAAAAAgAAAAAAAAAAAAkABEwAAAACAAAAAAAAAAAABQAAAANuaWwJAARMAAAAAgkBAAAAC1RvdGFsc0VudHJ5AAAABAkBAAAAC2tleUludmVzdG9yAAAAAQUAAAALdXNlckFkZHJlc3MFAAAAEW9yaWdJbnZlc3RvckFycmF5BQAAAAp0b3RhbHNEaWZmBQAAAApjbGFpbVN0YXJ0CQAETAAAAAIJAQAAAAtUb3RhbHNFbnRyeQAAAAQJAQAAAAlrZXlUb3RhbHMAAAAABQAAAA9vcmlnVG90YWxzQXJyYXkFAAAACnRvdGFsc0RpZmYFAAAACmNsYWltU3RhcnQJAARMAAAAAgkBAAAAG0ludmVzdE9wZXJhdGlvbkhpc3RvcnlFbnRyeQAAAAQFAAAAC3VzZXJBZGRyZXNzBQAAAAlwbXRBbW91bnQAAAAAAAAAAAAIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQFAAAAA25pbAAAAAFpAQAAAAVjbGFpbQAAAAEAAAAQY2xhaW1lZEFzc2V0SWQ1OAkBAAAADWludGVybmFsQ2xhaW0AAAADBQAAABBjbGFpbWVkQXNzZXRJZDU4CAUAAAABaQAAAAZjYWxsZXIIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQAAAAAl8EvSw==", "chainId": 84, "height": 1672285, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6UinNALyQ1Rw59C8HKiQfQjkp8eSEtj5aDE4p6PN91Rs Next: 8emc4e4wAfEvFr8C7w5cvS2zpgZyGkmUAZ5ty73E98v8 Diff:
OldNewDifferences
157157 }
158158
159159
160-@Callable(aU)
160+func aU (aB,aG) = aA(aB, addressFromStringValue(aG), fromBase58String(""))
161+
162+
163+@Callable(aV)
161164 func constructor (z,A,B,C,h,G,I) = {
162165 let D = ((100 * 1000) * 1000)
163- let aV = (z + A)
166+ let aW = (z + A)
164167 if (isDefined(getString(Y())))
165168 then throw("already initialized")
166- else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString(aU.caller)))
169+ else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString(aV.caller)))
167170 then throw("not authorized")
168- else if ((size(aU.payments) != 1))
171+ else if ((size(aV.payments) != 1))
169172 then throw("exactly 1 payment must be attached")
170- else if ((aV >= B))
173+ else if ((aW >= B))
171174 then throw("claimStart must be greater than idoEnd")
172175 else {
173- let aW = value(aU.payments[0])
174- let aE = value(aW.assetId)
175- let aX = valueOrErrorMessage(assetInfo(aE), "fail to load ido asset info")
176+ let aX = value(aV.payments[0])
177+ let aE = value(aX.assetId)
178+ let aY = valueOrErrorMessage(assetInfo(aE), "fail to load ido asset info")
176179 let E = toBase58String(aE)
177- let F = pow(10, 0, aX.decimals, 0, 0, DOWN)
180+ let F = pow(10, 0, aY.decimals, 0, 0, DOWN)
178181 let aF = fromBase58String(G)
179- let aY = valueOrErrorMessage(assetInfo(aF), "fail to load price asset info")
180- let H = pow(10, 0, aY.decimals, 0, 0, DOWN)
182+ let aZ = valueOrErrorMessage(assetInfo(aF), "fail to load price asset info")
183+ let H = pow(10, 0, aZ.decimals, 0, 0, DOWN)
181184 [StringEntry(Y(), J(z, A, B, C, h, D, E, F, G, H, I))]
182185 }
183186 }
184187
185188
186189
187-@Callable(aU)
190+@Callable(aV)
188191 func invest () = {
189192 let aC = af()
190193 let z = parseIntValue(aC[n])
191194 let A = parseIntValue(aC[o])
192- let aV = (z + A)
195+ let aW = (z + A)
193196 let B = parseIntValue(aC[p])
194197 let C = parseIntValue(aC[q])
195198 let h = parseIntValue(aC[r])
200203 let G = aC[v]
201204 let aF = fromBase58String(G)
202205 let H = parseIntValue(aC[w])
203- let aZ = parseIntValue(aC[x])
204- let aa = toString(aU.caller)
206+ let ba = parseIntValue(aC[x])
207+ let aa = toString(aV.caller)
205208 if ((z > height))
206209 then throw("ido has not been started yet")
207- else if ((height > aV))
210+ else if ((height > aW))
208211 then throw("ido has been already ended")
209- else if ((size(aU.payments) != 1))
212+ else if ((size(aV.payments) != 1))
210213 then throw("exactly 1 payment is expected")
211214 else {
212- let aW = value(aU.payments[0])
213- let ba = value(aW.assetId)
214- let bb = aW.amount
215- if ((ba != aF))
216- then throw((("invalid payment asset id: " + toBase58String(ba)) + " is expected"))
217- else if ((aZ > bb))
218- then throw(((("payment amount is less then min allowed: pmtAmount=" + toString(bb)) + " minIvestAmount=") + toString(aZ)))
215+ let aX = value(aV.payments[0])
216+ let bb = value(aX.assetId)
217+ let bc = aX.amount
218+ if ((bb != aF))
219+ then throw((("invalid payment asset id: " + toBase58String(bb)) + " is expected"))
220+ else if ((ba > bc))
221+ then throw(((("payment amount is less then min allowed: pmtAmount=" + toString(bc)) + " minIvestAmount=") + toString(ba)))
219222 else {
220- let bc = aj(aa)
221- let bd = ai()
222- let be = (parseIntValue(bd[K]) + bb)
223- let bf = e(be, H, h, D, F)
224- if ((bf > assetBalance(this, aE)))
223+ let bd = aj(aa)
224+ let be = ai()
225+ let bf = (parseIntValue(be[K]) + bc)
226+ let bg = e(bf, H, h, D, F)
227+ if ((bg > assetBalance(this, aE)))
225228 then throw("IDO asset has been - sold consider to use smaller payment")
226229 else {
227- let aP = [bb, bb, 0, 0]
228-[ap(Z(aa), bc, aP, B), ap(ab(), bd, aP, B), ax(aa, bb, 0, aU.transactionId)]
230+ let aP = [bc, bc, 0, 0]
231+[ap(Z(aa), bd, aP, B), ap(ab(), be, aP, B), ax(aa, bc, 0, aV.transactionId)]
229232 }
230233 }
231234 }
233236
234237
235238
236-@Callable(aU)
237-func claim (aB) = {
238- let aa = aU.caller
239- aA(aB, aa, aU.transactionId)
240- }
239+@Callable(aV)
240+func claim (aB) = aA(aB, aV.caller, aV.transactionId)
241241
242242
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = valueOrErrorMessage(getString(b), (("mandatory this." + b) + " is not defined"))
55
66
77 let c = "__"
88
99 let d = toBigInt(1000000000000000000)
1010
1111 func e (f,g,h,i,j) = {
1212 let k = toBigInt(g)
1313 let l = fraction(toBigInt(f), d, k)
1414 let m = fraction(l, k, toBigInt(h))
1515 toInt(fraction(m, toBigInt(j), d))
1616 }
1717
1818
1919 let n = 1
2020
2121 let o = 2
2222
2323 let p = 3
2424
2525 let q = 4
2626
2727 let r = 5
2828
2929 let s = 6
3030
3131 let t = 7
3232
3333 let u = 8
3434
3535 let v = 9
3636
3737 let w = 10
3838
3939 let x = 11
4040
4141 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)
4242
4343
4444 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))
4545
4646
4747 let K = 1
4848
4949 let L = 2
5050
5151 let M = 3
5252
5353 let N = 4
5454
5555 let O = 5
5656
5757 func P (Q,R,S,T,U) = makeString(["%d%d%d%d%d", Q, R, S, T, U], c)
5858
5959
6060 func V (Q,R,S,T,U) = P(toString(Q), toString(R), toString(S), toString(T), toString(U))
6161
6262
6363 func W (f,X) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(f), toString(X)], c)
6464
6565
6666 func Y () = "%s__config"
6767
6868
6969 func Z (aa) = ("%s__" + aa)
7070
7171
7272 func ab () = "%s__totals"
7373
7474
7575 func ac (ad,aa,ae) = makeString(["%s%s%s%s__history", ad, aa, ae], c)
7676
7777
7878 func af () = split(a(Y()), c)
7979
8080
8181 func ag (ah) = split(valueOrElse(getString(ah), P("0", "0", "0", "0", "0")), c)
8282
8383
8484 func ai () = ag(ab())
8585
8686
8787 func aj (aa) = ag(Z(aa))
8888
8989
9090 func ak (aa) = split(a(Z(aa)), c)
9191
9292
9393 let al = 0
9494
9595 let am = 1
9696
9797 let an = 2
9898
9999 let ao = 3
100100
101101 func ap (b,aq,ar,as) = {
102102 let Q = parseIntValue(aq[K])
103103 let R = parseIntValue(aq[L])
104104 let S = parseIntValue(aq[M])
105105 let T = parseIntValue(aq[N])
106106 let U = parseIntValue(aq[O])
107107 let at = (Q + ar[al])
108108 let au = (R + ar[am])
109109 let av = (S + ar[an])
110110 let aw = (T + ar[ao])
111111 if ((0 > au))
112112 then throw("invalid math")
113113 else StringEntry(b, V(at, au, av, aw, as))
114114 }
115115
116116
117117 func ax (aa,f,X,ay) = StringEntry(ac("invest", aa, toBase58String(ay)), W(f, X))
118118
119119
120120 func az (aa,f,X,ay) = StringEntry(ac("claim", aa, toBase58String(ay)), W(f, X))
121121
122122
123123 func aA (aB,aa,ay) = {
124124 let aC = af()
125125 let B = parseIntValue(aC[p])
126126 let C = parseIntValue(aC[q])
127127 let aD = (B + C)
128128 let h = parseIntValue(aC[r])
129129 let D = parseIntValue(aC[s])
130130 let E = aC[t]
131131 let aE = fromBase58String(E)
132132 let F = parseIntValue(aC[u])
133133 let G = aC[v]
134134 let aF = fromBase58String(G)
135135 let H = parseIntValue(aC[w])
136136 let aG = toString(aa)
137137 let aH = ak(aG)
138138 let aI = parseIntValue(aH[K])
139139 let aJ = parseIntValue(aH[O])
140140 let aK = if ((height > aD))
141141 then aD
142142 else height
143143 let aL = (aJ - aK)
144144 let aM = fraction(aI, aL, C)
145145 let aN = e(aM, H, h, D, F)
146146 let aO = if ((aB == G))
147147 then $Tuple3([0, -(aM), aM, 0], aM, aF)
148148 else if ((aB == E))
149149 then $Tuple3([0, -(aM), 0, aN], aN, aE)
150150 else throw(("unsupported assetId: " + aB))
151151 let aP = aO._1
152152 let aQ = aO._2
153153 let aR = aO._3
154154 let aS = aP[an]
155155 let aT = aP[ao]
156156 [ScriptTransfer(aa, aQ, aR), ap(Z(aG), aH, aP, aK), ap(ab(), ai(), aP, aK), az(aG, aS, aT, ay)]
157157 }
158158
159159
160-@Callable(aU)
160+func aU (aB,aG) = aA(aB, addressFromStringValue(aG), fromBase58String(""))
161+
162+
163+@Callable(aV)
161164 func constructor (z,A,B,C,h,G,I) = {
162165 let D = ((100 * 1000) * 1000)
163- let aV = (z + A)
166+ let aW = (z + A)
164167 if (isDefined(getString(Y())))
165168 then throw("already initialized")
166- else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString(aU.caller)))
169+ else if (("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH" != toString(aV.caller)))
167170 then throw("not authorized")
168- else if ((size(aU.payments) != 1))
171+ else if ((size(aV.payments) != 1))
169172 then throw("exactly 1 payment must be attached")
170- else if ((aV >= B))
173+ else if ((aW >= B))
171174 then throw("claimStart must be greater than idoEnd")
172175 else {
173- let aW = value(aU.payments[0])
174- let aE = value(aW.assetId)
175- let aX = valueOrErrorMessage(assetInfo(aE), "fail to load ido asset info")
176+ let aX = value(aV.payments[0])
177+ let aE = value(aX.assetId)
178+ let aY = valueOrErrorMessage(assetInfo(aE), "fail to load ido asset info")
176179 let E = toBase58String(aE)
177- let F = pow(10, 0, aX.decimals, 0, 0, DOWN)
180+ let F = pow(10, 0, aY.decimals, 0, 0, DOWN)
178181 let aF = fromBase58String(G)
179- let aY = valueOrErrorMessage(assetInfo(aF), "fail to load price asset info")
180- let H = pow(10, 0, aY.decimals, 0, 0, DOWN)
182+ let aZ = valueOrErrorMessage(assetInfo(aF), "fail to load price asset info")
183+ let H = pow(10, 0, aZ.decimals, 0, 0, DOWN)
181184 [StringEntry(Y(), J(z, A, B, C, h, D, E, F, G, H, I))]
182185 }
183186 }
184187
185188
186189
187-@Callable(aU)
190+@Callable(aV)
188191 func invest () = {
189192 let aC = af()
190193 let z = parseIntValue(aC[n])
191194 let A = parseIntValue(aC[o])
192- let aV = (z + A)
195+ let aW = (z + A)
193196 let B = parseIntValue(aC[p])
194197 let C = parseIntValue(aC[q])
195198 let h = parseIntValue(aC[r])
196199 let D = parseIntValue(aC[s])
197200 let E = aC[t]
198201 let aE = fromBase58String(E)
199202 let F = parseIntValue(aC[u])
200203 let G = aC[v]
201204 let aF = fromBase58String(G)
202205 let H = parseIntValue(aC[w])
203- let aZ = parseIntValue(aC[x])
204- let aa = toString(aU.caller)
206+ let ba = parseIntValue(aC[x])
207+ let aa = toString(aV.caller)
205208 if ((z > height))
206209 then throw("ido has not been started yet")
207- else if ((height > aV))
210+ else if ((height > aW))
208211 then throw("ido has been already ended")
209- else if ((size(aU.payments) != 1))
212+ else if ((size(aV.payments) != 1))
210213 then throw("exactly 1 payment is expected")
211214 else {
212- let aW = value(aU.payments[0])
213- let ba = value(aW.assetId)
214- let bb = aW.amount
215- if ((ba != aF))
216- then throw((("invalid payment asset id: " + toBase58String(ba)) + " is expected"))
217- else if ((aZ > bb))
218- then throw(((("payment amount is less then min allowed: pmtAmount=" + toString(bb)) + " minIvestAmount=") + toString(aZ)))
215+ let aX = value(aV.payments[0])
216+ let bb = value(aX.assetId)
217+ let bc = aX.amount
218+ if ((bb != aF))
219+ then throw((("invalid payment asset id: " + toBase58String(bb)) + " is expected"))
220+ else if ((ba > bc))
221+ then throw(((("payment amount is less then min allowed: pmtAmount=" + toString(bc)) + " minIvestAmount=") + toString(ba)))
219222 else {
220- let bc = aj(aa)
221- let bd = ai()
222- let be = (parseIntValue(bd[K]) + bb)
223- let bf = e(be, H, h, D, F)
224- if ((bf > assetBalance(this, aE)))
223+ let bd = aj(aa)
224+ let be = ai()
225+ let bf = (parseIntValue(be[K]) + bc)
226+ let bg = e(bf, H, h, D, F)
227+ if ((bg > assetBalance(this, aE)))
225228 then throw("IDO asset has been - sold consider to use smaller payment")
226229 else {
227- let aP = [bb, bb, 0, 0]
228-[ap(Z(aa), bc, aP, B), ap(ab(), bd, aP, B), ax(aa, bb, 0, aU.transactionId)]
230+ let aP = [bc, bc, 0, 0]
231+[ap(Z(aa), bd, aP, B), ap(ab(), be, aP, B), ax(aa, bc, 0, aV.transactionId)]
229232 }
230233 }
231234 }
232235 }
233236
234237
235238
236-@Callable(aU)
237-func claim (aB) = {
238- let aa = aU.caller
239- aA(aB, aa, aU.transactionId)
240- }
239+@Callable(aV)
240+func claim (aB) = aA(aB, aV.caller, aV.transactionId)
241241
242242

github/deemru/w8io/169f3d6 
68.78 ms