tx · A1PcvppsMLL2hUZUY3ufoEgLLBsf3SxmNP13yZ58Bpxk

3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB:  -0.04000000 Waves

2022.05.05 19:10 [2038621] smart account 3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB > SELF 0.00000000 Waves

{ "type": 13, "id": "A1PcvppsMLL2hUZUY3ufoEgLLBsf3SxmNP13yZ58Bpxk", "fee": 4000000, "feeAssetId": null, "timestamp": 1651767021797, "version": 2, "chainId": 84, "sender": "3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB", "senderPublicKey": "Ti5K4A5REvfgdfj3SWhhb2wJXRKenVb3WPQ6tE1TaKe", "proofs": [ "596jeeWj2c4n1ZEfa6Xw8nN3nefTKReJotEiFCodNG8Z5b4xmsX2xyeMZQg9s6VXN2iPuqmLFUfhihMJibL55Ywi" ], "script": "base64:AAIFAAAAAAAAABgIAhIDCgEIEgsKCQEBAQEBCAgIARIAEgAAAAAOAAAAAAJwcwIAAAANUFJFU0FMRV9TVEFSVAAAAAACcGQCAAAAEFBSRVNBTEVfRFVSQVRJT04AAAAAAmNzAgAAAAtDTEFJTV9TVEFSVAAAAAACY2QCAAAADkNMQUlNX0RVUkFUSU9OAAAAAAFwAgAAAAlQUklDRV9JRE8AAAAABHAxSUQCAAAAEFBSSUNFXzFfQVNTRVRfSUQAAAAABHAySUQCAAAAEFBSSUNFXzJfQVNTRVRfSUQAAAAABHAzSUQCAAAAEFBSSUNFXzNfQVNTRVRfSUQAAAAAA21pYQIAAAARTUlOX0FNT1VOVF9JTlZFU1QAAAAABW1haW5hAgAAAApNQUlOX0FTU0VUAAAAAAdmb3JTYWxlAgAAAA5UT1RBTF9GT1JfU0FMRQAAAAAJdG90YWxTYWxlAgAAAApUT1RBTF9TQUxFAAAAAAd0aW52ZXN0AgAAAA1UT1RBTF9JTlZFU1RfAQAAAA9nZXRBc3NldElmVmFsaWQAAAABAAAAB2Fzc2V0SWQJAAJYAA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xlcgUAAAAKZmluYWxWYWx1ZQUAAAAJbWFpbkFzc2V0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledibTYM=", "height": 2038621, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HBPfn3XKJCRNCXJiBnPWVppmx8TE6SUGH3BrYnwho3bw Next: 6YWiEVeS5Sb1jFukzXRpZrqBo84wf9UECAhadZjCYBZJ Diff:
OldNewDifferences
9595 else (H != B))
9696 then true
9797 else (H != C))
98- then throw("invalid payment asset id")
98+ then throw(("invalid payment asset id:" + toBase58String(H)))
9999 else if ((J >= K))
100100 then throw("Pre-sale asset has been - sold consider to use smaller payment")
101101 else if ((L > I))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "PRESALE_START"
55
66 let b = "PRESALE_DURATION"
77
88 let c = "CLAIM_START"
99
1010 let d = "CLAIM_DURATION"
1111
1212 let e = "PRICE_IDO"
1313
1414 let f = "PRICE_1_ASSET_ID"
1515
1616 let g = "PRICE_2_ASSET_ID"
1717
1818 let h = "PRICE_3_ASSET_ID"
1919
2020 let i = "MIN_AMOUNT_INVEST"
2121
2222 let j = "MAIN_ASSET"
2323
2424 let k = "TOTAL_FOR_SALE"
2525
2626 let l = "TOTAL_SALE"
2727
2828 let m = "TOTAL_INVEST_"
2929
3030 func n (o) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(o))).id, (("Asset Id: " + o) + " is invalid.")))
3131
3232
3333 @Callable(p)
3434 func addAdmin (q) = if ((p.caller == this))
3535 then [BinaryEntry("admin", fromBase58String(q))]
3636 else throw("Only the Admin itself can invoke this function")
3737
3838
3939
4040 @Callable(p)
4141 func constructor (r,s,t,u,v,w,x,y,z) = {
4242 let A = n(w)
4343 let B = n(x)
4444 let C = n(y)
4545 if (if ((p.caller == this))
4646 then true
4747 else (p.caller == Address(getBinaryValue(this, "admin"))))
4848 then if ((s >= r))
4949 then throw("PresaleDuration can't be bigger than PresaleStart")
5050 else if ((s >= t))
5151 then throw("presaleDuration can't be bigger than claimStart")
5252 else if ((u >= t))
5353 then throw("claimDuration can't be bigger than claimStart")
5454 else if ((z >= v))
5555 then throw("minInvestAmount can't be bigger than price")
5656 else if (if (if ((A == B))
5757 then true
5858 else (A == C))
5959 then true
6060 else (B == C))
6161 then throw("Each Asset must be different from the other.")
6262 else if ((size(p.payments) != 1))
6363 then throw("exactly 1 payment must be attached")
6464 else [BinaryEntry(j, value(p.payments[0].assetId)), StringEntry(f, w), StringEntry(g, x), StringEntry(h, y), IntegerEntry(a, r), IntegerEntry(b, s), IntegerEntry(c, t), IntegerEntry(d, u), IntegerEntry(e, v), IntegerEntry(i, z), IntegerEntry(k, value(p.payments[0]).amount), IntegerEntry(l, 0)]
6565 else throw("Only the Admin itself can invoke this function")
6666 }
6767
6868
6969
7070 @Callable(p)
7171 func invest () = {
7272 let D = getBinary(this, j)
7373 let r = getIntegerValue(this, a)
7474 let s = getIntegerValue(this, b)
7575 let E = (r + s)
7676 let v = getIntegerValue(this, e)
7777 let F = height
7878 let G = value(p.payments[0])
7979 let H = value(G.assetId)
8080 let I = G.amount
8181 let A = fromBase58String(getStringValue(this, f))
8282 let B = fromBase58String(getStringValue(this, g))
8383 let C = fromBase58String(getStringValue(this, h))
8484 let J = getIntegerValue(this, l)
8585 let K = getIntegerValue(this, k)
8686 let L = getIntegerValue(this, i)
8787 if ((r >= F))
8888 then throw("presale has not been started yet")
8989 else if ((F >= E))
9090 then throw("presale has been already ended")
9191 else if ((size(p.payments) != 1))
9292 then throw("exactly 1 payment is expected")
9393 else if (if (if ((H != A))
9494 then true
9595 else (H != B))
9696 then true
9797 else (H != C))
98- then throw("invalid payment asset id")
98+ then throw(("invalid payment asset id:" + toBase58String(H)))
9999 else if ((J >= K))
100100 then throw("Pre-sale asset has been - sold consider to use smaller payment")
101101 else if ((L > I))
102102 then throw("Amount less than the minimum to be invested.")
103103 else {
104104 let M = valueOrElse(getIntegerValue(this, (m + toBase58String(p.caller.bytes))), 0)
105105 let N = (I / v)
106106 let O = (I + M)
107107 [IntegerEntry((m + toBase58String(p.caller.bytes)), O), IntegerEntry(l, (J + N)), BooleanEntry((((m + toBase58String(p.caller.bytes)) + "__") + toBase58String(H)), true)]
108108 }
109109 }
110110
111111
112112
113113 @Callable(p)
114114 func claimPresale () = {
115115 let D = getBinary(this, j)
116116 let F = height
117117 let P = getIntegerValue(this, c)
118118 let Q = getIntegerValue(this, d)
119119 let R = (P + Q)
120120 let v = getIntegerValue(this, e)
121121 if ((P >= F))
122122 then throw("The Presale is still happening.")
123123 else if ((F > R))
124124 then {
125125 let M = valueOrErrorMessage(getIntegerValue(this, (m + toBase58String(p.caller.bytes))), "You were not part of the presale")
126126 let N = (M / v)
127127 let S = (N / Q)
128128 let T = valueOrElse(getIntegerValue(this, ((m + toBase58String(p.caller.bytes)) + "_HISTORY")), 0)
129129 let U = (Q - T)
130130 let V = (S * U)
131131 [IntegerEntry(((m + toBase58String(p.caller.bytes)) + "_HISTORY"), (F - P)), IntegerEntry((m + toBase58String(p.caller.bytes)), (M - (V * v))), ScriptTransfer(p.caller, V, D)]
132132 }
133133 else {
134134 let M = valueOrErrorMessage(getIntegerValue(this, (m + toBase58String(p.caller.bytes))), "You were not part of the presale")
135135 let N = (M / v)
136136 let S = (N / Q)
137137 let T = valueOrElse(getIntegerValue(this, ((m + toBase58String(p.caller.bytes)) + "_HISTORY")), 0)
138138 let U = ((Q - T) - (F - P))
139139 let V = (S * U)
140140 [IntegerEntry(((m + toBase58String(p.caller.bytes)) + "_HISTORY"), (F - P)), IntegerEntry((m + toBase58String(p.caller.bytes)), (M - (V * v))), ScriptTransfer(p.caller, V, D)]
141141 }
142142 }
143143
144144
145145 @Verifier(W)
146146 func X () = sigVerify(W.bodyBytes, W.proofs[0], W.senderPublicKey)
147147

github/deemru/w8io/169f3d6 
33.11 ms