tx · DXEVxGLoaYFoc84bW44jq8cundW2CH3pX4BqJgctpQyX 3NBPqqjDH2eYmoHeXNPnHhLvA7D4UDQXQcx: -0.01400000 Waves 2021.02.17 16:20 [1402199] smart account 3NBPqqjDH2eYmoHeXNPnHhLvA7D4UDQXQcx > SELF 0.00000000 Waves
{ "type": 13, "id": "DXEVxGLoaYFoc84bW44jq8cundW2CH3pX4BqJgctpQyX", "fee": 1400000, "feeAssetId": null, "timestamp": 1613568079994, "version": 2, "chainId": 84, "sender": "3NBPqqjDH2eYmoHeXNPnHhLvA7D4UDQXQcx", "senderPublicKey": "2VJESL5o2hqRwaKdJGDXpzJ7jNDcZz5y4C6qWEaUn4yY", "proofs": [ "52ZBHpmCv9KKBYTZ1N8g3cfSxtQk8idwCSdALNcF1re1HRvbXLzL2HtK8X8GwC5WsnaXmtdRumwbwKuzigGK5Pqx" ], "script": "base64:AAIEAAAAAAAAABwIAhIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIAAAAJQAAAAAETk9ORQIAAAAEbm9uZQAAAAAGQkFOTkVEAgAAAAZiYW5uZWQAAAAABkFDVElWRQIAAAAGYWN0aXZlAAAAAAVDTE9TRQIAAAAFY2xvc2UAAAAABE9QRU4CAAAABG9wZW4AAAAACGFzc2V0S2V5AgAAAAVhc3NldAAAAAALa2V5UHJpY2VLZXkCAAAACWtleV9wcmljZQAAAAAIb3duZXJLZXkCAAAABW93bmVyAAAAABByZWNoYXJnZUxpbWl0S2V5AgAAAA5yZWNoYXJnZV9saW1pdAAAAAAHYWN0aW9ucwkABEwAAAACBQAAAARPUEVOCQAETAAAAAIFAAAABUNMT1NFBQAAAANuaWwAAAAAFGRldmljZUluaXRpYWxDb3VudGVyAAAAAAAAAAAAAAAAAAlrZXlEZXZpY2UAAAAAAAAAAAAAAAAADWtleVZhbGlkVW50aWwAAAAAAAAAAAEBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEd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ZW50QWRkcgAAAAAAAAAAAQgFAAAAB2tleUluZm8AAAACaWQFAAAAA25pbAkBAAAAEHJlY2hhcmdlSWZOZWVkZWQAAAADBQAAAA1yZWNpcGllbnRBZGRyBQAAAAhyZWNoYXJnZQkBAAAAEHJlY2hhcmdlSWZOZWVkZWQAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACHJlY2hhcmdlBQAAAAh0cmFuc2ZlcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5eKIhBQ==", "height": 1402199, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AvxzJqAZowY6NgV8LZQ4MpFymzsB5qiuJ2fF31rJZrFY Next: FmDub9Qr1uwiBP3QxnBGG56VnNKjtbWiGStUVxTevUiN Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "none" | |
5 | 5 | ||
6 | 6 | let b = "banned" | |
7 | 7 | ||
8 | 8 | let c = "active" | |
9 | 9 | ||
10 | 10 | let d = "close" | |
11 | 11 | ||
12 | 12 | let e = "open" | |
13 | 13 | ||
14 | 14 | let f = "asset" | |
15 | 15 | ||
16 | 16 | let g = "key_price" | |
17 | 17 | ||
18 | 18 | let h = "owner" | |
19 | 19 | ||
20 | 20 | let i = "recharge_limit" | |
21 | 21 | ||
22 | 22 | let j = [e, d] | |
23 | 23 | ||
24 | 24 | let k = 0 | |
25 | 25 | ||
26 | 26 | let l = 0 | |
27 | 27 | ||
28 | 28 | let m = 1 | |
29 | 29 | ||
30 | 30 | func n (o) = { | |
31 | 31 | let p = getInteger(this, o) | |
32 | 32 | if ($isInstanceOf(p, "Int")) | |
33 | 33 | then { | |
34 | 34 | let q = p | |
35 | 35 | q | |
36 | 36 | } | |
37 | 37 | else 0 | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func r (o) = { | |
42 | 42 | let p = getString(this, o) | |
43 | 43 | if ($isInstanceOf(p, "String")) | |
44 | 44 | then { | |
45 | 45 | let q = p | |
46 | 46 | q | |
47 | 47 | } | |
48 | 48 | else a | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func s (o) = { | |
53 | 53 | let p = getInteger(this, o) | |
54 | 54 | if ($isInstanceOf(p, "Int")) | |
55 | 55 | then { | |
56 | 56 | let q = p | |
57 | 57 | q | |
58 | 58 | } | |
59 | 59 | else 0 | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func t (u,o) = { | |
64 | 64 | let p = getString(u, o) | |
65 | 65 | if ($isInstanceOf(p, "String")) | |
66 | 66 | then { | |
67 | 67 | let q = p | |
68 | 68 | q | |
69 | 69 | } | |
70 | 70 | else a | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func v () = fromBase58String(r(f)) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func w (u) = ("user_" + u) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func x (u) = { | |
81 | 81 | let p = getString(this, w(u)) | |
82 | 82 | if ($isInstanceOf(p, "String")) | |
83 | 83 | then { | |
84 | 84 | let q = p | |
85 | 85 | q | |
86 | 86 | } | |
87 | 87 | else a | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func y (u) = ("device_" + u) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func z (u) = ("device_counter_" + u) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func A (u) = r(y(u)) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func B (u) = n(z(u)) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func C (D) = ("key_" + D) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func E (D) = r(C(D)) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func F (G,o) = { | |
110 | 110 | let H = C(o) | |
111 | 111 | let I = t(G, H) | |
112 | 112 | if ((I != a)) | |
113 | 113 | then false | |
114 | 114 | else true | |
115 | 115 | } | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func J (o) = { | |
119 | 119 | let G = split(o.description, "_")[l] | |
120 | 120 | let p = addressFromString(G) | |
121 | 121 | if ($isInstanceOf(p, "Address")) | |
122 | 122 | then { | |
123 | 123 | let K = p | |
124 | 124 | K | |
125 | 125 | } | |
126 | 126 | else throw("Not a device key") | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func L (M) = { | |
131 | 131 | let p = assetInfo(M) | |
132 | 132 | if ($isInstanceOf(p, "Asset")) | |
133 | 133 | then { | |
134 | 134 | let K = p | |
135 | 135 | K | |
136 | 136 | } | |
137 | 137 | else throw("Not a key") | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func N (o) = { | |
142 | 142 | let O = parseIntValue(split(o.description, "_")[m]) | |
143 | 143 | (lastBlock.timestamp > O) | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func P (G) = { | |
148 | 148 | let p = getInteger(G, g) | |
149 | 149 | if ($isInstanceOf(p, "Int")) | |
150 | 150 | then { | |
151 | 151 | let K = p | |
152 | 152 | K | |
153 | 153 | } | |
154 | 154 | else throw("Price not specified in device") | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func Q (G) = { | |
159 | 159 | let p = getString(G, h) | |
160 | 160 | if ($isInstanceOf(p, "String")) | |
161 | 161 | then { | |
162 | 162 | let K = p | |
163 | 163 | K | |
164 | 164 | } | |
165 | 165 | else throw("Owner not specified in device") | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func R (S,T,U) = if ((1 > size(S.payments))) | |
170 | 170 | then throw("wrong payments count") | |
171 | 171 | else if ((S.payments[0].assetId != unit)) | |
172 | 172 | then throw("wrong asset, supported only wws") | |
173 | 173 | else if ((S.payments[0].amount != U)) | |
174 | 174 | then throw(("wrong payment value, expected " + toString(U))) | |
175 | 175 | else false | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func V (W) = { | |
179 | 179 | let p = W.assetId | |
180 | 180 | if ($isInstanceOf(p, "ByteVector")) | |
181 | 181 | then { | |
182 | 182 | let K = p | |
183 | 183 | K | |
184 | 184 | } | |
185 | 185 | else throw("Wrong asset") | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func X (S) = if ((size(S.payments) != 1)) | |
190 | 190 | then throw("wrong assets count") | |
191 | 191 | else { | |
192 | 192 | let M = L(V(S.payments[0])) | |
193 | 193 | if ((M.issuer != this)) | |
194 | 194 | then throw("wrong asset issuer") | |
195 | 195 | else if (N(M)) | |
196 | 196 | then throw("key expired") | |
197 | 197 | else M | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func Y (Z,aa,ab) = if (if ((aa > wavesBalance(Z).regular)) | |
202 | 202 | then (aa != 0) | |
203 | 203 | else false) | |
204 | 204 | then ScriptTransfer(Z, aa, unit) :: ab | |
205 | 205 | else ab | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func ac (ad) = { | |
209 | 209 | let p = indexOf(j, ad) | |
210 | 210 | if ($isInstanceOf(p, "Int")) | |
211 | 211 | then { | |
212 | 212 | let q = p | |
213 | 213 | false | |
214 | 214 | } | |
215 | 215 | else true | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Callable(S) | |
220 | 220 | func addDevice (ae) = if ((S.caller != this)) | |
221 | 221 | then throw("Not permitted") | |
222 | 222 | else if ((A(ae) != a)) | |
223 | 223 | then throw("Device already added") | |
224 | 224 | else [StringEntry(y(ae), d), IntegerEntry(z(ae), k)] | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | ||
228 | 228 | @Callable(S) | |
229 | 229 | func addUser (ae) = if ((S.caller != this)) | |
230 | 230 | then throw("Not permitted") | |
231 | 231 | else [StringEntry(w(ae), c)] | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | ||
235 | 235 | @Callable(S) | |
236 | 236 | func removeUser (ae) = if ((S.caller != this)) | |
237 | 237 | then throw("Not permitted") | |
238 | 238 | else [DeleteEntry(w(ae))] | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | ||
242 | 242 | @Callable(S) | |
243 | 243 | func deviceAction (af,ad) = { | |
244 | 244 | let ag = (1 > assetBalance(S.caller, fromBase58String(af))) | |
245 | 245 | let ah = L(fromBase58String(af)) | |
246 | 246 | let G = J(ah) | |
247 | 247 | let ai = toBase58String(G.bytes) | |
248 | 248 | let aj = s(i) | |
249 | 249 | if (ag) | |
250 | 250 | then throw("Key not owned") | |
251 | 251 | else if ((y(ai) == a)) | |
252 | 252 | then throw("No such device") | |
253 | 253 | else if (F(G, af)) | |
254 | 254 | then throw("Key not whitelisted") | |
255 | 255 | else if (ac(ad)) | |
256 | 256 | then throw("Action is not allowed") | |
257 | 257 | else if (N(ah)) | |
258 | 258 | then throw("Key expired") | |
259 | 259 | else { | |
260 | 260 | let ak = [StringEntry(y(ai), ad), IntegerEntry(z(ai), (B(ai) + 1))] | |
261 | 261 | if (if ((aj > wavesBalance(S.caller).regular)) | |
262 | 262 | then (aj != 0) | |
263 | 263 | else false) | |
264 | 264 | then ScriptTransfer(S.caller, aj, unit) :: ak | |
265 | 265 | else ak | |
266 | 266 | } | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | ||
271 | 271 | @Callable(S) | |
272 | 272 | func transferKey (al) = { | |
273 | 273 | let ah = X(S) | |
274 | 274 | let aj = n(i) | |
275 | 275 | let am = addressFromStringValue(al) | |
276 | 276 | let an = [ScriptTransfer(am, 1, ah.id)] | |
277 | 277 | Y(am, aj, Y(S.caller, aj, an)) | |
278 | 278 | } | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | @Verifier(ao) | |
282 | 282 | func ap () = sigVerify(ao.bodyBytes, ao.proofs[0], ao.senderPublicKey) | |
283 | 283 |
github/deemru/w8io/026f985 31.17 ms ◑