tx · DzCd7V7HAQVDTTyduKdnwjAS2zSTaiji9XSasPhbtJbV

3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9:  -0.01400000 Waves

2022.01.10 19:17 [1873057] smart account 3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9 > SELF 0.00000000 Waves

{ "type": 13, "id": "DzCd7V7HAQVDTTyduKdnwjAS2zSTaiji9XSasPhbtJbV", "fee": 1400000, "feeAssetId": null, "timestamp": 1641831473116, "version": 2, "chainId": 84, "sender": "3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9", "senderPublicKey": "HwnFy5MZJ9eyVKF9GSXN8nuA5uT2rcvnVqHw9vCv3DNn", "proofs": [ "6nby6j8guRjNBV548WUNT8RBcgupQSKvtSzy9AfherPbFijWKqen4nJmsZJeqEdJu6DEUr3WYou8gQu2E9Vaqag" ], "script": "base64:AAIFAAAAAAAAAiMIAhIAEgMKAQgSAwoBBBIAEgAaFAoBQRIPYWxyZWFkeVJlc2VydmVkGhQKAUISD3JlbWFpbmluZ1Rva2VucxoPCgFDEgpyZXNlcnZhYmxlGhUKAUQSEHJlbWFpbmluZ1Rva2VuczIaDQoBRRIIdG9SZWRlZW0aDgoBRhIJcmVtYWluaW5nGg8KAWESCnNoaW55d2dnaWQaEQoBYhIMYWRtaW5BZGRyZXNzGhcKAWMSEnByZXNhbGV0b2tlbmFtb3VudBoYCgFkEhNtYXhUb2tlbnNwZXJBZGRyZXNzGgkKAWUSBHVzZE4aEgoBZhINdHJ5R2V0SW50ZWdlchoICgFnEgNrZXkaDAoBaBIHJG1hdGNoMBoGCgFpEgFiGhIKAWoSDXRyeUdldEJvb2xlYW4aEgoBaxINaXNHYW1lU3RhcnRlZBoSCgFsEg1pc1doaXRlTGlzdGVkGg8KAW0SCmFkZHJlc3NTdHIaFgoBbhIRY2FsY1Rva2VudG9SZWRlZW0aCQoBbxIEYW1udBoQCgFwEgtzdGFydEhlaWdodBoNCgFxEghyZWRlZW1lZBo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AAAAFxBQAAAAFhBQAAAANuaWwJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAE3lvdSBjYW4gcmVkZWVtIG1heCAJAAGkAAAAAQUAAAABRgIAAAAGIFNIRUdHAAAAAGSlcsc=", "height": 1873057, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3tRD2kAddgKNrytVnVoi34vvRXNYXURj4i7rW77UksbD Next: 4iL5jmBbxnik4VbSWPCxUqr4SVsA1XTdQ7679zgtn3s2 Diff:
OldNewDifferences
140140 else {
141141 let E = n(z, m)
142142 let F = (z - q)
143- if ((E >= F))
143+ if ((F >= E))
144144 then [IntegerEntry((m + "_Redeemed"), (q + E)), ScriptTransfer(t.caller, q, a)]
145145 else throw((("you can redeem max " + toString(F)) + " SHEGG"))
146146 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf'
55
66 let b = addressFromStringValue("3N2fmsxjTetfnJBXEUpnALKcAQeNR4EizQQ")
77
88 let c = 50000000000000
99
1010 let d = 10000
1111
1212 let e = unit
1313
1414 func f (g) = {
1515 let h = getInteger(this, g)
1616 if ($isInstanceOf(h, "Int"))
1717 then {
1818 let i = h
1919 i
2020 }
2121 else 0
2222 }
2323
2424
2525 func j (g) = {
2626 let h = getBoolean(this, g)
2727 if ($isInstanceOf(h, "Boolean"))
2828 then {
2929 let i = h
3030 i
3131 }
3232 else false
3333 }
3434
3535
3636 func k () = j("Game_Started")
3737
3838
3939 func l (m) = j((m + "_whiteListed"))
4040
4141
4242 func n (o,m) = {
4343 let p = f("Start_Height")
4444 let q = f((m + "_Redeemed"))
4545 if ((p == 0))
4646 then throw("Redeem time not started")
4747 else {
4848 let r = (1440 * 180)
4949 if ((lastBlock.height > (p + r)))
5050 then (o - q)
5151 else {
5252 let s = fraction(o, 1, r)
5353 (((lastBlock.height - p) * s) - q)
5454 }
5555 }
5656 }
5757
5858
5959 @Callable(t)
6060 func init () = [IntegerEntry("Remaining_Tokens", c)]
6161
6262
6363
6464 @Callable(t)
6565 func addToWhiteList (m) = if ((t.caller != this))
6666 then throw("you are not authorized to perform this operation")
6767 else [BooleanEntry((m + "_whiteListed"), true)]
6868
6969
7070
7171 @Callable(t)
7272 func setStartGame (u) = if ((t.caller != this))
7373 then throw("you are not authorized to perform this operation")
7474 else [BooleanEntry("Game_Started", u), IntegerEntry("Start_Height", lastBlock.height)]
7575
7676
7777
7878 @Callable(t)
7979 func reserveTokens () = {
8080 let m = toString(t.caller)
8181 let v = l(m)
8282 if (!(v))
8383 then throw("you are not whitelisted!")
8484 else {
8585 let w = t.payments[0]
8686 if ((w == w))
8787 then {
8888 let x = value(t.payments[0].amount)
8989 if ((x == x))
9090 then {
9191 let y = w.assetId
9292 if ((y == y))
9393 then {
9494 let z = x
9595 if ((z == z))
9696 then {
9797 let A = f((m + "_Reserved"))
9898 if ((A == A))
9999 then {
100100 let B = f("Remaining_Tokens")
101101 if ((y != e))
102102 then throw("ONLY USDN ALLOWED")
103103 else if ((0 >= B))
104104 then throw("Presale is out of stock!")
105105 else if ((z > B))
106106 then throw((("You can reserve only" + toString(B)) + " SHEGG"))
107107 else {
108108 let C = (d - A)
109109 if ((A > C))
110110 then throw((("You can reserve max " + toString(C)) + " SHEGG"))
111111 else {
112112 let D = (B - z)
113113 [IntegerEntry((m + "_Reserved"), (z + A)), IntegerEntry("Remaining_Tokens", D), ScriptTransfer(b, x, e)]
114114 }
115115 }
116116 }
117117 else throw("Strict value is not equal to itself.")
118118 }
119119 else throw("Strict value is not equal to itself.")
120120 }
121121 else throw("Strict value is not equal to itself.")
122122 }
123123 else throw("Strict value is not equal to itself.")
124124 }
125125 else throw("Strict value is not equal to itself.")
126126 }
127127 }
128128
129129
130130
131131 @Callable(t)
132132 func redeem () = if (!(k()))
133133 then throw("Cannot redeem anything before the game starts!")
134134 else {
135135 let m = toString(t.caller)
136136 let z = f((m + "_Reserved"))
137137 let q = f((m + "_Redeemed"))
138138 if ((z == 0))
139139 then throw("Nothing to redeem")
140140 else {
141141 let E = n(z, m)
142142 let F = (z - q)
143- if ((E >= F))
143+ if ((F >= E))
144144 then [IntegerEntry((m + "_Redeemed"), (q + E)), ScriptTransfer(t.caller, q, a)]
145145 else throw((("you can redeem max " + toString(F)) + " SHEGG"))
146146 }
147147 }
148148
149149

github/deemru/w8io/026f985 
26.03 ms