tx · EA9aVssxceuKp9iM8pCov7Uhgut9XbQQhbXm9mfpr8h

3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj:  -0.01400000 Waves

2021.04.14 18:07 [1482278] smart account 3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj > SELF 0.00000000 Waves

{ "type": 13, "id": "EA9aVssxceuKp9iM8pCov7Uhgut9XbQQhbXm9mfpr8h", "fee": 1400000, "feeAssetId": null, "timestamp": 1618412833721, "version": 2, "chainId": 84, "sender": "3MsH95R1SdYUEkUTVjHvR8gLD8rXtgQ21Vj", "senderPublicKey": "GYeGBXmJUHrtkkJuLVJKCHtaCbkvj9nS4aVLqzdrbpZx", "proofs": [ "YPTaj1XYXBCBxPvCgeHiSb1JRDWpSpgF6vreJ2cqtkEPwHnnbm1Q9S2zV8rVerR7DUmihkzEcLVPYexUih1hny5" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAEY2FsbAAAAAAEAAAABWFzc2V0CQAEQwAAAAcCAAAABUFzc2V0AgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAGBQAAAAR1bml0AAAAAAAAAAAABAAAAAdhc3NldElkCQAEOAAAAAEFAAAABWFzc2V0CQAETAAAAAIJAQAAAAtCaW5hcnlFbnRyeQAAAAICAAAAA2JpbgEAAAAACQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACAgAAAARib29sBgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAADaW50AAAAAAAAAAABCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAA3N0cgIAAAAACQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAECAAAAA3N0cgkABEwAAAACBQAAAAVhc3NldAkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMFAAAAB2Fzc2V0SWQAAAAAAAAAAAEHCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAHYXNzZXRJZAAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5KOU8bg==", "height": 1482278, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HsVeavFmxFpycd1hNTWKiDxra4ZcFenEKdtP2EcnwX9w Next: 13VzYAup8V4dL7vgMb1tWLCUMtMcwGrGnc1SibFqzSvD Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 1
5-
6-let b = "___"
7-
8-let c = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000]
9-
10-let d = 9223372036854775807
11-
12-let e = addressFromStringValue("3Myojf1j7W2S5XSKemGaqErcSYghqCgQ1gp")
13-
14-let f = addressFromStringValue("3MutTVXh7Z2m9Cfzx982D4nm7h9Yzr3Ra9a")
15-
16-let g = base58'8c6SCeWJj6M1VFBaFEg2LWxYS77ZHkmiMeAs6MMSDi1v'
17-
18-let h = 1000000000000
19-
20-let i = 0
21-
22-let j = 100000
23-
24-let k = "MAIN_OPERATOR"
25-
26-let l = "PRIVILEGE"
27-
28-let m = "R"
29-
30-let n = "FORGES_TOTAL_WEIGHT"
31-
32-let o = "FS_ENABLED_"
33-
34-let p = "FS_SUPPLIES_"
35-
36-let q = "FS_WEIGHT_"
37-
38-func r (s) = if ((contains(s, b) == false))
39- then (contains(s, " ") == false)
40- else false
414
425
43-func t (u) = {
44- let v = u
45- if ($isInstanceOf(v, "String"))
46- then {
47- let w = v
48- let x = parseInt(w)
49- if ($isInstanceOf(x, "Int"))
50- then {
51- let y = x
52- if ((y >= 0))
53- then (d >= y)
54- else false
55- }
56- else false
57- }
58- else if ($isInstanceOf(v, "Int"))
59- then {
60- let y = v
61- if ((y >= 0))
62- then (d >= y)
63- else false
64- }
65- else false
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)]
6611 }
6712
6813
69-func z (A) = {
70- let B = valueOrErrorMessage(parseInt(A), "Not a string int")
71- if ((t(B) != true))
72- then throw("Not safe")
73- else B
74- }
75-
76-
77-func C (D) = {
78- let v = D
79- if ($isInstanceOf(v, "String"))
80- then {
81- let w = v
82- isDefined(assetInfo(fromBase58String(w)))
83- }
84- else if ($isInstanceOf(v, "ByteVector"))
85- then {
86- let E = v
87- isDefined(assetInfo(E))
88- }
89- else false
90- }
91-
92-
93-func F (G) = {
94- let v = getBoolean(this, (o + G))
95- if ($isInstanceOf(v, "Boolean"))
96- then {
97- let H = v
98- if ((H == true))
99- then "enabled"
100- else "disabled"
101- }
102- else "notWhitelisted"
103- }
104-
105-
106-func I (J,K) = if ((addressFromStringValue(getStringValue(e, k)) == J))
107- then true
108- else {
109- let v = getInteger(e, (((((l + b) + toBase58String(J.bytes)) + b) + toBase58String(this.bytes)) + K))
110- if ($isInstanceOf(v, "Int"))
111- then {
112- let y = v
113- true
114- }
115- else false
116- }
117-
118-
119-func L (M) = (d / M)
120-
121-
122-@Callable(N)
123-func addAssetToWhitelist (O,P) = if ((I(N.caller, "addAssetToWhitelist") != true))
124- then throw("Access denied")
125- else if (if ((C(O) != true))
126- then true
127- else (t(P) != true))
128- then throw("Data validation")
129- else if ((F(O) != "notWhitelisted"))
130- then throw("Asset already whitelisted")
131- else {
132- let Q = L(P)
133- let R = (getIntegerValue(this, n) + Q)
134-[BooleanEntry((o + O), true), IntegerEntry((p + O), P), IntegerEntry((q + O), Q), IntegerEntry(n, R)]
135- }
136-
137-
138-
139-@Callable(N)
140-func removeAssetFromWhitelist (S) = if ((I(N.caller, "removeAssetFromWhitelist") != true))
141- then throw("Access denied")
142- else if ((C(S) != true))
143- then throw("Data validation")
144- else {
145- let T = F(S)
146- if ((T == "notWhitelisted"))
147- then throw("Asset not whitelisted")
148- else {
149- let U = [DeleteEntry((o + S)), DeleteEntry((p + S)), DeleteEntry((q + S))]
150- if ((T == "disabled"))
151- then U
152- else IntegerEntry(n, (getIntegerValue(this, n) - getIntegerValue(this, (q + S)))) :: U
153- }
154- }
155-
156-
157-
158-@Callable(N)
159-func enableDisableForge (V) = if ((I(N.caller, "enableDisableForge") != true))
160- then throw("Access denied")
161- else if ((C(V) != true))
162- then throw("Data validation")
163- else {
164- let T = F(V)
165- if ((T == "notWhitelisted"))
166- then throw("Asset not whitelisted")
167- else {
168- let Q = getIntegerValue(this, q)
169- let W = getIntegerValue(this, n)
170- if ((T == "disabled"))
171- then [IntegerEntry(n, (W + Q)), BooleanEntry((o + V), true)]
172- else [IntegerEntry(n, (W - Q)), BooleanEntry((o + V), false)]
173- }
174- }
175-
176-
177-
178-@Callable(N)
179-func updateForgeAssetSupplies (X,Y) = if ((I(N.caller, "updateForgeAssetSupplies") != true))
180- then throw("Access denied")
181- else if (if ((C(X) != true))
182- then true
183- else (t(Y) != true))
184- then throw("Data validation")
185- else {
186- let T = F(X)
187- if ((T == "notWhitelisted"))
188- then throw("Asset not whitelisted")
189- else {
190- let Z = getIntegerValue(this, (q + X))
191- let aa = L(Y)
192- let U = [IntegerEntry((q + X), aa), IntegerEntry((p + X), Y)]
193- if ((T == "disabled"))
194- then U
195- else IntegerEntry(n, ((getIntegerValue(this, n) + aa) - Z)) :: U
196- }
197- }
198-
199-
200-
201-@Callable(N)
202-func claim () = if ((this == N.caller))
203- then throw("Self-invoke forbidden")
204- else if (if ((size(N.payments) != 1))
205- then true
206- else (N.payments[0].amount != 1))
207- then throw("Payment issue")
208- else {
209- let ab = valueOrErrorMessage(assetInfo(valueOrErrorMessage(N.payments[0].assetId, "Wrong asset type")), "Unknown asset")
210- if ((ab.issuer != f))
211- then throw("Unknown issuer")
212- else {
213- let ac = split(ab.description, b)
214- if (if ((size(ac) != 8))
215- then true
216- else (ac[0] != m))
217- then throw("Not a receipt")
218- else {
219- let T = F(ac[3])
220- if ((T != "enabled"))
221- then throw("Not whitelisted/enabled")
222- else {
223- let ad = z(ac[4])
224- let ae = (z(ac[5]) - z(ac[1]))
225- if ((1 > ae))
226- then throw("No eligible blocks")
227- else {
228- let Q = getIntegerValue(this, (q + ac[3]))
229- let M = getIntegerValue(this, (p + ac[3]))
230- let W = getIntegerValue(this, n)
231- let af = fraction(fraction(h, Q, W), ad, M)
232- if ((1 > af))
233- then throw("Below minimum required")
234- else {
235- let ag = (af * ae)
236- if ((t(ag) != true))
237- then throw("System error")
238- else [Reissue(g, ag, true), ScriptTransfer(N.caller, ag, g), IntegerEntry("assetQuantity", ad), IntegerEntry("eligibleBlocks", ae), IntegerEntry("forgeWeight", Q), IntegerEntry("forgeSupplies", M), IntegerEntry("forgesTotalWeight", W), IntegerEntry("amountToDeliverPerBlock", af), IntegerEntry("amountToDeliverTotal", ag)]
239- }
240- }
241- }
242- }
243- }
244- }
245-
14+@Verifier(d)
15+func e () = sigVerify(d.bodyBytes, d.proofs[0], d.senderPublicKey)
24616

github/deemru/w8io/169f3d6 
31.89 ms