tx · 5dfTQBUf4mjFaVjbqJe1kzyjKGdqG6DYFe69sUanuYvm 3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua: -0.01400000 Waves 2021.03.15 17:00 [1438928] smart account 3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua > SELF 0.00000000 Waves
{ "type": 13, "id": "5dfTQBUf4mjFaVjbqJe1kzyjKGdqG6DYFe69sUanuYvm", "fee": 1400000, "feeAssetId": null, "timestamp": 1615816808990, "version": 2, "chainId": 84, "sender": "3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua", "senderPublicKey": "CTyHhnVTxf16Z4CmGGneAK8WB5g2QyT4MB8kUn8vPPcu", "proofs": [ "3pmapJVdy1RNo3m8BHEzfFp1SFZf1TGvZMimPsUMuFEGdym8ktbnjaW9Z5eW9xwnkvmpsheH8QH7qC1u9kNHETcA" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAACAQAAAAxpc1dhdmVzQXNzZXQAAAABAAAAB2Fzc2V0SWQEAAAAByRtYXRjaDAFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAABWFzc2V0BQAAAAckbWF0Y2gwBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAAFd2F2ZXMFAAAAByRtYXRjaDAGCQAAAgAAAAECAAAAC01hdGNoIGVycm9yAQAAABBnZXRUcmVhc3VyeVZhbHVlAAAAAQAAAAdhc3NldElkBAAAAAx0cmVhc3VyeU5hbWUEAAAAByRtYXRjaDAFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAABWFzc2V0BQAAAAckbWF0Y2gwCQABLAAAAAICAAAACVRyZWFzdXJ5LQkAAlgAAAABBQAAAAVhc3NldAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAANzdHIFAAAAByRtYXRjaD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F0Y2gwAgAAAANJbnQEAAAAA3ZhbAUAAAAHJG1hdGNoMAUAAAADdmFsBAAAAARudWxsBQAAAAckbWF0Y2gwCQAAAgAAAAECAAAAJURhdGEgbWlzc2luZzogJ2dvdmVybm9yQ3JlYXRpb25QcmljZScDCQEAAAACIT0AAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQFAAAAFWdvdmVybm9yQ3JlYXRpb25QcmljZQkAAAIAAAABAgAAABdOb3QgYSB2YWxpZCBhbW91bnQgc2VudAQAAAALZ292Q29udHJhY3QJAARCAAAABQIAAAAQR292ZXJub3JDb250cmFjdAkAAaQAAAABBQAAAAZoZWlnaHQAAAAAAAAAAAEAAAAAAAAAAAAHBAAAAA1nb3ZDb250cmFjdElkCQAEOAAAAAEFAAAAC2dvdkNvbnRyYWN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAA5UcmVhc3VyeS1XQVZFUwkAAGQAAAACCQEAAAAQZ2V0VHJlYXN1cnlWYWx1ZQAAAAECAAAABVdBVkVTCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQJAARMAAAAAgUAAAALZ292Q29udHJhY3QJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCAUAAAALZ292Q29udHJhY3QAAAAIcXVhbnRpdHkFAAAADWdvdkNvbnRyYWN0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5s6P4DA==", "height": 1438928, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GUwUBq2f1UWYheHhcuFGKZMR3LU1sNSwJYCae9kNm4tQ Next: UF3eaEgYPUUtwtUxJFMMBP5ZqHADjpHrNqM2WN6VwcC Diff:
Old | New | Differences | |
---|---|---|---|
79 | 79 | else { | |
80 | 80 | let m = Issue("GovernorContract", toString(height), 1, 0, false) | |
81 | 81 | let n = calculateAssetId(m) | |
82 | - | [ | |
82 | + | [IntegerEntry("Treasury-WAVES", (f("WAVES") + k.payments[0].amount)), m, ScriptTransfer(k.caller, m.quantity, n)] | |
83 | 83 | } | |
84 | 84 | } | |
85 | 85 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = b | |
6 | 6 | if ($isInstanceOf(c, "ByteVector")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | false | |
10 | 10 | } | |
11 | 11 | else if ($isInstanceOf(c, "Unit")) | |
12 | 12 | then { | |
13 | 13 | let e = c | |
14 | 14 | true | |
15 | 15 | } | |
16 | 16 | else throw("Match error") | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func f (b) = { | |
21 | 21 | let g = { | |
22 | 22 | let c = b | |
23 | 23 | if ($isInstanceOf(c, "ByteVector")) | |
24 | 24 | then { | |
25 | 25 | let d = c | |
26 | 26 | ("Treasury-" + toBase58String(d)) | |
27 | 27 | } | |
28 | 28 | else if ($isInstanceOf(c, "String")) | |
29 | 29 | then { | |
30 | 30 | let h = c | |
31 | 31 | ("Treasury-" + h) | |
32 | 32 | } | |
33 | 33 | else if ($isInstanceOf(c, "Unit")) | |
34 | 34 | then throw("Unknown treasury") | |
35 | 35 | else throw("Match error") | |
36 | 36 | } | |
37 | 37 | let c = getInteger(this, g) | |
38 | 38 | if ($isInstanceOf(c, "Int")) | |
39 | 39 | then { | |
40 | 40 | let i = c | |
41 | 41 | i | |
42 | 42 | } | |
43 | 43 | else { | |
44 | 44 | let j = c | |
45 | 45 | 0 | |
46 | 46 | } | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Callable(k) | |
51 | 51 | func init () = if ((this != k.caller)) | |
52 | 52 | then throw("Access denied") | |
53 | 53 | else [IntegerEntry("governorCreationPrice", 1)] | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | ||
57 | 57 | @Callable(k) | |
58 | 58 | func createGovernor () = if ((size(k.payments) != 1)) | |
59 | 59 | then throw("No payment attached") | |
60 | 60 | else if ((this == k.caller)) | |
61 | 61 | then throw("dApp self sending is denied") | |
62 | 62 | else if ((a(k.payments[0].assetId) == false)) | |
63 | 63 | then throw("Payment should be in WAVES") | |
64 | 64 | else { | |
65 | 65 | let l = { | |
66 | 66 | let c = getInteger(this, "governorCreationPrice") | |
67 | 67 | if ($isInstanceOf(c, "Int")) | |
68 | 68 | then { | |
69 | 69 | let i = c | |
70 | 70 | i | |
71 | 71 | } | |
72 | 72 | else { | |
73 | 73 | let j = c | |
74 | 74 | throw("Data missing: 'governorCreationPrice'") | |
75 | 75 | } | |
76 | 76 | } | |
77 | 77 | if ((k.payments[0].amount != l)) | |
78 | 78 | then throw("Not a valid amount sent") | |
79 | 79 | else { | |
80 | 80 | let m = Issue("GovernorContract", toString(height), 1, 0, false) | |
81 | 81 | let n = calculateAssetId(m) | |
82 | - | [ | |
82 | + | [IntegerEntry("Treasury-WAVES", (f("WAVES") + k.payments[0].amount)), m, ScriptTransfer(k.caller, m.quantity, n)] | |
83 | 83 | } | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | @Verifier(o) | |
88 | 88 | func p () = sigVerify(o.bodyBytes, o.proofs[0], o.senderPublicKey) | |
89 | 89 |
github/deemru/w8io/169f3d6 42.60 ms ◑