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:AAIEAAAAAAAAABwIAhIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIAAAAJQAAAAAETk9ORQIAAAAEbm9uZQAAAAAGQkFOTkVEAgAAAAZiYW5uZWQAAAAABkFDVElWRQIAAAAGYWN0aXZlAAAAAAVDTE9TRQIAAAAFY2xvc2UAAAAABE9QRU4CAAAABG9wZW4AAAAACGFzc2V0S2V5AgAAAAVhc3NldAAAAAALa2V5UHJpY2VLZXkCAAAACWtleV9wcmljZQAAAAAIb3duZXJLZXkCAAAABW93bmVyAAAAABByZWNoYXJnZUxpbWl0S2V5AgAAAA5yZWNoYXJnZV9saW1pdAAAAAAHYWN0aW9ucwkABEwAAAACBQAAAARPUEVOCQAETAAAAAIFAAAABUNMT1NFBQAAAANuaWwAAAAAFGRldmljZUluaXRpYWxDb3VudGVyAAAAAAAAAAAAAAAAAAlrZXlEZXZpY2UAAAAAAAAAAAAAAAAADWtleVZhbGlkVW50aWwAAAAAAAAAAAEBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAE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pZW50QWRkcgAAAAAAAAAAAQgFAAAAB2tleUluZm8AAAACaWQFAAAAA25pbAkBAAAAEHJlY2hhcmdlSWZOZWVkZWQAAAADBQAAAA1yZWNpcGllbnRBZGRyBQAAAAhyZWNoYXJnZQkBAAAAEHJlY2hhcmdlSWZOZWVkZWQAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACHJlY2hhcmdlBQAAAAh0cmFuc2ZlcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5eKIhBQ==", "height": 1402199, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AvxzJqAZowY6NgV8LZQ4MpFymzsB5qiuJ2fF31rJZrFY Next: FmDub9Qr1uwiBP3QxnBGG56VnNKjtbWiGStUVxTevUiN Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "none"
55
66 let b = "banned"
77
88 let c = "active"
99
1010 let d = "close"
1111
1212 let e = "open"
1313
1414 let f = "asset"
1515
1616 let g = "key_price"
1717
1818 let h = "owner"
1919
2020 let i = "recharge_limit"
2121
2222 let j = [e, d]
2323
2424 let k = 0
2525
2626 let l = 0
2727
2828 let m = 1
2929
3030 func n (o) = {
3131 let p = getInteger(this, o)
3232 if ($isInstanceOf(p, "Int"))
3333 then {
3434 let q = p
3535 q
3636 }
3737 else 0
3838 }
3939
4040
4141 func r (o) = {
4242 let p = getString(this, o)
4343 if ($isInstanceOf(p, "String"))
4444 then {
4545 let q = p
4646 q
4747 }
4848 else a
4949 }
5050
5151
5252 func s (o) = {
5353 let p = getInteger(this, o)
5454 if ($isInstanceOf(p, "Int"))
5555 then {
5656 let q = p
5757 q
5858 }
5959 else 0
6060 }
6161
6262
6363 func t (u,o) = {
6464 let p = getString(u, o)
6565 if ($isInstanceOf(p, "String"))
6666 then {
6767 let q = p
6868 q
6969 }
7070 else a
7171 }
7272
7373
7474 func v () = fromBase58String(r(f))
7575
7676
7777 func w (u) = ("user_" + u)
7878
7979
8080 func x (u) = {
8181 let p = getString(this, w(u))
8282 if ($isInstanceOf(p, "String"))
8383 then {
8484 let q = p
8585 q
8686 }
8787 else a
8888 }
8989
9090
9191 func y (u) = ("device_" + u)
9292
9393
9494 func z (u) = ("device_counter_" + u)
9595
9696
9797 func A (u) = r(y(u))
9898
9999
100100 func B (u) = n(z(u))
101101
102102
103103 func C (D) = ("key_" + D)
104104
105105
106106 func E (D) = r(C(D))
107107
108108
109109 func F (G,o) = {
110110 let H = C(o)
111111 let I = t(G, H)
112112 if ((I != a))
113113 then false
114114 else true
115115 }
116116
117117
118118 func J (o) = {
119119 let G = split(o.description, "_")[l]
120120 let p = addressFromString(G)
121121 if ($isInstanceOf(p, "Address"))
122122 then {
123123 let K = p
124124 K
125125 }
126126 else throw("Not a device key")
127127 }
128128
129129
130130 func L (M) = {
131131 let p = assetInfo(M)
132132 if ($isInstanceOf(p, "Asset"))
133133 then {
134134 let K = p
135135 K
136136 }
137137 else throw("Not a key")
138138 }
139139
140140
141141 func N (o) = {
142142 let O = parseIntValue(split(o.description, "_")[m])
143143 (lastBlock.timestamp > O)
144144 }
145145
146146
147147 func P (G) = {
148148 let p = getInteger(G, g)
149149 if ($isInstanceOf(p, "Int"))
150150 then {
151151 let K = p
152152 K
153153 }
154154 else throw("Price not specified in device")
155155 }
156156
157157
158158 func Q (G) = {
159159 let p = getString(G, h)
160160 if ($isInstanceOf(p, "String"))
161161 then {
162162 let K = p
163163 K
164164 }
165165 else throw("Owner not specified in device")
166166 }
167167
168168
169169 func R (S,T,U) = if ((1 > size(S.payments)))
170170 then throw("wrong payments count")
171171 else if ((S.payments[0].assetId != unit))
172172 then throw("wrong asset, supported only wws")
173173 else if ((S.payments[0].amount != U))
174174 then throw(("wrong payment value, expected " + toString(U)))
175175 else false
176176
177177
178178 func V (W) = {
179179 let p = W.assetId
180180 if ($isInstanceOf(p, "ByteVector"))
181181 then {
182182 let K = p
183183 K
184184 }
185185 else throw("Wrong asset")
186186 }
187187
188188
189189 func X (S) = if ((size(S.payments) != 1))
190190 then throw("wrong assets count")
191191 else {
192192 let M = L(V(S.payments[0]))
193193 if ((M.issuer != this))
194194 then throw("wrong asset issuer")
195195 else if (N(M))
196196 then throw("key expired")
197197 else M
198198 }
199199
200200
201201 func Y (Z,aa,ab) = if (if ((aa > wavesBalance(Z).regular))
202202 then (aa != 0)
203203 else false)
204204 then ScriptTransfer(Z, aa, unit) :: ab
205205 else ab
206206
207207
208208 func ac (ad) = {
209209 let p = indexOf(j, ad)
210210 if ($isInstanceOf(p, "Int"))
211211 then {
212212 let q = p
213213 false
214214 }
215215 else true
216216 }
217217
218218
219219 @Callable(S)
220220 func addDevice (ae) = if ((S.caller != this))
221221 then throw("Not permitted")
222222 else if ((A(ae) != a))
223223 then throw("Device already added")
224224 else [StringEntry(y(ae), d), IntegerEntry(z(ae), k)]
225225
226226
227227
228228 @Callable(S)
229229 func addUser (ae) = if ((S.caller != this))
230230 then throw("Not permitted")
231231 else [StringEntry(w(ae), c)]
232232
233233
234234
235235 @Callable(S)
236236 func removeUser (ae) = if ((S.caller != this))
237237 then throw("Not permitted")
238238 else [DeleteEntry(w(ae))]
239239
240240
241241
242242 @Callable(S)
243243 func deviceAction (af,ad) = {
244244 let ag = (1 > assetBalance(S.caller, fromBase58String(af)))
245245 let ah = L(fromBase58String(af))
246246 let G = J(ah)
247247 let ai = toBase58String(G.bytes)
248248 let aj = s(i)
249249 if (ag)
250250 then throw("Key not owned")
251251 else if ((y(ai) == a))
252252 then throw("No such device")
253253 else if (F(G, af))
254254 then throw("Key not whitelisted")
255255 else if (ac(ad))
256256 then throw("Action is not allowed")
257257 else if (N(ah))
258258 then throw("Key expired")
259259 else {
260260 let ak = [StringEntry(y(ai), ad), IntegerEntry(z(ai), (B(ai) + 1))]
261261 if (if ((aj > wavesBalance(S.caller).regular))
262262 then (aj != 0)
263263 else false)
264264 then ScriptTransfer(S.caller, aj, unit) :: ak
265265 else ak
266266 }
267267 }
268268
269269
270270
271271 @Callable(S)
272272 func transferKey (al) = {
273273 let ah = X(S)
274274 let aj = n(i)
275275 let am = addressFromStringValue(al)
276276 let an = [ScriptTransfer(am, 1, ah.id)]
277277 Y(am, aj, Y(S.caller, aj, an))
278278 }
279279
280280
281281 @Verifier(ao)
282282 func ap () = sigVerify(ao.bodyBytes, ao.proofs[0], ao.senderPublicKey)
283283

github/deemru/w8io/026f985 
31.17 ms