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
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let woodAssetID = base58'BX3YsnjtX8GidrNzx1uYwK4fT2K7akupYgM3AMGqmu6h'
4+let AssetID = base58'BX3YsnjtX8GidrNzx1uYwK4fT2K7akupYgM3AMGqmu6h'
55
6-@Callable(i)
7-func deposit () = {
8- let pmt = if ((size(i.payments) == 1))
9- then i.payments[0]
10- else throw("Attached payment is required")
11- if (isDefined(pmt.assetId))
12- then throw("works with waves only")
13- else {
14- let currentKey = toBase58String(i.caller.bytes)
15- let currentAmount = match getInteger(this, currentKey) {
16- case a: Int =>
17- a
18- case _ =>
19- 0
20- }
21- let newAmount = (currentAmount + pmt.amount)
22-[IntegerEntry(currentKey, newAmount)]
23- }
24- }
25-
26-
27-
28-@Callable(i)
29-func withdraw (amount) = {
30- let currentKey = toBase58String(i.caller.bytes)
31- let currentAmount = match getInteger(this, currentKey) {
32- case a: Int =>
33- a
34- case _ =>
35- 0
36- }
37- let newAmount = (currentAmount - amount)
38- if ((0 > amount))
39- then throw("Can't withdraw negative amount")
40- else if ((0 > newAmount))
41- then throw("Not enough balance")
42- else [IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, unit)]
43- }
44-
45-
6+let StartHeight = 0
467
478 @Callable(i)
489 func withdrawood (argument) = {
5718 then throw("Not correct string")
5819 else if (hasValue)
5920 then throw("Has hash")
60- else [Reissue(woodAssetID, 1000000000, true), BooleanEntry(argument, true), ScriptTransfer(i.caller, 100000, woodAssetID)]
21+ else [Reissue(AssetID, 1000000000, true), ScriptTransfer(i.caller, 1000000000, AssetID), BooleanEntry(argument, true)]
6122 }
6223
6324
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let woodAssetID = base58'BX3YsnjtX8GidrNzx1uYwK4fT2K7akupYgM3AMGqmu6h'
4+let AssetID = base58'BX3YsnjtX8GidrNzx1uYwK4fT2K7akupYgM3AMGqmu6h'
55
6-@Callable(i)
7-func deposit () = {
8- let pmt = if ((size(i.payments) == 1))
9- then i.payments[0]
10- else throw("Attached payment is required")
11- if (isDefined(pmt.assetId))
12- then throw("works with waves only")
13- else {
14- let currentKey = toBase58String(i.caller.bytes)
15- let currentAmount = match getInteger(this, currentKey) {
16- case a: Int =>
17- a
18- case _ =>
19- 0
20- }
21- let newAmount = (currentAmount + pmt.amount)
22-[IntegerEntry(currentKey, newAmount)]
23- }
24- }
25-
26-
27-
28-@Callable(i)
29-func withdraw (amount) = {
30- let currentKey = toBase58String(i.caller.bytes)
31- let currentAmount = match getInteger(this, currentKey) {
32- case a: Int =>
33- a
34- case _ =>
35- 0
36- }
37- let newAmount = (currentAmount - amount)
38- if ((0 > amount))
39- then throw("Can't withdraw negative amount")
40- else if ((0 > newAmount))
41- then throw("Not enough balance")
42- else [IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, unit)]
43- }
44-
45-
6+let StartHeight = 0
467
478 @Callable(i)
489 func withdrawood (argument) = {
4910 let a = split(argument, "-")
5011 let hasValue = match getBoolean(this, argument) {
5112 case t: Boolean =>
5213 t
5314 case _ =>
5415 false
5516 }
5617 if ((a[0] != "WOOD"))
5718 then throw("Not correct string")
5819 else if (hasValue)
5920 then throw("Has hash")
60- else [Reissue(woodAssetID, 1000000000, true), BooleanEntry(argument, true), ScriptTransfer(i.caller, 100000, woodAssetID)]
21+ else [Reissue(AssetID, 1000000000, true), ScriptTransfer(i.caller, 1000000000, AssetID), BooleanEntry(argument, true)]
6122 }
6223
6324
6425 @Verifier(tx)
6526 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6627

github/deemru/w8io/169f3d6 
30.65 ms