tx · D5NVaF36NCs9vv7115Wtr8RyDDJ8tG5gGVyvCDQ8Z41n

3N58U7hA1kzMTCUqHiJGdcPdjxAKspMgGNp:  -0.01000000 Waves

2021.07.16 17:57 [1616309] smart account 3N58U7hA1kzMTCUqHiJGdcPdjxAKspMgGNp > SELF 0.00000000 Waves

{ "type": 13, "id": "D5NVaF36NCs9vv7115Wtr8RyDDJ8tG5gGVyvCDQ8Z41n", "fee": 1000000, "feeAssetId": null, "timestamp": 1626447471925, "version": 2, "chainId": 84, "sender": "3N58U7hA1kzMTCUqHiJGdcPdjxAKspMgGNp", "senderPublicKey": "85gydchvWB9gMPFCKM6kfLPWFSATbtGog2Y6rUjhtQKT", "proofs": [ "3xEeC6hAr7HGCLhfz6MS4owFhCAmDKhpB13PCGCxN3UhWQVgZMyoDBjfC7V7cv3VpbN7vHxwLor2D8LboLpiDPuV" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAAAAAAAgAAAAFpAQAAABFidXlUb2tlbldpdGhXYXZlcwAAAAAEAAAACXN3YXBUb2tlbgEAAAAgb43vwMVF3NniH29QbTemn52wAqbd0CJjn9c5H5QYbCgEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAABmFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAACXN3YXBUb2tlbgUAAAADbmlsAAAAAWkBAAAAEXNlbGxUb2tlbkZvcldhdmVzAAAAAAQAAAAJc3dhcFRva2VuAQAAACBvje/AxUXc2eIfb1BtN6afnbACpt3QImOf1zkflBhsKAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAACXN3YXBUb2tlbgkAAAIAAAABAgAAABljYW4gaG9kbCBTd2FwIFRva2VuIG9ubHkuBAAAAAZhbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAAdSOFCw==", "height": 1616309, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2mYwm2HrdcSBAERgcTJRVpkJQy9iDa58sRsPUtyhuMyU Next: CUarzkQMVUx7fWm3M8aTre5ZYkVWNXNqkNK8vD2ZPBQ8 Diff:
OldNewDifferences
2525 then throw("can hodl Swap Token only.")
2626 else {
2727 let amount = pmt.amount
28- TransferSet([ScriptTransfer(i.caller, amount, swapToken)])
28+ TransferSet([ScriptTransfer(i.caller, amount, unit)])
2929 }
3030 }
3131
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func buyTokenWithWaves () = {
88 let swapToken = base58'8WTnTr8QxFYKhMo7tkjLigfw2zAFFQYzjpoNdSFruTL3'
99 let pmt = extract(i.payment)
1010 if (isDefined(pmt.assetId))
1111 then throw("can hodl waves only at the moment")
1212 else {
1313 let amount = pmt.amount
1414 TransferSet([ScriptTransfer(i.caller, amount, swapToken)])
1515 }
1616 }
1717
1818
1919
2020 @Callable(i)
2121 func sellTokenForWaves () = {
2222 let swapToken = base58'8WTnTr8QxFYKhMo7tkjLigfw2zAFFQYzjpoNdSFruTL3'
2323 let pmt = extract(i.payment)
2424 if ((pmt.assetId != swapToken))
2525 then throw("can hodl Swap Token only.")
2626 else {
2727 let amount = pmt.amount
28- TransferSet([ScriptTransfer(i.caller, amount, swapToken)])
28+ TransferSet([ScriptTransfer(i.caller, amount, unit)])
2929 }
3030 }
3131
3232

github/deemru/w8io/026f985 
41.76 ms