tx · DRcowy2N1fHFAcv72zf7nAZoFUqzVtX6SsPBRpcHhFFr

3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB:  -0.04000000 Waves

2022.05.05 19:37 [2038646] smart account 3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB > SELF 0.00000000 Waves

{ "type": 13, "id": "DRcowy2N1fHFAcv72zf7nAZoFUqzVtX6SsPBRpcHhFFr", "fee": 4000000, "feeAssetId": null, "timestamp": 1651768673553, "version": 2, "chainId": 84, "sender": "3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB", "senderPublicKey": "Ti5K4A5REvfgdfj3SWhhb2wJXRKenVb3WPQ6tE1TaKe", "proofs": [ "5QS78FNPj5zEuLnyVZ6YC9D34hx4AUWWfjsC4g2o8jiaVGR9abYTxEqEADFmeWxdTJdbUmCaCfQoCDunpeNpRpBV" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEIEgsKCQEBAQEBCAgIARIAAAAADgAAAAACcHMCAAAADVBSRVNBTEVfU1RBUlQAAAAAAnBkAgAAABBQUkVTQUxFX0RVUkFUSU9OAAAAAAJjcwIAAAALQ0xBSU1fU1RBUlQAAAAAAmNkAgAAAA5DTEFJTV9EVVJBVElPTgAAAAABcAIAAAAJUFJJQ0VfSURPAAAAAARwMUlEAgAAABBQUklDRV8xX0FTU0VUX0lEAAAAAARwMklEAgAAABBQUklDRV8yX0FTU0VUX0lEAAAAAARwM0lEAgAAABBQUklDRV8zX0FTU0VUX0lEAAAAAANtaWECAAAAEU1JTl9BTU9VTlRfSU5WRVNUAAAAAAVtYWluYQIAAAAKTUFJTl9BU1NFVAAAAAAHZm9yU2FsZQIAAAAOVE9UQUxfRk9SX1NBTEUAAAAACXRvdGFsU2FsZQIAAAAKVE9UQUxfU0FMRQAAAAAHdGludmVzdAIAAAANVE9UQUxfSU5WRVNUXwEAAAAPZ2V0QXNzZXRJZlZhbGlkAAAAAQAAAAdhc3NldElkCQACWAAAAAEJAQAAAB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AAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAACX18FAAAACnBtdEFzc2V0SWQGBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRxRw8c=", "height": 2038646, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C5h8Grb2u1EhzvHBwWWChXAXPxMCGWd1XQip5tJNx73p Next: ESNZw5qmPfG9yBDMoqgDnWaijrV936Fsban8UCngnuTQ Diff:
OldNewDifferences
101101 else if ((L > I))
102102 then throw("Amount less than the minimum to be invested.")
103103 else {
104- let M = valueOrElse(getIntegerValue(this, (m + toBase58String(p.caller.bytes))), 0)
105- let N = (I / v)
106- let O = (I + M)
107-[IntegerEntry((m + toBase58String(p.caller.bytes)), O), IntegerEntry(l, (J + N)), ScriptTransfer(p.caller, N, D), BooleanEntry((((m + toBase58String(p.caller.bytes)) + "__") + H), true)]
104+ let M = (I / v)
105+[IntegerEntry(l, (J + M)), ScriptTransfer(p.caller, M, D), BooleanEntry((((m + toBase58String(p.caller.bytes)) + "__") + H), true)]
108106 }
109107 }
110108
111109
112-@Verifier(P)
113-func Q () = sigVerify(P.bodyBytes, P.proofs[0], P.senderPublicKey)
110+@Verifier(N)
111+func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
114112
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 = toBase58String(value(G.assetId))
8080 let I = G.amount
8181 let A = getStringValue(this, f)
8282 let B = getStringValue(this, g)
8383 let C = 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 (H != B)
9595 else false)
9696 then (H != C)
9797 else false)
9898 then throw(((("invalid payment asset id:" + H) + " Expected:") + A))
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 {
104- let M = valueOrElse(getIntegerValue(this, (m + toBase58String(p.caller.bytes))), 0)
105- let N = (I / v)
106- let O = (I + M)
107-[IntegerEntry((m + toBase58String(p.caller.bytes)), O), IntegerEntry(l, (J + N)), ScriptTransfer(p.caller, N, D), BooleanEntry((((m + toBase58String(p.caller.bytes)) + "__") + H), true)]
104+ let M = (I / v)
105+[IntegerEntry(l, (J + M)), ScriptTransfer(p.caller, M, D), BooleanEntry((((m + toBase58String(p.caller.bytes)) + "__") + H), true)]
108106 }
109107 }
110108
111109
112-@Verifier(P)
113-func Q () = sigVerify(P.bodyBytes, P.proofs[0], P.senderPublicKey)
110+@Verifier(N)
111+func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
114112

github/deemru/w8io/169f3d6 
25.76 ms