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/H26DYx4Zv6xpfO57kM3OSOXSB0EjAAAAAgAAAAFpAQAAAA5zcG9uc29yRGVwb3NpdAAAAAMAAAALY29tcGVOdW1iZXIAAAARY29tcGVFbmRUaW1lc3RhbXAAAAAJdGltZXN0YW1wBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQAAZgAAAAIFAAAACXRpbWVzdGFtcAUAAAARY29tcGVFbmRUaW1lc3RhbXAJAAACAAAAAQIAAAAXQ29tcGV0aXRpb24gaXMgZmluaXNoZWQDCQAAAAAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAGcGFyN0lkCQAAAgAAAAECAAAAIENhbiBob2RsIFBBUjcgb25seSBhdCB0aGUgbW9tZW50BAAAAAljdXJyZW50SWQJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkBAAAAApjdXJyZW50S2V5CQAC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AAGYW1vdW50AwkAAGYAAAACBQAAAAl0aW1lc3RhbXAFAAAAE2NvbXBlU3RhcnRUaW1lc3RhbXAJAAACAAAAAQIAAAAfQ29tcGV0aXRpb24gaGFzIGFscmVhZHkgc3RhcnRlZAMJAABmAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAJbmV3QW1vdW50CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAACHNwb25zb3JfBQAAAApjdXJyZW50S2V5AgAAAAFfBQAAAAdhc3NldElkAgAAAAFfBQAAAAtjb21wZU51bWJlcgUAAAAJbmV3QW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAALY29tcGVOdW1iZXICAAAAAV8FAAAAB2Fzc2V0SWQFAAAACW5ld0Ftb3VudAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkIWhlU",
"height": 1486710,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: FoYhckbmVawhzQvsWRNpSaTBRuKZMY1XG4q2Shx1uwXk
Next: 4svxSQUQ9GaFPnQXgqdgYnJSK2eWvjBqv8AskFqTXQqu
Diff:
Old | New | | Differences |
---|
11 | 11 | | else if ((f.assetId == a)) |
---|
12 | 12 | | then throw("Can hodl PAR7 only at the moment") |
---|
13 | 13 | | 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")) |
---|
18 | 19 | | then { |
---|
19 | | - | let j = i |
---|
20 | | - | j |
---|
| 20 | + | let k = j |
---|
| 21 | + | k |
---|
21 | 22 | | } |
---|
22 | 23 | | else 0 |
---|
23 | 24 | | } |
---|
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)] |
---|
26 | 27 | | } |
---|
27 | 28 | | } |
---|
28 | 29 | | |
---|
29 | 30 | | |
---|
30 | 31 | | |
---|
31 | 32 | | @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")) |
---|
37 | 38 | | then { |
---|
38 | | - | let j = i |
---|
39 | | - | j |
---|
| 39 | + | let k = j |
---|
| 40 | + | k |
---|
40 | 41 | | } |
---|
41 | 42 | | else 0 |
---|
42 | 43 | | } |
---|
43 | | - | let k = (h - m) |
---|
44 | | - | if ((e > l)) |
---|
| 44 | + | let l = (i - n) |
---|
| 45 | + | if ((e > m)) |
---|
45 | 46 | | then throw("Competition has already started") |
---|
46 | | - | else if ((0 > m)) |
---|
| 47 | + | else if ((0 > n)) |
---|
47 | 48 | | then throw("Can't withdraw negative amount") |
---|
48 | | - | else if ((0 > k)) |
---|
| 49 | + | else if ((0 > l)) |
---|
49 | 50 | | 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)] |
---|
51 | 52 | | } |
---|
52 | 53 | | |
---|
53 | 54 | | |
---|
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) |
---|
56 | 57 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(b) |
---|
7 | 7 | | func sponsorDeposit (c,d,e) = { |
---|
8 | 8 | | let f = b.payments[0] |
---|
9 | 9 | | if ((e > d)) |
---|
10 | 10 | | then throw("Competition is finished") |
---|
11 | 11 | | else if ((f.assetId == a)) |
---|
12 | 12 | | then throw("Can hodl PAR7 only at the moment") |
---|
13 | 13 | | 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")) |
---|
18 | 19 | | then { |
---|
19 | | - | let j = i |
---|
20 | | - | j |
---|
| 20 | + | let k = j |
---|
| 21 | + | k |
---|
21 | 22 | | } |
---|
22 | 23 | | else 0 |
---|
23 | 24 | | } |
---|
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)] |
---|
26 | 27 | | } |
---|
27 | 28 | | } |
---|
28 | 29 | | |
---|
29 | 30 | | |
---|
30 | 31 | | |
---|
31 | 32 | | @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")) |
---|
37 | 38 | | then { |
---|
38 | | - | let j = i |
---|
39 | | - | j |
---|
| 39 | + | let k = j |
---|
| 40 | + | k |
---|
40 | 41 | | } |
---|
41 | 42 | | else 0 |
---|
42 | 43 | | } |
---|
43 | | - | let k = (h - m) |
---|
44 | | - | if ((e > l)) |
---|
| 44 | + | let l = (i - n) |
---|
| 45 | + | if ((e > m)) |
---|
45 | 46 | | then throw("Competition has already started") |
---|
46 | | - | else if ((0 > m)) |
---|
| 47 | + | else if ((0 > n)) |
---|
47 | 48 | | then throw("Can't withdraw negative amount") |
---|
48 | | - | else if ((0 > k)) |
---|
| 49 | + | else if ((0 > l)) |
---|
49 | 50 | | 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)] |
---|
51 | 52 | | } |
---|
52 | 53 | | |
---|
53 | 54 | | |
---|
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) |
---|
56 | 57 | | |
---|