tx · GLi2qDHDZ7zbHkc1fhhjb9HkuSKkpodtCTupcLQNaLN9 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp: -0.01400000 Waves 2021.04.19 16:32 [1489411] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves
{ "type": 13, "id": "GLi2qDHDZ7zbHkc1fhhjb9HkuSKkpodtCTupcLQNaLN9", "fee": 1400000, "feeAssetId": null, "timestamp": 1618839156818, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "56hKFomqKiwqkNZXUwfwxzS1BNNEWjwyPJe8qxEwD8ba8qfadXKNH1RHQRQrLAzCY69pMCVsAMY1YxRKVSKnmDfB" ], "script": "base64:AAIEAAAAAAAAABIIAhIFCgMIAQESBwoFCAEBAQgAAAACAAAAAAZwYXI3SWQBAAAAIJedbhD+DwLKhAB/H26DYx4Zv6xpfO57kM3OSOXSB0EjAQAAAAdjdXJyZW50AAAAAQAAAAFpBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMAAAACAAAAAWkBAAAADnNwb25zb3JEZXBvc2l0AAAAAwAAAAtjb21wZU51bWJlcgAAABFjb21wZUVuZFRpbWVzdGFtcAAAAAl0aW1lc3RhbXAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJY3VycmVudElkCQEAAAAHY3VycmVudAAAAAEFAAAAAWkDCQAAZgAAAAIFAAAACXRpbWVzdGFtcAUAAAARY29tcGVFbmRUaW1lc3RhbXAJAAAC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dW50AwkAAGYAAAACAAAAAAAAAAAABQAAAAluZXdBbW91bnQJAAACAAAAAQIAAAASTm90IGVub3VnaCBiYWxhbmNlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAIc3BvbnNvcl8FAAAACmN1cnJlbnRLZXkCAAAAAV8FAAAAB2Fzc2V0SWQCAAAAAV8FAAAAC2NvbXBlTnVtYmVyBQAAAAluZXdBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAtjb21wZU51bWJlcgIAAAABXwUAAAAHYXNzZXRJZAUAAAAOY29tcGVOZXdBbW91bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5yGDoNw==", "height": 1489411, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7Xq5N8vsw6bQd6po8SpysYnn82577LWaUgeEpjVoTJLY Next: 2pmczVKDPqgmbKSqtWmpVhonzFLSe8eKK2H3JXcmYY3m Diff:
Old | New | Differences | |
---|---|---|---|
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(c) | |
49 | - | func sponsorWithdraw (e, | |
49 | + | func sponsorWithdraw (e,f,g,p,q) = { | |
50 | 50 | let i = toBase58String(c.caller.bytes) | |
51 | 51 | let j = { | |
52 | - | let k = getInteger(this, ((((("sponsor_" + i) + "_") + | |
52 | + | let k = getInteger(this, ((((("sponsor_" + i) + "_") + q) + "_") + e)) | |
53 | 53 | if ($isInstanceOf(k, "Int")) | |
54 | 54 | then { | |
55 | 55 | let l = k | |
57 | 57 | } | |
58 | 58 | else 0 | |
59 | 59 | } | |
60 | - | let m = (j - | |
60 | + | let m = (j - p) | |
61 | 61 | let n = { | |
62 | - | let k = getInteger(this, ((e + "_") + | |
62 | + | let k = getInteger(this, ((e + "_") + q)) | |
63 | 63 | if ($isInstanceOf(k, "Int")) | |
64 | 64 | then { | |
65 | 65 | let l = k | |
67 | 67 | } | |
68 | 68 | else 0 | |
69 | 69 | } | |
70 | - | let o = (n - | |
71 | - | if ((g > | |
72 | - | then throw("Competition | |
73 | - | else if ((0 > | |
70 | + | let o = (n - p) | |
71 | + | if ((g > f)) | |
72 | + | then throw("Competition is finished") | |
73 | + | else if ((0 > p)) | |
74 | 74 | then throw("Can't withdraw negative amount") | |
75 | 75 | else if ((0 > m)) | |
76 | 76 | then throw("Not enough balance") | |
77 | - | else [IntegerEntry(((((("sponsor_" + i) + "_") + | |
77 | + | else [IntegerEntry(((((("sponsor_" + i) + "_") + q) + "_") + e), m), IntegerEntry(((e + "_") + q), o)] | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | - | @Verifier( | |
82 | - | func | |
81 | + | @Verifier(r) | |
82 | + | func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey) | |
83 | 83 |
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, ((((("sponsor_" + i) + "_") + h) + "_") + e)) | |
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 | let n = { | |
33 | 33 | let k = getInteger(this, ((e + "_") + h)) | |
34 | 34 | if ($isInstanceOf(k, "Int")) | |
35 | 35 | then { | |
36 | 36 | let l = k | |
37 | 37 | l | |
38 | 38 | } | |
39 | 39 | else 0 | |
40 | 40 | } | |
41 | 41 | let o = (n + d.amount) | |
42 | 42 | [IntegerEntry(((((("sponsor_" + i) + "_") + h) + "_") + e), m), IntegerEntry(((e + "_") + h), o)] | |
43 | 43 | } | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(c) | |
49 | - | func sponsorWithdraw (e, | |
49 | + | func sponsorWithdraw (e,f,g,p,q) = { | |
50 | 50 | let i = toBase58String(c.caller.bytes) | |
51 | 51 | let j = { | |
52 | - | let k = getInteger(this, ((((("sponsor_" + i) + "_") + | |
52 | + | let k = getInteger(this, ((((("sponsor_" + i) + "_") + q) + "_") + e)) | |
53 | 53 | if ($isInstanceOf(k, "Int")) | |
54 | 54 | then { | |
55 | 55 | let l = k | |
56 | 56 | l | |
57 | 57 | } | |
58 | 58 | else 0 | |
59 | 59 | } | |
60 | - | let m = (j - | |
60 | + | let m = (j - p) | |
61 | 61 | let n = { | |
62 | - | let k = getInteger(this, ((e + "_") + | |
62 | + | let k = getInteger(this, ((e + "_") + q)) | |
63 | 63 | if ($isInstanceOf(k, "Int")) | |
64 | 64 | then { | |
65 | 65 | let l = k | |
66 | 66 | l | |
67 | 67 | } | |
68 | 68 | else 0 | |
69 | 69 | } | |
70 | - | let o = (n - | |
71 | - | if ((g > | |
72 | - | then throw("Competition | |
73 | - | else if ((0 > | |
70 | + | let o = (n - p) | |
71 | + | if ((g > f)) | |
72 | + | then throw("Competition is finished") | |
73 | + | else if ((0 > p)) | |
74 | 74 | then throw("Can't withdraw negative amount") | |
75 | 75 | else if ((0 > m)) | |
76 | 76 | then throw("Not enough balance") | |
77 | - | else [IntegerEntry(((((("sponsor_" + i) + "_") + | |
77 | + | else [IntegerEntry(((((("sponsor_" + i) + "_") + q) + "_") + e), m), IntegerEntry(((e + "_") + q), o)] | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | - | @Verifier( | |
82 | - | func | |
81 | + | @Verifier(r) | |
82 | + | func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey) | |
83 | 83 |
github/deemru/w8io/169f3d6 26.94 ms ◑