tx · 82QTVuYdDdcBQRVWGqbuoUk3o5hNAeGN7vKFb4nZ3pEG 3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ: -0.01000000 Waves 2022.05.11 16:20 [2047061] smart account 3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ > SELF 0.00000000 Waves
{ "type": 13, "id": "82QTVuYdDdcBQRVWGqbuoUk3o5hNAeGN7vKFb4nZ3pEG", "fee": 1000000, "feeAssetId": null, "timestamp": 1652275299478, "version": 2, "chainId": 84, "sender": "3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ", "senderPublicKey": "BhRnrwd6wVHSkSaWXCjQRjaoXcpCdUW2hkJD6V7uVDxN", "proofs": [ "2PyKfr9zait2zNhhHMiveF9hcH1fLNz4NFYAU2RyPWJ8yXHPt3FtHqzkfSCyCrD2F4D9g1DVCfYv3CkfC7cDBXjM" ], "script": "base64:AAIFAAAAAAAAADYIAhIAEgQKAggBEgMKAQESBQoDCAgBEgQKAggBEgQKAggBEgASBAoCCAESBAoCCAESBAoCCAEAAAAMAAAAAApzaGlueXdnZ2lkAQAAACCJac8C/7a6udRxltd5uJl2JrB00Hd59HNuhvD0c58GJgAAAAAMYWRtaW5BZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXBOdGlQU1JTcTZObmFRWWszOEJmV1N6WmNnQVlUeXJROQAAAAANYXNzZXRzQWRkcmVzcwEAAAAaAVTL5rTBd9cdJy1rFhBLypFI6ymLChqVp5oAAAAADm5hdGlvbnNBZGRyZXNzAQAAABoBVE2F6N70+ERrWRA7cF/Dt7llDlH1REZtoAEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAAAQAAAA10cnlHZXR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us": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 71MsKjrx7rDqJ9qwAxhKeY59D7SuaycTWjPuHvBz2e57 Next: 5A6T118BKsE1cgCirdCjgbpXvEQctyqoTynXcath5y4X Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf' | |
5 | 5 | ||
6 | 6 | let b = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
7 | 7 | ||
8 | 8 | let c = base58'3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb' | |
9 | 9 | ||
10 | 10 | let d = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy' | |
11 | 11 | ||
12 | 12 | func e (f) = { | |
13 | 13 | let g = getInteger(this, f) | |
14 | 14 | if ($isInstanceOf(g, "Int")) | |
15 | 15 | then { | |
16 | 16 | let h = g | |
17 | 17 | h | |
18 | 18 | } | |
19 | 19 | else 0 | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func i (f) = { | |
24 | 24 | let g = getBoolean(this, f) | |
25 | 25 | if ($isInstanceOf(g, "Boolean")) | |
26 | 26 | then { | |
27 | 27 | let h = g | |
28 | 28 | h | |
29 | 29 | } | |
30 | 30 | else false | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func j (k) = (k + "_Treasury") | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func l (m,n) = { | |
38 | 38 | let o = e((m + "_Deposit")) | |
39 | 39 | [IntegerEntry((m + "_Deposit"), (o + n))] | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func p (m,o) = { | |
44 | 44 | let q = e((m + "_Deposit")) | |
45 | 45 | if ((0 > (q - o))) | |
46 | 46 | then throw("Not enough deposit.") | |
47 | 47 | else if (((q - o) == 0)) | |
48 | 48 | then [DeleteEntry((m + "_Deposit"))] | |
49 | 49 | else [IntegerEntry((m + "_Deposit"), (q - o))] | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func r (m,o) = { | |
54 | 54 | let s = e((m + "_Reserved")) | |
55 | 55 | [IntegerEntry((m + "_Reserved"), (s + o))] | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func t (u,v,o) = (p(u, o) ++ l(v, o)) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func w (x) = if (if (if ((x == b)) | |
63 | 63 | then true | |
64 | 64 | else (x == this)) | |
65 | 65 | then true | |
66 | 66 | else (x.bytes == d)) | |
67 | 67 | then true | |
68 | 68 | else (x.bytes == c) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | @Callable(y) | |
72 | 72 | func Deposit () = { | |
73 | 73 | let m = toString(y.originCaller) | |
74 | 74 | let z = y.payments[0] | |
75 | 75 | if ((z == z)) | |
76 | 76 | then { | |
77 | 77 | let n = value(y.payments[0].amount) | |
78 | 78 | if ((n == n)) | |
79 | 79 | then { | |
80 | 80 | let A = z.assetId | |
81 | 81 | if ((A == A)) | |
82 | 82 | then if ((A != a)) | |
83 | 83 | then throw("Only $HEG payments allowed") | |
84 | 84 | else { | |
85 | 85 | let o = e((m + "_Deposit")) | |
86 | 86 | $Tuple2(l(m, (o + n)), (o + n)) | |
87 | 87 | } | |
88 | 88 | else throw("Strict value is not equal to itself.") | |
89 | 89 | } | |
90 | 90 | else throw("Strict value is not equal to itself.") | |
91 | 91 | } | |
92 | 92 | else throw("Strict value is not equal to itself.") | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | ||
97 | 97 | @Callable(y) | |
98 | 98 | func Pay (m,o) = if (!(w(y.caller))) | |
99 | 99 | then throw("you are not authorized to perform this operation") | |
100 | 100 | else $Tuple2(p(m, o), o) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | ||
104 | 104 | @Callable(y) | |
105 | 105 | func CallerPay (o) = { | |
106 | 106 | let B = toString(y.caller) | |
107 | 107 | p(B, o) | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(y) | |
113 | 113 | func transferCoins (u,v,o) = if (if ((y.caller != b)) | |
114 | 114 | then (y.caller.bytes != c) | |
115 | 115 | else false) | |
116 | 116 | then throw("you are not authorized to perform this operation") | |
117 | 117 | else $Tuple2(t(u, v, o), o) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | ||
121 | 121 | @Callable(y) | |
122 | 122 | func callerTransferCoins (v,o) = t(toString(y.caller), v, o) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | @Callable(y) | |
127 | 127 | func arbitraryAddCoins (v,o) = if (if (if ((y.caller != b)) | |
128 | 128 | then (y.caller.bytes != c) | |
129 | 129 | else false) | |
130 | 130 | then (y.caller.bytes != d) | |
131 | 131 | else false) | |
132 | 132 | then throw("you are not authorized to perform this operation") | |
133 | 133 | else $Tuple2(l(v, o), o) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | ||
137 | 137 | @Callable(y) | |
138 | 138 | func Redeem () = { | |
139 | 139 | let m = toString(y.caller) | |
140 | 140 | let s = e((m + "_Reserved")) | |
141 | 141 | if ((s == 0)) | |
142 | 142 | then throw("Nothing to redeem") | |
143 | 143 | else [DeleteEntry((m + "_Reserved")), ScriptTransfer(y.caller, s, a)] | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(y) | |
149 | 149 | func addReward (m,o) = if (!(w(y.caller))) | |
150 | 150 | then throw("you are not authorized to perform this operation") | |
151 | 151 | else { | |
152 | 152 | let s = e((m + "_Reserved")) | |
153 | 153 | $Tuple2([IntegerEntry((m + "_Reserved"), (s + o))], (s + o)) | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | ||
158 | 158 | @Callable(y) | |
159 | 159 | func increaseNationWallet (C,o) = if (!(w(y.caller))) | |
160 | 160 | then throw("you are not authorized to perform this operation") | |
161 | 161 | else { | |
162 | 162 | let f = j(C) | |
163 | 163 | let s = e(f) | |
164 | 164 | $Tuple2([IntegerEntry(f, (s + o))], (s + o)) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | ||
169 | 169 | @Callable(y) | |
170 | 170 | func decreaseNationWallet (C,o) = if (!(w(y.caller))) | |
171 | 171 | then throw("you are not authorized to perform this operation") | |
172 | 172 | else { | |
173 | 173 | let f = j(C) | |
174 | 174 | let s = e(f) | |
175 | 175 | $Tuple2([IntegerEntry(f, (s - o))], (s - o)) | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 |
github/deemru/w8io/169f3d6 32.66 ms ◑