tx · 7PF38XBNjytqqoyrZRPzUBVRGhJ8xpyKjmUErPH1VZvn

3MutTVXh7Z2m9Cfzx982D4nm7h9Yzr3Ra9a:  -0.01400000 Waves

2021.05.08 15:54 [1516734] smart account 3MutTVXh7Z2m9Cfzx982D4nm7h9Yzr3Ra9a > SELF 0.00000000 Waves

{ "type": 13, "id": "7PF38XBNjytqqoyrZRPzUBVRGhJ8xpyKjmUErPH1VZvn", "fee": 1400000, "feeAssetId": null, "timestamp": 1620478471907, "version": 2, "chainId": 84, "sender": "3MutTVXh7Z2m9Cfzx982D4nm7h9Yzr3Ra9a", "senderPublicKey": "98wdUyX2hd6XAj7ggvLJURbxcMbJum5CnatqPwMxv9Pw", "proofs": [ "5UPp7ZCuC1HvTJgbgSF9iCbcVHP5aWzqssrRBGnQ2hWL1TWKGbwZcu3zRC958uLYezjwbk9cXKnpD9gStkox6MEH" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAEY2FsbAAAAAAEAAAABWFzc2V0CQAEQwAAAAcCAAAABUFzc2V0AgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAGBQAAAAR1bml0AAAAAAAAAAAABAAAAAdhc3NldElkCQAEOAAAAAEFAAAABWFzc2V0CQAETAAAAAIJAQAAAAtCaW5hcnlFbnRyeQAAAAICAAAAA2JpbgEAAAAACQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACAgAAAARib29sBgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAADaW50AAAAAAAAAAABCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAA3N0cgIAAAAACQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAECAAAAA3N0cgkABEwAAAACBQAAAAVhc3NldAkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMFAAAAB2Fzc2V0SWQAAAAAAAAAAAEHCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAHYXNzZXRJZAAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5KOU8bg==", "height": 1516734, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GnAQ2wAHZuyCQxmSUhTgJjy8WQ8ifg5o4KiWX9bdCLcE Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 3
5-
6-let b = "NibelNet Vault"
7-
8-let c = 1456230
9-
10-let d = "_"
11-
12-let e = "WAVES"
13-
14-let f = 9223372036854775807
15-
16-let g = "Insurance"
17-
18-let h = "Receipt"
19-
20-let i = "DuInsurance"
21-
22-let j = "DuReceipt"
23-
24-let k = "i"
25-
26-let l = "r"
27-
28-let m = "d"
29-
30-let n = "c"
31-
32-let o = "nonce"
33-
34-let p = "app_is_free"
35-
36-let q = "app_private_key"
37-
38-let r = "app_version"
39-
40-let s = "app_free_since_height"
41-
42-let t = "app_name"
43-
44-let u = "type"
45-
46-let v = "height"
47-
48-let w = "signer"
49-
50-let x = "asset"
51-
52-let y = "amount"
53-
54-let z = "insurance_height"
55-
56-let A = "insurance_signer"
57-
58-let B = "insurance_asset_id"
59-
60-let C = "receipt_asset_id"
61-
62-let D = "duplicate_of_asset_id"
63-
64-let E = "duplicate_type"
65-
66-func F (G) = if (if ((G == this))
67- then true
68- else (c > height))
69- then throw("Access denied")
70- else unit
714
725
73-func H () = {
74- let I = valueOrElse(getInteger(this, o), 0)
75- if ((I >= f))
76- then 1
77- else (I + 1)
6+@Callable(a)
7+func call () = {
8+ let b = Issue("Asset", "", 1, 0, true, unit, 0)
9+ let c = calculateAssetId(b)
10+[BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), b, Reissue(c, 1, false), Burn(c, 1), ScriptTransfer(a.caller, 1, c)]
7811 }
7912
8013
81-func J (K,L,M) = if ((K >= L))
82- then (M >= K)
83- else false
84-
85-
86-func N (O,P) = ((O + d) + P)
87-
88-
89-func Q (R,S) = if ((R.issuer != this))
90- then throw("Unknown issuer")
91- else {
92- let T = getStringValue(this, N(u, toBase58String(R.id)))
93- let U = if ((R.name == g))
94- then (T == k)
95- else false
96- let V = if ((R.name == l))
97- then (T == l)
98- else false
99- let W = S
100- if ($isInstanceOf(W, "String"))
101- then {
102- let X = W
103- if (if (if (U)
104- then (X == k)
105- else false)
106- then true
107- else if (V)
108- then (X == l)
109- else false)
110- then R
111- else throw("Unknown type")
112- }
113- else if (if (!(U))
114- then !(V)
115- else false)
116- then throw("Unknown type")
117- else R
118- }
119-
120-
121-@Callable(Y)
122-func deposit () = valueOrElse(F(Y.caller), if (if ((size(Y.payments) != 1))
123- then true
124- else !(J(Y.payments[0].amount, 1, f)))
125- then throw("Require one valid payment")
126- else {
127- let Z = {
128- let W = Y.payments[0].assetId
129- if ($isInstanceOf(W, "ByteVector"))
130- then {
131- let aa = W
132- toBase58String(valueOrErrorMessage(assetInfo(aa), "Unknown asset").id)
133- }
134- else if ($isInstanceOf(W, "Unit"))
135- then {
136- let ab = W
137- e
138- }
139- else throw("Unknown asset type")
140- }
141- let I = H()
142- let ac = toString(Y.caller)
143- let ad = makeString([b, g, "| Height:", toString(height), "| Signer:", ac, "| Asset ID:", Z, "| Amount:", toString(Y.payments[0].amount), "(includes decimals)"], " ")
144- let ae = Issue(g, ad, 1, 0, false, unit, I)
145- let af = calculateAssetId(ae)
146- let ag = toBase58String(af)
147-[IntegerEntry(o, I), ae, ScriptTransfer(Y.caller, 1, af), StringEntry(N(u, ag), k), IntegerEntry(N(v, ag), height), StringEntry(N(w, ag), ac), StringEntry(N(x, ag), Z), IntegerEntry(N(y, ag), Y.payments[0].amount)]
148- })
149-
150-
151-
152-@Callable(Y)
153-func withdraw () = valueOrElse(F(Y.caller), if (if ((size(Y.payments) != 1))
154- then true
155- else (Y.payments[0].amount != 1))
156- then throw("Require one NFT payment")
157- else {
158- let ah = Q(valueOrErrorMessage(assetInfo(valueOrErrorMessage(Y.payments[0].assetId, "No Waves payment")), "Unknown asset"), k)
159- let af = toBase58String(ah.id)
160- let ai = getIntegerValue(this, N(v, af))
161- let ac = getStringValue(this, N(w, af))
162- let aj = getStringValue(this, N(x, af))
163- let ak = getIntegerValue(this, N(y, af))
164- let I = H()
165- let al = toString(Y.caller)
166- let am = makeString([b, h, "| Insurance Height:", toString(ai), "| Insurance Signer:", ac, "| Insurance ID:", af, "| Asset ID:", aj, "| Amount:", toString(ak), "(includes decimals)", "| Height:", toString(height), "| Signer:", al], " ")
167- let an = Issue(h, am, 1, 0, false, unit, I)
168- let ao = calculateAssetId(an)
169- let ag = toBase58String(ao)
170- let ap = {
171- let W = assetInfo(fromBase58String(aj))
172- if ($isInstanceOf(W, "Asset"))
173- then {
174- let aa = W
175- ScriptTransfer(Y.caller, ak, aa.id)
176- }
177- else {
178- let aq = W
179- if ((aj == e))
180- then ScriptTransfer(Y.caller, ak, unit)
181- else throw("Unknown asset")
182- }
183- }
184-[IntegerEntry(o, I), Burn(ah.id, 1), an, ScriptTransfer(Y.caller, 1, ao), ap, StringEntry(N(u, af), n), StringEntry(N(C, af), ag), StringEntry(N(u, ag), l), IntegerEntry(N(z, ag), ai), StringEntry(N(A, ag), ac), StringEntry(N(B, ag), af), StringEntry(N(x, ag), aj), IntegerEntry(N(y, ag), ak), IntegerEntry(N(v, ag), height), StringEntry(N(w, ag), al)]
185- })
186-
187-
188-
189-@Callable(Y)
190-func claim (ar) = valueOrElse(F(Y.caller), if ((size(Y.payments) != 0))
191- then throw("No need payment")
192- else {
193- let as = Q(valueOrErrorMessage(assetInfo(fromBase58String(ar)), "Unknown asset"), unit)
194- if ((assetBalance(this, as.id) != 1))
195- then throw("Insuffisant balance")
196- else if ((toString(Y.caller) != getStringValue(this, N(w, ar))))
197- then throw("Caller isn't last signer")
198- else [ScriptTransfer(Y.caller, 1, as.id)]
199- })
200-
201-
202-
203-@Callable(Y)
204-func duplicate (at) = valueOrElse(F(Y.caller), if ((size(Y.payments) != 0))
205- then throw("No need payment")
206- else {
207- let au = Q(valueOrErrorMessage(assetInfo(fromBase58String(at)), "Unknown asset"), unit)
208- let av = getStringValue(this, N(u, at))
209- if ((assetBalance(Y.caller, au.id) != 1))
210- then throw("Caller isn't owner")
211- else {
212- let I = H()
213- let aw = toString(Y.caller)
214- let ax = if ((av == k))
215- then $Tuple2(i, makeString([b, i, "| Insurance ID:", at, "| Height:", toString(height), "| Duplicate Signer:", aw], " "))
216- else $Tuple2(j, makeString([b, j, "| Receipt ID:", at, "| Height:", toString(height), "| Duplicate Signer:", aw], " "))
217- let ay = ax._1
218- let az = ax._2
219- let aA = Issue(ay, az, 1, 0, false, unit, I)
220- let aB = calculateAssetId(aA)
221- let ag = toBase58String(aB)
222-[IntegerEntry(o, I), aA, ScriptTransfer(Y.caller, 1, aB), StringEntry(N(u, ag), m), IntegerEntry(N(v, ag), height), StringEntry(N(E, ag), av), StringEntry(N(D, ag), at), StringEntry(N(w, ag), aw)]
223- }
224- })
225-
226-
227-
228-@Callable(Y)
229-func freedom (aC) = if (if ((this != Y.caller))
230- then true
231- else valueOrElse(getBoolean(this, p), false))
232- then throw("Access denied")
233- else [BooleanEntry(p, true), StringEntry(q, aC), IntegerEntry(r, a), StringEntry(t, b), IntegerEntry(s, height)]
234-
235-
236-@Verifier(aD)
237-func aE () = if (valueOrElse(getBoolean(this, p), false))
238- then false
239- else {
240- let W = aD
241- if ($isInstanceOf(W, "SetScriptTransaction"))
242- then {
243- let aF = W
244- sigVerify(aD.bodyBytes, aD.proofs[0], aD.senderPublicKey)
245- }
246- else false
247- }
14+@Verifier(d)
15+func e () = sigVerify(d.bodyBytes, d.proofs[0], d.senderPublicKey)
24816

github/deemru/w8io/169f3d6 
52.32 ms