tx · FoYhckbmVawhzQvsWRNpSaTBRuKZMY1XG4q2Shx1uwXk 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp: -0.01000000 Waves 2021.04.16 09:57 [1484672] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves
{ "type": 13, "id": "FoYhckbmVawhzQvsWRNpSaTBRuKZMY1XG4q2Shx1uwXk", "fee": 1000000, "feeAssetId": null, "timestamp": 1618556244343, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "Qbv8jUE1BBkwpjnCELEXrrgaaejP87maKWR5SFQbPx7LmKp9Ae1Bu6uZm8vtHSxkTPLVUgqpyCAESVXDBnisXFb" ], "script": "base64:AAIEAAAAAAAAABEIAhIFCgMIAQESBgoECAEBAQAAAAEAAAAABnBhcjdJZAEAAAAgl51uEP4PAsqEAH8fboNjHhm/rGl87nuQzc5I5dIHQSMAAAACAAAAAWkBAAAADnNwb25zb3JEZXBvc2l0AAAAAwAAAAtjb21wZU51bWJlcgAAABFjb21wZUVuZFRpbWVzdGFtcAAAAAl0aW1lc3RhbXAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAABmAAAAAgUAAAAJdGltZXN0YW1wBQAAABFjb21wZUVuZFRpbWVzdGFtcAkAAAIAAAABAgAAABdDb21wZXRpdGlvbiBpcyBmaW5pc2hlZAMJAAAAAAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAZwYXI3SWQJAAACAAAAAQIAAAAgQ2FuIGhvZGwgUEFSNyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABB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AAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAJbmV3QW1vdW50CQAAAgAAAAECAAAAEk5vdCBlbm91Z2ggYmFsYW5jZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAIc3BvbnNvcl8FAAAACmN1cnJlbnRLZXkCAAAAAV8FAAAAC2NvbXBlTnVtYmVyBQAAAAluZXdBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAC2NvbXBlTnVtYmVyBQAAAAluZXdBbW91bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5LHrlYA==", "height": 1484672, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: HP8QZfFYaQwrf1N4jixeeADCPMRYKwRe5ZFK7ben4mG5 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4' | |
5 | + | ||
6 | + | @Callable(b) | |
7 | + | func sponsorDeposit (c,d,e) = { | |
8 | + | let f = b.payments[0] | |
9 | + | if ((e > d)) | |
10 | + | then throw("Competition is finished") | |
11 | + | else if ((f.assetId == a)) | |
12 | + | then throw("Can hodl PAR7 only at the moment") | |
13 | + | else { | |
14 | + | let g = toBase58String(b.caller.bytes) | |
15 | + | let h = { | |
16 | + | let i = getInteger(this, g) | |
17 | + | if ($isInstanceOf(i, "Int")) | |
18 | + | then { | |
19 | + | let j = i | |
20 | + | j | |
21 | + | } | |
22 | + | else 0 | |
23 | + | } | |
24 | + | let k = (h + f.amount) | |
25 | + | [IntegerEntry(((("sponsor_" + g) + "_") + c), k), IntegerEntry(c, k)] | |
26 | + | } | |
27 | + | } | |
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | @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")) | |
37 | + | then { | |
38 | + | let j = i | |
39 | + | j | |
40 | + | } | |
41 | + | else 0 | |
42 | + | } | |
43 | + | let k = (h - m) | |
44 | + | if ((e > l)) | |
45 | + | then throw("Competition has already started") | |
46 | + | else if ((0 > m)) | |
47 | + | then throw("Can't withdraw negative amount") | |
48 | + | else if ((0 > k)) | |
49 | + | then throw("Not enough balance") | |
50 | + | else [IntegerEntry(((("sponsor_" + g) + "_") + c), k), IntegerEntry(c, k)] | |
51 | + | } | |
52 | + | ||
53 | + | ||
54 | + | @Verifier(n) | |
55 | + | func o () = sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey) | |
56 | + |
github/deemru/w8io/169f3d6 20.86 ms ◑