tx · Cg9BrVmCLztgL4NF8hgdXT8695XLfenzjSQqhWXjWi3S

3N1fcrWULKWACeWDuo3FpugKcoYC4xQ7uw8:  -0.00600000 Waves

2022.07.15 12:44 [2140680] smart account 3N1fcrWULKWACeWDuo3FpugKcoYC4xQ7uw8 > SELF 0.00000000 Waves

{ "type": 13, "id": "Cg9BrVmCLztgL4NF8hgdXT8695XLfenzjSQqhWXjWi3S", "fee": 600000, "feeAssetId": null, "timestamp": 1657878288614, "version": 2, "chainId": 84, "sender": "3N1fcrWULKWACeWDuo3FpugKcoYC4xQ7uw8", "senderPublicKey": "48K83j8fKJeoBfJYe7BTpnr2VQg7uLGwyCrhmdghH3xZ", "proofs": [ "5SN8nEmAtqr2knhM6AA9ah3kkgiRZxqoU8nF2XuttUBDibrhZVPRmngg7dAud2XVcyGQNX3stV4L42eaaKvMxnSP" ], "script": "base64:BgIaCAISCQoHAQEBCAgICBIFCgMBBAESABIAEgALAAp0b2tlbl9uYW1lAhJBd2Vzb21lIHRva2VuIG5hbWUAEXRva2VuX2Rlc2NyaXB0aW9uAhlBd2Vzb21lIHRva2VuIGRlc2NyaXB0aW9uAA50b2tlbl9kZWNpbWFscwAIAAlzZXBhcmF0b3ICAl9fAAx3aXRuZXNzX3BrXzECCjEyMzEyMzEyMzEADHdpdG5lc3NfcGtfMgIKMTIzMTIzMTIzMQAMd2l0bmVzc19wa18zAgoxMjMxMjMxMjMxAA13aXRuZXNzX2NvdW50AAMABnJld2FyZAkAaAIACgkAbAYACgAABQ50b2tlbl9kZWNpbWFscwAAAAAFBERPV04BD3F1b3J1bUlzUmVhY2hlZAIIYXBwcm92ZWQFdG90YWwDCQBmAgUIYXBwcm92ZWQJAGkCBQV0b3RhbAACBgcBDWZpbmFsaXplRXZlbnQABAckbWF0Y2gwCQCiCAECBVRPS0VOAwkAAQIFByRtYXRjaDACBlN0cmluZwQBYQUHJG1hdGNoMAkAzAgCCQEHUmVpc3N1ZQMJANkEAQUBYQkAaAIFDXdpdG5lc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AUBaQZjYWxsZXIFYnl0ZXMDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhAAAJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICAhBJTlNVUkFOQ0VfRlJFRV9fCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMJAGQCBQ1mcmVlSW5zdXJhbmNlCAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAUDbmlsBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBEXdpdGhkcmF3SW5zdXJhbmNlAAQJaW5zdXJhbmNlBAckbWF0Y2gwCQCfCAEJAKwCAgIQSU5TVVJBTkNFX0ZSRUVfXwkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzAwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAMJAGYCBQFhAAAFAWEJAAIBAhFubyBmcmVlIGluc3VyYW5jZQkAAgECDG5vIGluc3VyYW5jZQkAlAoCCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUJaW5zdXJhbmNlBQR1bml0CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgICEElOU1VSQU5DRV9GUkVFX18JANgEAQgIBQFpBmNhbGxlcgVieXRlcwAABQNuaWwFBHVuaXQBaQELY2xhaW1SZXdhcmQACQCUCgIFA25pbAUEdW5pdAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXm4COMA", "height": 2140680, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3ixB56zBRnQAPkDZWfNKGWva8vxtgTayLLCtvc6BtPPb Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "__"
4+let a = "Awesome token name"
55
6-@Callable(b)
7-func emitEvent (c,d,e,f,g,h,i) = {
8- let j = {
9- let k = parseBigInt(i)
10- if ($isInstanceOf(k, "BigInt"))
6+let b = "Awesome token description"
7+
8+let c = 8
9+
10+let d = "__"
11+
12+let e = "1231231231"
13+
14+let f = "1231231231"
15+
16+let g = "1231231231"
17+
18+let h = 3
19+
20+let i = (10 * pow(10, 0, c, 0, 0, DOWN))
21+
22+func j (k,l) = if ((k > (l / 2)))
23+ then true
24+ else false
25+
26+
27+func m () = {
28+ let n = getString("TOKEN")
29+ if ($isInstanceOf(n, "String"))
30+ then {
31+ let o = n
32+[Reissue(fromBase58String(o), (h * i), true), ScriptTransfer(addressFromPublicKey(fromBase58String(e)), i, fromBase58String(o)), ScriptTransfer(addressFromPublicKey(fromBase58String(f)), i, fromBase58String(o)), ScriptTransfer(addressFromPublicKey(fromBase58String(g)), i, fromBase58String(o))]
33+ }
34+ else {
35+ let p = Issue(a, b, (h * i), c, true)
36+ let q = calculateAssetId(p)
37+[StringEntry("TOKEN", toBase58String(q)), p, ScriptTransfer(addressFromPublicKey(fromBase58String(e)), i, q), ScriptTransfer(addressFromPublicKey(fromBase58String(f)), i, q), ScriptTransfer(addressFromPublicKey(fromBase58String(g)), i, q)]
38+ }
39+ }
40+
41+
42+@Callable(r)
43+func emitEvent (s,t,u,v,w,x,y) = {
44+ let z = {
45+ let n = parseBigInt(y)
46+ if ($isInstanceOf(n, "BigInt"))
1147 then {
12- let l = k
13- l
48+ let o = n
49+ o
1450 }
15- else if ($isInstanceOf(k, "Unit"))
51+ else if ($isInstanceOf(n, "Unit"))
1652 then throw("incorrect amount")
1753 else throw("Match error")
1854 }
19- let m = {
20- let k = getInteger("EVENTS_LAST_IDX")
21- if ($isInstanceOf(k, "Int"))
55+ let A = {
56+ let n = getInteger("EVENTS_LAST_IDX")
57+ if ($isInstanceOf(n, "Int"))
2258 then {
23- let l = k
24- l
59+ let o = n
60+ o
2561 }
26- else if ($isInstanceOf(k, "Unit"))
62+ else if ($isInstanceOf(n, "Unit"))
2763 then 0
2864 else throw("Match error")
2965 }
30- let n = makeString([toString(c), toString(d), toString(e), f, g, h, toString(j)], a)
31- $Tuple2([StringEntry(("EVENTS__" + toString(m)), n), IntegerEntry("EVENTS_LAST_IDX", (m + 1))], unit)
66+ let B = makeString([toString(s), toString(t), toString(u), v, w, x, toString(z)], d)
67+ $Tuple2([StringEntry(("EVENTS__" + toString(A)), B), IntegerEntry("EVENTS_LAST_IDX", (A + 1))], unit)
3268 }
3369
3470
3571
36-@Callable(b)
37-func depositInsurance () = {
38- let o = if ((size(b.payments) != 1))
39- then throw("no payment")
40- else if ((b.payments[0].assetId != unit))
41- then throw("payment is not WAVES")
42- else if ((0 >= b.payments[0].amount))
43- then throw("zero payment")
44- else unit
45- if ((o == o))
72+@Callable(r)
73+func confirmEvent (C,D,E) = {
74+ let F = toBase58String(r.callerPublicKey)
75+ let G = if (containsElement([e, f, g], F))
76+ then unit
77+ else throw("not witness")
78+ if ((G == G))
4679 then {
47- let p = {
48- let k = getInteger(("INSURANCE_FREE__" + toBase58String(b.caller.bytes)))
49- if ($isInstanceOf(k, "Int"))
80+ let H = {
81+ let n = getBoolean(((("CONFIRM__" + toString(C)) + "__") + F))
82+ if ($isInstanceOf(n, "Boolean"))
5083 then {
51- let l = k
52- l
84+ let o = n
85+ throw("already confirmed")
5386 }
54- else 0
87+ else unit
5588 }
56- $Tuple2([IntegerEntry(("INSURANCE_FREE__" + toBase58String(b.caller.bytes)), (p + b.payments[0].amount))], unit)
89+ if ((H == H))
90+ then {
91+ let B = {
92+ let n = getString(("EVENTS__" + toString(C)))
93+ if ($isInstanceOf(n, "String"))
94+ then {
95+ let o = n
96+ o
97+ }
98+ else throw("no such event")
99+ }
100+ if ((B == B))
101+ then {
102+ let I = {
103+ let n = getInteger((("CONFIRM__" + toString(C)) + "__TOTAL"))
104+ if ($isInstanceOf(n, "Int"))
105+ then {
106+ let o = n
107+ o
108+ }
109+ else 0
110+ }
111+ let J = {
112+ let n = getInteger((("CONFIRM__" + toString(C)) + "__APPROVE"))
113+ if ($isInstanceOf(n, "Int"))
114+ then {
115+ let o = n
116+ if (D)
117+ then (o + 1)
118+ else o
119+ }
120+ else if (D)
121+ then 1
122+ else 0
123+ }
124+ let K = if (D)
125+ then {
126+ let n = getInteger((("CONFIRM__" + toString(C)) + "__APPROVE"))
127+ if ($isInstanceOf(n, "Int"))
128+ then {
129+ let o = n
130+ IntegerEntry((("CONFIRM__" + toString(C)) + "__APPROVE"), (o + 1))
131+ }
132+ else IntegerEntry((("CONFIRM__" + toString(C)) + "__APPROVE"), 1)
133+ }
134+ else {
135+ let n = getInteger((("CONFIRM__" + toString(C)) + "__DENY"))
136+ if ($isInstanceOf(n, "Int"))
137+ then {
138+ let o = n
139+ IntegerEntry((("CONFIRM__" + toString(C)) + "__DENY"), (o + 1))
140+ }
141+ else IntegerEntry((("CONFIRM__" + toString(C)) + "__DENY"), 1)
142+ }
143+ let L = if (j(J, (I + 1)))
144+ then m()
145+ else nil
146+ $Tuple2((([BooleanEntry(((("CONFIRM__" + toString(C)) + "__") + F), D), IntegerEntry((("CONFIRM__" + toString(C)) + "__TOTAL"), (I + 1))] :+ K) ++ L), unit)
147+ }
148+ else throw("Strict value is not equal to itself.")
149+ }
150+ else throw("Strict value is not equal to itself.")
57151 }
58152 else throw("Strict value is not equal to itself.")
59153 }
60154
61155
62156
63-@Callable(b)
157+@Callable(r)
158+func depositInsurance () = {
159+ let G = if ((size(r.payments) != 1))
160+ then throw("no payment")
161+ else if ((r.payments[0].assetId != unit))
162+ then throw("payment is not WAVES")
163+ else if ((0 >= r.payments[0].amount))
164+ then throw("zero payment")
165+ else unit
166+ if ((G == G))
167+ then {
168+ let M = {
169+ let n = getInteger(("INSURANCE_FREE__" + toBase58String(r.caller.bytes)))
170+ if ($isInstanceOf(n, "Int"))
171+ then {
172+ let o = n
173+ o
174+ }
175+ else 0
176+ }
177+ $Tuple2([IntegerEntry(("INSURANCE_FREE__" + toBase58String(r.caller.bytes)), (M + r.payments[0].amount))], unit)
178+ }
179+ else throw("Strict value is not equal to itself.")
180+ }
181+
182+
183+
184+@Callable(r)
64185 func withdrawInsurance () = {
65- let q = {
66- let k = getInteger(("INSURANCE_FREE__" + toBase58String(b.caller.bytes)))
67- if ($isInstanceOf(k, "Int"))
186+ let N = {
187+ let n = getInteger(("INSURANCE_FREE__" + toBase58String(r.caller.bytes)))
188+ if ($isInstanceOf(n, "Int"))
68189 then {
69- let l = k
70- if ((l > 0))
71- then l
190+ let o = n
191+ if ((o > 0))
192+ then o
72193 else throw("no free insurance")
73194 }
74195 else throw("no insurance")
75196 }
76- $Tuple2([ScriptTransfer(b.caller, q, unit), IntegerEntry(("INSURANCE_FREE__" + toBase58String(b.caller.bytes)), 0)], unit)
197+ $Tuple2([ScriptTransfer(r.caller, N, unit), IntegerEntry(("INSURANCE_FREE__" + toBase58String(r.caller.bytes)), 0)], unit)
77198 }
78199
79200
80-@Verifier(r)
81-func s () = sigVerify(r.bodyBytes, r.proofs[0], r.senderPublicKey)
201+
202+@Callable(r)
203+func claimReward () = $Tuple2(nil, unit)
204+
205+
206+@Verifier(O)
207+func P () = sigVerify(O.bodyBytes, O.proofs[0], O.senderPublicKey)
82208

github/deemru/w8io/169f3d6 
64.18 ms