tx · Dnn5CU6jLKdfN55Pzt96MkTsqFGK9HVCNKpU9dhPPsRE

3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp:  -0.01400000 Waves

2021.04.18 02:24 [1487121] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves

{ "type": 13, "id": "Dnn5CU6jLKdfN55Pzt96MkTsqFGK9HVCNKpU9dhPPsRE", "fee": 1400000, "feeAssetId": null, "timestamp": 1618701871839, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "5cKtYtnJ1uFpVd6B3wprc3UCouXaj8Urn9JsqfF39po51vtSQpMvEGB7E55w2AP9A3n7su4WdrNJwQr3wGnS4YdU" ], "script": "base64:AAIEAAAAAAAAABMIAhIGCgQIAQEIEgcKBQgBAQEIAAAAAgAAAAAGcGFyN0lkAQAAACCXnW4Q/g8CyoQAfx9ug2MeGb+saXzue5DNzkjl0gdBIwEAAAAHY3VycmVudAAAAAEAAAABaQQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAlgAAAABCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQCAAAABVdBVkVTAAAAAgAAAAFpAQAAAA5zcG9uc29yRGVwb3NpdAAAAAQAAAALY29tcGVOdW1iZXIAAAARY29tcGVFbmRUaW1lc3RhbXAAAAAJdGltZXN0YW1wAAAACWFzc2V0TmFtZQQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAljdXJyZW50SWQJAQAAAAdjdXJyZW50AAAAAQUAAAABaQMJAABmAAAAAgUAAAAJdGltZXN0YW1wBQAAABFjb21wZUVuZFRp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YQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZQAAAAIFAAAADWN1cnJlbnRBbW91bnQFAAAABmFtb3VudAMJAABmAAAAAgUAAAAJdGltZXN0YW1wBQAAABNjb21wZVN0YXJ0VGltZXN0YW1wCQAAAgAAAAECAAAAH0NvbXBldGl0aW9uIGhhcyBhbHJlYWR5IHN0YXJ0ZWQDCQAAZgAAAAIAAAAAAAAAAAAFAAAABmFtb3VudAkAAAIAAAABAgAAAB5DYW4ndCB3aXRoZHJhdyBuZWdhdGl2ZSBhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAACW5ld0Ftb3VudAkAAAIAAAABAgAAABJOb3QgZW5vdWdoIGJhbGFuY2UJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAhzcG9uc29yXwUAAAAKY3VycmVudEtleQIAAAABXwUAAAAHYXNzZXRJZAIAAAABXwUAAAALY29tcGVOdW1iZXIFAAAACW5ld0Ftb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAAC2NvbXBlTnVtYmVyAgAAAAFfBQAAAAdhc3NldElkBQAAAAluZXdBbW91bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5X7hHVg==", "height": 1487121, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4svxSQUQ9GaFPnQXgqdgYnJSK2eWvjBqv8AskFqTXQqu Next: CL7LGWjXy6v7xepRUUVf6ZTmNVGYshK2soMKcacGFQcH Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4'
55
6-@Callable(b)
7-func sponsorDeposit (c,d,e) = {
8- let f = b.payments[0]
9- if ((e > d))
6+func b (c) = {
7+ let d = c.payments[0]
8+ if (isDefined(d.assetId))
9+ then toBase58String(value(d.assetId))
10+ else "WAVES"
11+ }
12+
13+
14+@Callable(c)
15+func sponsorDeposit (e,f,g,h) = {
16+ let d = c.payments[0]
17+ let i = b(c)
18+ if ((g > f))
1019 then throw("Competition is finished")
1120 else {
12- let g = toBase58String(value(f.assetId))
13- let h = toBase58String(b.caller.bytes)
14- let i = {
15- let j = getInteger(this, h)
16- if ($isInstanceOf(j, "Int"))
21+ let j = toBase58String(c.caller.bytes)
22+ let k = {
23+ let l = getInteger(this, j)
24+ if ($isInstanceOf(l, "Int"))
1725 then {
18- let k = j
19- k
26+ let m = l
27+ m
2028 }
2129 else 0
2230 }
23- let l = (i + f.amount)
24-[IntegerEntry(((((("sponsor_" + h) + "_") + g) + "_") + c), l), IntegerEntry(((c + "_") + g), l)]
31+ let n = (k + d.amount)
32+[IntegerEntry(((((("sponsor_" + j) + "_") + i) + "_") + e), n), IntegerEntry(((e + "_") + i), n)]
2533 }
2634 }
2735
2836
2937
30-@Callable(b)
31-func sponsorWithDraw (c,m,e,n,o) = {
32- let h = toBase58String(b.caller.bytes)
33- let i = {
34- let j = getInteger(this, ((h + "_") + c))
35- if ($isInstanceOf(j, "Int"))
38+@Callable(c)
39+func sponsorWithDraw (e,o,g,p,q) = {
40+ let j = toBase58String(c.caller.bytes)
41+ let k = {
42+ let l = getInteger(this, ((j + "_") + e))
43+ if ($isInstanceOf(l, "Int"))
3644 then {
37- let k = j
38- k
45+ let m = l
46+ m
3947 }
4048 else 0
4149 }
42- let l = (i - n)
43- if ((e > m))
50+ let n = (k - p)
51+ if ((g > o))
4452 then throw("Competition has already started")
45- else if ((0 > n))
53+ else if ((0 > p))
4654 then throw("Can't withdraw negative amount")
47- else if ((0 > l))
55+ else if ((0 > n))
4856 then throw("Not enough balance")
49- else [IntegerEntry(((((("sponsor_" + h) + "_") + o) + "_") + c), l), IntegerEntry(((c + "_") + o), l)]
57+ else [IntegerEntry(((((("sponsor_" + j) + "_") + q) + "_") + e), n), IntegerEntry(((e + "_") + q), n)]
5058 }
5159
5260
53-@Verifier(p)
54-func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
61+@Verifier(r)
62+func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
5563
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4'
55
6-@Callable(b)
7-func sponsorDeposit (c,d,e) = {
8- let f = b.payments[0]
9- if ((e > d))
6+func b (c) = {
7+ let d = c.payments[0]
8+ if (isDefined(d.assetId))
9+ then toBase58String(value(d.assetId))
10+ else "WAVES"
11+ }
12+
13+
14+@Callable(c)
15+func sponsorDeposit (e,f,g,h) = {
16+ let d = c.payments[0]
17+ let i = b(c)
18+ if ((g > f))
1019 then throw("Competition is finished")
1120 else {
12- let g = toBase58String(value(f.assetId))
13- let h = toBase58String(b.caller.bytes)
14- let i = {
15- let j = getInteger(this, h)
16- if ($isInstanceOf(j, "Int"))
21+ let j = toBase58String(c.caller.bytes)
22+ let k = {
23+ let l = getInteger(this, j)
24+ if ($isInstanceOf(l, "Int"))
1725 then {
18- let k = j
19- k
26+ let m = l
27+ m
2028 }
2129 else 0
2230 }
23- let l = (i + f.amount)
24-[IntegerEntry(((((("sponsor_" + h) + "_") + g) + "_") + c), l), IntegerEntry(((c + "_") + g), l)]
31+ let n = (k + d.amount)
32+[IntegerEntry(((((("sponsor_" + j) + "_") + i) + "_") + e), n), IntegerEntry(((e + "_") + i), n)]
2533 }
2634 }
2735
2836
2937
30-@Callable(b)
31-func sponsorWithDraw (c,m,e,n,o) = {
32- let h = toBase58String(b.caller.bytes)
33- let i = {
34- let j = getInteger(this, ((h + "_") + c))
35- if ($isInstanceOf(j, "Int"))
38+@Callable(c)
39+func sponsorWithDraw (e,o,g,p,q) = {
40+ let j = toBase58String(c.caller.bytes)
41+ let k = {
42+ let l = getInteger(this, ((j + "_") + e))
43+ if ($isInstanceOf(l, "Int"))
3644 then {
37- let k = j
38- k
45+ let m = l
46+ m
3947 }
4048 else 0
4149 }
42- let l = (i - n)
43- if ((e > m))
50+ let n = (k - p)
51+ if ((g > o))
4452 then throw("Competition has already started")
45- else if ((0 > n))
53+ else if ((0 > p))
4654 then throw("Can't withdraw negative amount")
47- else if ((0 > l))
55+ else if ((0 > n))
4856 then throw("Not enough balance")
49- else [IntegerEntry(((((("sponsor_" + h) + "_") + o) + "_") + c), l), IntegerEntry(((c + "_") + o), l)]
57+ else [IntegerEntry(((((("sponsor_" + j) + "_") + q) + "_") + e), n), IntegerEntry(((e + "_") + q), n)]
5058 }
5159
5260
53-@Verifier(p)
54-func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
61+@Verifier(r)
62+func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
5563

github/deemru/w8io/169f3d6 
37.09 ms