tx · 7i4nPFX4HSh2uyfgwKviBeuRbue8rePJnaXxX5Ny45J7 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp: -0.01400000 Waves 2021.04.18 03:07 [1487161] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves
{ "type": 13, "id": "7i4nPFX4HSh2uyfgwKviBeuRbue8rePJnaXxX5Ny45J7", "fee": 1400000, "feeAssetId": null, "timestamp": 1618704472166, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "5hrbS74Ssz2wLhKFU2XzUSqEetsUosZQhNemjmLB3PnFEmiYoLRKk9tqj6vWzWU9VpforCPxczX6ToSwXgAQNpX8" ], "script": "base64:AAIEAAAAAAAAABIIAhIFCgMIAQESBwoFCAEBAQgAAAACAAAAAAZwYXI3SWQBAAAAIJedbhD+DwLKhAB/H26DYx4Zv6xpfO57kM3OSOXSB0EjAQAAAAdjdXJyZW50AAAAAQAAAAFpBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMAAAACAAAAAWkBAAAADnNwb25zb3JEZXBvc2l0AAAAAwAAAAtjb21wZU51bWJlcgAAABFjb21wZUVuZFRpbWVzdGFtcAAAAAl0aW1lc3RhbXAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJY3VycmVudElkCQEAAAAHY3VycmVudAAAAAEFAAAAAWkDCQAAZgAAAAIFAAAACXRpbWVzdGFtcAUAAAARY29tcGVFbmRUaW1lc3RhbXAJAAACAAAAA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AgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABlAAAAAgUAAAANY3VycmVudEFtb3VudAUAAAAGYW1vdW50AwkAAGYAAAACBQAAAAl0aW1lc3RhbXAFAAAAE2NvbXBlU3RhcnRUaW1lc3RhbXAJAAACAAAAAQIAAAAfQ29tcGV0aXRpb24gaGFzIGFscmVhZHkgc3RhcnRlZAMJAABmAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAJbmV3QW1vdW50CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAACHNwb25zb3JfBQAAAApjdXJyZW50S2V5AgAAAAFfBQAAAAdhc3NldElkAgAAAAFfBQAAAAtjb21wZU51bWJlcgUAAAAJbmV3QW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAALY29tcGVOdW1iZXICAAAAAV8FAAAAB2Fzc2V0SWQFAAAACW5ld0Ftb3VudAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXllCfrB", "height": 1487161, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CL7LGWjXy6v7xepRUUVf6ZTmNVGYshK2soMKcacGFQcH Next: AMwredNdsoVgdpu3Rb2QwXJT19PBP1iKNWb7YUSDcM6W Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | func sponsorWithDraw (e,n,g,o,p) = { | |
40 | 40 | let i = toBase58String(c.caller.bytes) | |
41 | 41 | let j = { | |
42 | - | let k = getInteger(this, ((i + "_") + e)) | |
42 | + | let k = getInteger(this, ((((("sponsor_" + i) + "_") + p) + "_") + e)) | |
43 | 43 | if ($isInstanceOf(k, "Int")) | |
44 | 44 | then { | |
45 | 45 | let l = k |
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 | func b (c) = { | |
7 | 7 | let d = c.payments[0] | |
8 | 8 | if (isDefined(d.assetId)) | |
9 | 9 | then toBase58String(value(d.assetId)) | |
10 | 10 | else "WAVES" | |
11 | 11 | } | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | @Callable(c) | |
15 | 15 | func sponsorDeposit (e,f,g) = { | |
16 | 16 | let d = c.payments[0] | |
17 | 17 | let h = b(c) | |
18 | 18 | if ((g > f)) | |
19 | 19 | then throw("Competition is finished") | |
20 | 20 | else { | |
21 | 21 | let i = toBase58String(c.caller.bytes) | |
22 | 22 | let j = { | |
23 | 23 | let k = getInteger(this, i) | |
24 | 24 | if ($isInstanceOf(k, "Int")) | |
25 | 25 | then { | |
26 | 26 | let l = k | |
27 | 27 | l | |
28 | 28 | } | |
29 | 29 | else 0 | |
30 | 30 | } | |
31 | 31 | let m = (j + d.amount) | |
32 | 32 | [IntegerEntry(((((("sponsor_" + i) + "_") + h) + "_") + e), m), IntegerEntry(((e + "_") + h), m)] | |
33 | 33 | } | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
38 | 38 | @Callable(c) | |
39 | 39 | func sponsorWithDraw (e,n,g,o,p) = { | |
40 | 40 | let i = toBase58String(c.caller.bytes) | |
41 | 41 | let j = { | |
42 | - | let k = getInteger(this, ((i + "_") + e)) | |
42 | + | let k = getInteger(this, ((((("sponsor_" + i) + "_") + p) + "_") + e)) | |
43 | 43 | if ($isInstanceOf(k, "Int")) | |
44 | 44 | then { | |
45 | 45 | let l = k | |
46 | 46 | l | |
47 | 47 | } | |
48 | 48 | else 0 | |
49 | 49 | } | |
50 | 50 | let m = (j - o) | |
51 | 51 | if ((g > n)) | |
52 | 52 | then throw("Competition has already started") | |
53 | 53 | else if ((0 > o)) | |
54 | 54 | then throw("Can't withdraw negative amount") | |
55 | 55 | else if ((0 > m)) | |
56 | 56 | then throw("Not enough balance") | |
57 | 57 | else [IntegerEntry(((((("sponsor_" + i) + "_") + p) + "_") + e), m), IntegerEntry(((e + "_") + p), m)] | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Verifier(q) | |
62 | 62 | func r () = sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) | |
63 | 63 |
github/deemru/w8io/169f3d6 24.39 ms ◑