tx · EVHrd9tW8ZzfLwmPULQc7MzhainWe4iueVzMMevZnxYN

3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6:  -0.01000000 Waves

2021.06.29 06:33 [1591132] smart account 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6 > SELF 0.00000000 Waves

{ "type": 13, "id": "EVHrd9tW8ZzfLwmPULQc7MzhainWe4iueVzMMevZnxYN", "fee": 1000000, "feeAssetId": null, "timestamp": 1624937699062, "version": 2, "chainId": 84, "sender": "3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6", "senderPublicKey": "4f5Wt4MDH3Qt6DMuZQid3zoj463xCUkNdUWjUcChuedh", "proofs": [ "f6mPuiaCY4dTKhcqGcv4tiuNo18ijjiXSEe5Sy4rkF576wio3uUwDqStpBEeFJeE648vkWooYgvHqD3jP88Qbfw" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAAAAAAEAAAABaQEAAAAHYnV5VW5pdAAAAAEAAAAHYXNzZXRJRAQAAAAEY29zdAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABWNvc3RfBQAAAAdhc3NldElEAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVd29ya3Mgd2l0aCB3YXZlcyBvbmx5AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABGNvc3QJAAACAAAAAQIAAAAKV3JvbmcgY29zdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEJAAJZAAAAAQUAAAAHYXNzZXRJRAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAABm93bmVyXwUAAAAHYXNzZXRJRAkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAANuaWwAAAAAFrotNQ==", "height": 1591132, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3US8yBVomwqsKUG2f8qgkgPs3qMqUejvb5eLGXtTskwx Next: 9KzgwV3mmEDLawszw8dv3KHnqwBmp7qyK3gEdg1eUXjd Diff:
OldNewDifferences
1515 if (isDefined(pmt.assetId))
1616 then throw("works with waves only")
1717 else if ((pmt.amount != cost))
18- then throw("Wrong service fee amount")
19- else [ScriptTransfer(i.caller, 1, fromBase58String(assetID))]
18+ then throw("Wrong cost")
19+ else [ScriptTransfer(i.caller, 1, fromBase58String(assetID)), StringEntry(("owner_" + assetID), toBase58String(i.caller.bytes))]
2020 }
2121
2222
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func buyUnit (assetID) = {
88 let cost = match getInteger(this, ("cost_" + assetID)) {
99 case a: Int =>
1010 a
1111 case _ =>
1212 0
1313 }
1414 let pmt = value(i.payments[0])
1515 if (isDefined(pmt.assetId))
1616 then throw("works with waves only")
1717 else if ((pmt.amount != cost))
18- then throw("Wrong service fee amount")
19- else [ScriptTransfer(i.caller, 1, fromBase58String(assetID))]
18+ then throw("Wrong cost")
19+ else [ScriptTransfer(i.caller, 1, fromBase58String(assetID)), StringEntry(("owner_" + assetID), toBase58String(i.caller.bytes))]
2020 }
2121
2222

github/deemru/w8io/169f3d6 
39.47 ms