tx · J9xqF6HbBMgRmBiBSEaPXGgBQA1RBVd2kpu4RLSDiajK
3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys: -0.01400000 Waves
2022.02.11 15:23 [1918942] smart account 3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys > SELF 0.00000000 Waves
{
"type": 13,
"id": "J9xqF6HbBMgRmBiBSEaPXGgBQA1RBVd2kpu4RLSDiajK",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1644582244377,
"version": 2,
"chainId": 84,
"sender": "3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys",
"senderPublicKey": "HUBVsBcuExqVSbV3mSVhpdKfgihF2nwdtpGmpVLRwxEN",
"proofs": [
"58tpGGcWDsCxAFuV2UwMXiY6cq2ZcpjYqEGsr3ppgUv52a13DJosokqZqYJhuhKwLvQPoy6osAqTUPBHibLrKzZB"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAABAAAAAAd0b2tlbklkAgAAACw2bjdMazYyQVpVSlRkVFlIeFNnTllUN29wYTJoQVlKQWtudEJDbnlrYzNDRgAAAAIAAAABaQEAAAALYWNjZXB0VG9rZW4AAAAABAAAAAJvaQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFUF0dGFjaCBwYXltZW50IHBsZWFzZQMJAABnAAAAAgAAAAAAAAAAAAgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAdUGF5bWVudCBhbW91bnQgc2hvdWxkIGJlID4gMCAEAAAABWFzc2lkBAAAAAckbWF0Y2gwCAUAAAADcG10AAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEJAAGbAAAAAQIAAAADZmRzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQACWAAAAAEFAAAABWFzc2lkBQAAAANuaWwAAAABaQEAAAAIdHJhbnNmZXIAAAABAAAACXJlY2lwaWVudAQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAD0F0dGFjaCBwYXltZW50cwQAAAAHYXNzZXRJZAgFAAAAA3BtdAAAAAdhc3NldElkBAAAAAZhbW91bnQIBQAAAANwbXQAAAAGYW1vdW50BAAAAANyZWMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAACXJlY2lwaWVudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAANyZWMFAAAABmFtb3VudAUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkZtwm/",
"height": 1918942,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 58pdGWgdZzfYS8aqyyWnYnVAatAA4TL8uUAPgLt3EBRi
Next: FDGGLedXrXhD2SQ8hjBPjX3d4jSPDG36cniShg2ErdyD
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let tokenId = "6n7Lk62AZUJTdTYHxSgNYT7opa2hAYJAkntBCnykc3CF" |
---|
| 5 | + | |
---|
| 6 | + | @Callable(i) |
---|
| 7 | + | func acceptToken () = { |
---|
| 8 | + | let oi = i.payments[0] |
---|
| 9 | + | let pmt = if ((size(i.payments) == 1)) |
---|
| 10 | + | then i.payments[0] |
---|
| 11 | + | else throw("Attach payment please") |
---|
| 12 | + | if ((0 >= pmt.amount)) |
---|
| 13 | + | then throw("Payment amount should be > 0 ") |
---|
| 14 | + | else { |
---|
| 15 | + | let assid = match pmt.assetId { |
---|
| 16 | + | case a: ByteVector => |
---|
| 17 | + | a |
---|
| 18 | + | case _ => |
---|
| 19 | + | toBytes("fds") |
---|
| 20 | + | } |
---|
| 21 | + | [StringEntry(toString(i.caller), toBase58String(assid))] |
---|
| 22 | + | } |
---|
| 23 | + | } |
---|
| 24 | + | |
---|
4 | 25 | | |
---|
5 | 26 | | |
---|
6 | 27 | | @Callable(i) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let tokenId = "6n7Lk62AZUJTdTYHxSgNYT7opa2hAYJAkntBCnykc3CF" |
---|
| 5 | + | |
---|
| 6 | + | @Callable(i) |
---|
| 7 | + | func acceptToken () = { |
---|
| 8 | + | let oi = i.payments[0] |
---|
| 9 | + | let pmt = if ((size(i.payments) == 1)) |
---|
| 10 | + | then i.payments[0] |
---|
| 11 | + | else throw("Attach payment please") |
---|
| 12 | + | if ((0 >= pmt.amount)) |
---|
| 13 | + | then throw("Payment amount should be > 0 ") |
---|
| 14 | + | else { |
---|
| 15 | + | let assid = match pmt.assetId { |
---|
| 16 | + | case a: ByteVector => |
---|
| 17 | + | a |
---|
| 18 | + | case _ => |
---|
| 19 | + | toBytes("fds") |
---|
| 20 | + | } |
---|
| 21 | + | [StringEntry(toString(i.caller), toBase58String(assid))] |
---|
| 22 | + | } |
---|
| 23 | + | } |
---|
| 24 | + | |
---|
4 | 25 | | |
---|
5 | 26 | | |
---|
6 | 27 | | @Callable(i) |
---|
7 | 28 | | func transfer (recipient) = { |
---|
8 | 29 | | let pmt = if ((size(i.payments) == 1)) |
---|
9 | 30 | | then i.payments[0] |
---|
10 | 31 | | else throw("Attach payments") |
---|
11 | 32 | | let assetId = pmt.assetId |
---|
12 | 33 | | let amount = pmt.amount |
---|
13 | 34 | | let rec = addressFromStringValue(recipient) |
---|
14 | 35 | | [ScriptTransfer(rec, amount, assetId)] |
---|
15 | 36 | | } |
---|
16 | 37 | | |
---|
17 | 38 | | |
---|
18 | 39 | | @Verifier(tx) |
---|
19 | 40 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
20 | 41 | | |
---|