tx · HP8QZfFYaQwrf1N4jixeeADCPMRYKwRe5ZFK7ben4mG5

3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp:  -0.01400000 Waves

2021.04.17 19:49 [1486710] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves

{ "type": 13, "id": "HP8QZfFYaQwrf1N4jixeeADCPMRYKwRe5ZFK7ben4mG5", "fee": 1400000, "feeAssetId": null, "timestamp": 1618678199951, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "4iG879qNS6rFx4gsDWH81sbievYdzKZzvhaAR8wQ6pNkewxrnTUJhN4iMTpMEjfMCim2YYuxS8EHxHQrTFC5jPdQ" ], "script": "base64:AAIEAAAAAAAAABIIAhIFCgMIAQESBwoFCAEBAQgAAAABAAAAAAZwYXI3SWQBAAAAIJedbhD+DwLKhAB/H26DYx4Zv6xpfO57kM3OSOXSB0EjAAAAAgAAAAFpAQAAAA5zcG9uc29yRGVwb3NpdAAAAAMAAAALY29tcGVOdW1iZXIAAAARY29tcGVFbmRUaW1lc3RhbXAAAAAJdGltZXN0YW1wBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQAAZgAAAAIFAAAACXRpbWVzdGFtcAUAAAARY29tcGVFbmRUaW1lc3RhbXAJAAACAAAAAQIAAAAXQ29tcGV0aXRpb24gaXMgZmluaXNoZWQDCQAAAAAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAGcGFyN0lkCQAAAgAAAAECAAAAIENhbiBob2RsIFBBUjcgb25seSBhdCB0aGUgbW9tZW50BAAAAAljdXJyZW50SWQJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkBAAAAApjdXJyZW50S2V5CQACWAAAAAEICA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50AwkAAGYAAAACBQAAAAl0aW1lc3RhbXAFAAAAE2NvbXBlU3RhcnRUaW1lc3RhbXAJAAACAAAAAQIAAAAfQ29tcGV0aXRpb24gaGFzIGFscmVhZHkgc3RhcnRlZAMJAABmAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAJbmV3QW1vdW50CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAACHNwb25zb3JfBQAAAApjdXJyZW50S2V5AgAAAAFfBQAAAAdhc3NldElkAgAAAAFfBQAAAAtjb21wZU51bWJlcgUAAAAJbmV3QW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAALY29tcGVOdW1iZXICAAAAAV8FAAAAB2Fzc2V0SWQFAAAACW5ld0Ftb3VudAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkIWhlU", "height": 1486710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FoYhckbmVawhzQvsWRNpSaTBRuKZMY1XG4q2Shx1uwXk Next: 4svxSQUQ9GaFPnQXgqdgYnJSK2eWvjBqv8AskFqTXQqu Diff:
OldNewDifferences
1111 else if ((f.assetId == a))
1212 then throw("Can hodl PAR7 only at the moment")
1313 else {
14- let g = toBase58String(b.caller.bytes)
15- let h = {
16- let i = getInteger(this, g)
17- if ($isInstanceOf(i, "Int"))
14+ let g = toBase58String(value(f.assetId))
15+ let h = toBase58String(b.caller.bytes)
16+ let i = {
17+ let j = getInteger(this, h)
18+ if ($isInstanceOf(j, "Int"))
1819 then {
19- let j = i
20- j
20+ let k = j
21+ k
2122 }
2223 else 0
2324 }
24- let k = (h + f.amount)
25-[IntegerEntry(((("sponsor_" + g) + "_") + c), k), IntegerEntry(c, k)]
25+ let l = (i + f.amount)
26+[IntegerEntry(((((("sponsor_" + h) + "_") + g) + "_") + c), l), IntegerEntry(((c + "_") + g), l)]
2627 }
2728 }
2829
2930
3031
3132 @Callable(b)
32-func sponsorWithDraw (c,l,e,m) = {
33- let g = toBase58String(b.caller.bytes)
34- let h = {
35- let i = getInteger(this, ((g + "_") + c))
36- if ($isInstanceOf(i, "Int"))
33+func sponsorWithDraw (c,m,e,n,o) = {
34+ let h = toBase58String(b.caller.bytes)
35+ let i = {
36+ let j = getInteger(this, ((h + "_") + c))
37+ if ($isInstanceOf(j, "Int"))
3738 then {
38- let j = i
39- j
39+ let k = j
40+ k
4041 }
4142 else 0
4243 }
43- let k = (h - m)
44- if ((e > l))
44+ let l = (i - n)
45+ if ((e > m))
4546 then throw("Competition has already started")
46- else if ((0 > m))
47+ else if ((0 > n))
4748 then throw("Can't withdraw negative amount")
48- else if ((0 > k))
49+ else if ((0 > l))
4950 then throw("Not enough balance")
50- else [IntegerEntry(((("sponsor_" + g) + "_") + c), k), IntegerEntry(c, k)]
51+ else [IntegerEntry(((((("sponsor_" + h) + "_") + o) + "_") + c), l), IntegerEntry(((c + "_") + o), l)]
5152 }
5253
5354
54-@Verifier(n)
55-func o () = sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey)
55+@Verifier(p)
56+func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
5657
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4'
55
66 @Callable(b)
77 func sponsorDeposit (c,d,e) = {
88 let f = b.payments[0]
99 if ((e > d))
1010 then throw("Competition is finished")
1111 else if ((f.assetId == a))
1212 then throw("Can hodl PAR7 only at the moment")
1313 else {
14- let g = toBase58String(b.caller.bytes)
15- let h = {
16- let i = getInteger(this, g)
17- if ($isInstanceOf(i, "Int"))
14+ let g = toBase58String(value(f.assetId))
15+ let h = toBase58String(b.caller.bytes)
16+ let i = {
17+ let j = getInteger(this, h)
18+ if ($isInstanceOf(j, "Int"))
1819 then {
19- let j = i
20- j
20+ let k = j
21+ k
2122 }
2223 else 0
2324 }
24- let k = (h + f.amount)
25-[IntegerEntry(((("sponsor_" + g) + "_") + c), k), IntegerEntry(c, k)]
25+ let l = (i + f.amount)
26+[IntegerEntry(((((("sponsor_" + h) + "_") + g) + "_") + c), l), IntegerEntry(((c + "_") + g), l)]
2627 }
2728 }
2829
2930
3031
3132 @Callable(b)
32-func sponsorWithDraw (c,l,e,m) = {
33- let g = toBase58String(b.caller.bytes)
34- let h = {
35- let i = getInteger(this, ((g + "_") + c))
36- if ($isInstanceOf(i, "Int"))
33+func sponsorWithDraw (c,m,e,n,o) = {
34+ let h = toBase58String(b.caller.bytes)
35+ let i = {
36+ let j = getInteger(this, ((h + "_") + c))
37+ if ($isInstanceOf(j, "Int"))
3738 then {
38- let j = i
39- j
39+ let k = j
40+ k
4041 }
4142 else 0
4243 }
43- let k = (h - m)
44- if ((e > l))
44+ let l = (i - n)
45+ if ((e > m))
4546 then throw("Competition has already started")
46- else if ((0 > m))
47+ else if ((0 > n))
4748 then throw("Can't withdraw negative amount")
48- else if ((0 > k))
49+ else if ((0 > l))
4950 then throw("Not enough balance")
50- else [IntegerEntry(((("sponsor_" + g) + "_") + c), k), IntegerEntry(c, k)]
51+ else [IntegerEntry(((((("sponsor_" + h) + "_") + o) + "_") + c), l), IntegerEntry(((c + "_") + o), l)]
5152 }
5253
5354
54-@Verifier(n)
55-func o () = sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey)
55+@Verifier(p)
56+func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
5657

github/deemru/w8io/169f3d6 
35.77 ms