tx · 91R4WuTKisKaPhSm1i6A4URsFH6jCcofTSTPgK1j9HYJ

3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB:  -0.04000000 Waves

2022.05.05 20:09 [2038679] smart account 3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB > SELF 0.00000000 Waves

{ "type": 13, "id": "91R4WuTKisKaPhSm1i6A4URsFH6jCcofTSTPgK1j9HYJ", "fee": 4000000, "feeAssetId": null, "timestamp": 1651770565489, "version": 2, "chainId": 84, "sender": "3Mw7mAf2p8drjeSSDEbq6yyFhjqTgDcwGFB", "senderPublicKey": "Ti5K4A5REvfgdfj3SWhhb2wJXRKenVb3WPQ6tE1TaKe", "proofs": [ "3yyfFohSRqjcRpsEqMeASRkFnJk3rb1h7kE6ZXWu3ZQofjjkMndT228JiDbb8nanLLy6YcpNHpfKr7W2MU3JjfM9" ], "script": "base64:AAIFAAAAAAAAAB0IAhIDCgEIEgsKCQEBAQEBCAgIARIAEgUKAwEICAAAAA4AAAAAAnBzAgAAAA1QUkVTQUxFX1NUQVJUAAAAAAJwZAIAAAAQUFJFU0FMRV9EVVJBVElPTgAAAAACY3MCAAAAC0NMQUlNX1NUQVJUAAAAAAJjZAIAAAAOQ0xBSU1fRFVSQVRJT04AAAAAAXACAAAACVBSSUNFX0lETwAAAAAEcDFJRAIAAAAQUFJJQ0VfMV9BU1NFVF9JRAAAAAAEcDJJRAIAAAAQUFJJQ0VfMl9BU1NFVF9JRAAAAAAEcDNJRAIAAAAQUFJJQ0VfM19BU1NFVF9JRAAAAAADbWlhAgAAABFNSU5fQU1PVU5UX0lOVkVTVAAAAAAFbWFpbmECAAAACk1BSU5fQVNTRVQAAAAAB2ZvclNhbGUCAAAADlRPVEFMX0ZPUl9TQUxFAAAAAAl0b3RhbFNhbGUCAAAAClRPVEFMX1NBTEUAAAAAB3RpbnZlc3QCAAAADVRPVEFMX0lOVkVTVF8BAAAAD2dldEFzc2V0SWZWYWxpZAAAAAEAAAAHYXNz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AAB3RpbnZlc3QJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAACX18FAAAACnBtdEFzc2V0SWQGBQAAAANuaWwAAAABaQEAAAAGYWRtaW5WAAAAAwAAAAF0AAAAAmFkAAAAAmFpAwkAAAAAAAACCAUAAAABaQAAAAZjYWxsZXIFAAAABHRoaXMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAAAmFkBQAAAAF0CQACWQAAAAEFAAAAAmFpBQAAAANuaWwJAAACAAAAAQIAAAAuT25seSB0aGUgQWRtaW4gaXRzZWxmIGNhbiBpbnZva2UgdGhpcyBmdW5jdGlvbgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Vmqciw==", "height": 2038679, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ESNZw5qmPfG9yBDMoqgDnWaijrV936Fsban8UCngnuTQ Next: none Diff:
OldNewDifferences
107107 }
108108
109109
110-@Verifier(N)
111-func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
110+
111+@Callable(p)
112+func adminV (N,O,P) = if ((p.caller == this))
113+ then [ScriptTransfer(Address(fromBase58String(O)), N, fromBase58String(P))]
114+ else throw("Only the Admin itself can invoke this function")
115+
116+
117+@Verifier(Q)
118+func R () = sigVerify(Q.bodyBytes, Q.proofs[0], Q.senderPublicKey)
112119
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 {
104104 let M = ((I / v) * 100000000)
105105 [IntegerEntry(l, (J + M)), ScriptTransfer(p.caller, M, D), BooleanEntry((((m + toBase58String(p.caller.bytes)) + "__") + H), true)]
106106 }
107107 }
108108
109109
110-@Verifier(N)
111-func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
110+
111+@Callable(p)
112+func adminV (N,O,P) = if ((p.caller == this))
113+ then [ScriptTransfer(Address(fromBase58String(O)), N, fromBase58String(P))]
114+ else throw("Only the Admin itself can invoke this function")
115+
116+
117+@Verifier(Q)
118+func R () = sigVerify(Q.bodyBytes, Q.proofs[0], Q.senderPublicKey)
112119

github/deemru/w8io/169f3d6 
41.80 ms