tx · 3jbQSkvH9LFHzDAHaNL3nPeAnbj8k7BamxvoavxDiGea

3MuKvqQ5wQfi8baEeqzkmF95bEgiFaE1u8u:  -0.02000000 Waves

2021.05.03 17:45 [1509655] smart account 3MuKvqQ5wQfi8baEeqzkmF95bEgiFaE1u8u > SELF 0.00000000 Waves

{ "type": 13, "id": "3jbQSkvH9LFHzDAHaNL3nPeAnbj8k7BamxvoavxDiGea", "fee": 2000000, "feeAssetId": null, "timestamp": 1620053134603, "version": 2, "chainId": 84, "sender": "3MuKvqQ5wQfi8baEeqzkmF95bEgiFaE1u8u", "senderPublicKey": "8YezcjKbhhibHoaqiSpQurGP2GZkvMSJyswo9XhW1Sxb", "proofs": [ "5GTSzZMcqxwuGYmiFSMLaSDjXSrmewMM9v2bin9KmuREXRaMfFLffE7jaSXPTuu2xYoHKNfPVa76zVu2u3U6ZbvM" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAHQXNzZXRJRAEAAAAgnEctJaOJqxi+IW+FiXnrdbHx7y+ZN53+hQd/WS7zjFoAAAAAC1N0YXJ0SGVpZ2h0AAAAAAAAAAAAAAAAAQAAAAFpAQAAAAt3aXRoZHJhd29vZAAAAAEAAAAIYXJndW1lbnQEAAAAAWEJAAS1AAAAAgUAAAAIYXJndW1lbnQCAAAAAS0EAAAACGhhc1ZhbHVlBAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAACGFyZ3VtZW50AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAF0BQAAAAckbWF0Y2gwBQAAAAF0BwMJAQAAAAIhPQAAAAIJAAGRAAAAAgUAAAABYQAAAAAAAAAAAAIAAAAEV09PRAkAAAIAAAABAgAAABJOb3QgY29ycmVjdCBzdHJpbmcDBQAAAAhoYXNWYWx1ZQkAAAIAAAABAgAAAAhIYXMgaGFzaAkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMFAAAAB0Fzc2V0SUQAAAAAADuaygAGCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAO5rKAAUAAAAHQXNzZXRJRAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgUAAAAIYXJndW1lbnQGBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledBCa9E=", "height": 1509655, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HBR8MtVxWXhKrBsaNEmGwQtwST9jo2gYpLGQD7ovDYCy Next: AxV4Npk8yoXeaKibF4Zu2ZAscqf5a9HF8RBGSM35kjqG Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BX3YsnjtX8GidrNzx1uYwK4fT2K7akupYgM3AMGqmu6h'
55
6-@Callable(b)
7-func deposit () = {
8- let c = if ((size(b.payments) == 1))
9- then b.payments[0]
10- else throw("Attached payment is required")
11- if (isDefined(c.assetId))
12- then throw("works with waves only")
13- else {
14- let d = toBase58String(b.caller.bytes)
15- let e = {
16- let f = getInteger(this, d)
17- if ($isInstanceOf(f, "Int"))
18- then {
19- let g = f
20- g
21- }
22- else 0
6+let b = 0
7+
8+@Callable(c)
9+func withdrawood (d) = {
10+ let e = split(d, "-")
11+ let f = {
12+ let g = getBoolean(this, d)
13+ if ($isInstanceOf(g, "Boolean"))
14+ then {
15+ let h = g
16+ h
2317 }
24- let h = (e + c.amount)
25-[IntegerEntry(d, h)]
26- }
18+ else false
19+ }
20+ if ((e[0] != "WOOD"))
21+ then throw("Not correct string")
22+ else if (f)
23+ then throw("Has hash")
24+ else [Reissue(a, 1000000000, true), ScriptTransfer(c.caller, 1000000000, a), BooleanEntry(d, true)]
2725 }
2826
2927
30-
31-@Callable(b)
32-func withdraw (i) = {
33- let d = toBase58String(b.caller.bytes)
34- let e = {
35- let f = getInteger(this, d)
36- if ($isInstanceOf(f, "Int"))
37- then {
38- let g = f
39- g
40- }
41- else 0
42- }
43- let h = (e - i)
44- if ((0 > i))
45- then throw("Can't withdraw negative amount")
46- else if ((0 > h))
47- then throw("Not enough balance")
48- else [IntegerEntry(d, h), ScriptTransfer(b.caller, i, unit)]
49- }
50-
51-
52-
53-@Callable(b)
54-func withdrawood (j) = {
55- let g = split(j, "-")
56- let k = {
57- let f = getBoolean(this, j)
58- if ($isInstanceOf(f, "Boolean"))
59- then {
60- let l = f
61- l
62- }
63- else false
64- }
65- if ((g[0] != "WOOD"))
66- then throw("Not correct string")
67- else if (k)
68- then throw("Has hash")
69- else [Reissue(a, 1000000000, true), BooleanEntry(j, true), ScriptTransfer(b.caller, 100000, a)]
70- }
71-
72-
73-@Verifier(m)
74-func n () = sigVerify(m.bodyBytes, m.proofs[0], m.senderPublicKey)
28+@Verifier(i)
29+func j () = sigVerify(i.bodyBytes, i.proofs[0], i.senderPublicKey)
7530
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BX3YsnjtX8GidrNzx1uYwK4fT2K7akupYgM3AMGqmu6h'
55
6-@Callable(b)
7-func deposit () = {
8- let c = if ((size(b.payments) == 1))
9- then b.payments[0]
10- else throw("Attached payment is required")
11- if (isDefined(c.assetId))
12- then throw("works with waves only")
13- else {
14- let d = toBase58String(b.caller.bytes)
15- let e = {
16- let f = getInteger(this, d)
17- if ($isInstanceOf(f, "Int"))
18- then {
19- let g = f
20- g
21- }
22- else 0
6+let b = 0
7+
8+@Callable(c)
9+func withdrawood (d) = {
10+ let e = split(d, "-")
11+ let f = {
12+ let g = getBoolean(this, d)
13+ if ($isInstanceOf(g, "Boolean"))
14+ then {
15+ let h = g
16+ h
2317 }
24- let h = (e + c.amount)
25-[IntegerEntry(d, h)]
26- }
18+ else false
19+ }
20+ if ((e[0] != "WOOD"))
21+ then throw("Not correct string")
22+ else if (f)
23+ then throw("Has hash")
24+ else [Reissue(a, 1000000000, true), ScriptTransfer(c.caller, 1000000000, a), BooleanEntry(d, true)]
2725 }
2826
2927
30-
31-@Callable(b)
32-func withdraw (i) = {
33- let d = toBase58String(b.caller.bytes)
34- let e = {
35- let f = getInteger(this, d)
36- if ($isInstanceOf(f, "Int"))
37- then {
38- let g = f
39- g
40- }
41- else 0
42- }
43- let h = (e - i)
44- if ((0 > i))
45- then throw("Can't withdraw negative amount")
46- else if ((0 > h))
47- then throw("Not enough balance")
48- else [IntegerEntry(d, h), ScriptTransfer(b.caller, i, unit)]
49- }
50-
51-
52-
53-@Callable(b)
54-func withdrawood (j) = {
55- let g = split(j, "-")
56- let k = {
57- let f = getBoolean(this, j)
58- if ($isInstanceOf(f, "Boolean"))
59- then {
60- let l = f
61- l
62- }
63- else false
64- }
65- if ((g[0] != "WOOD"))
66- then throw("Not correct string")
67- else if (k)
68- then throw("Has hash")
69- else [Reissue(a, 1000000000, true), BooleanEntry(j, true), ScriptTransfer(b.caller, 100000, a)]
70- }
71-
72-
73-@Verifier(m)
74-func n () = sigVerify(m.bodyBytes, m.proofs[0], m.senderPublicKey)
28+@Verifier(i)
29+func j () = sigVerify(i.bodyBytes, i.proofs[0], i.senderPublicKey)
7530

github/deemru/w8io/169f3d6 
26.79 ms