tx · 8Mbb5mLaQp8129KHum5eqicKPBnk9GHXidKAAchfuj8u
3N66job2d8LT5VRVrR6sVrm5TetTVjHiBgK: -0.01000000 Waves
2022.11.01 13:03 [2297901] smart account 3N66job2d8LT5VRVrR6sVrm5TetTVjHiBgK > SELF 0.00000000 Waves
{
"type": 13,
"id": "8Mbb5mLaQp8129KHum5eqicKPBnk9GHXidKAAchfuj8u",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1667296956538,
"version": 2,
"chainId": 84,
"sender": "3N66job2d8LT5VRVrR6sVrm5TetTVjHiBgK",
"senderPublicKey": "HtiQy2G7cXKiGN6z5x5aCuKqMKhLWN6RQCkkrstfEnpQ",
"proofs": [
"3PKoVdfHtETs2NwUsBwwVVkjYvxV3ZUW39so72bxg3PTy3YWrno31EGwRgUizbSJ9QyNnwWfkD1WFkn3aWrsCFuD"
],
"script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAluZnRJc3N1ZWQCAAAACXdhc0luaXRlZAAAAAAKbmZ0QXNzZXRJZAIAAAALbmZ0X2Fzc2V0SWQAAAAAD1RvdGFsbmZ0U3dhcHBlZAIAAAAMdG90YWxTd2FwcGVkAAAAAA1vbGRuZnRBc3NldElkAQAAAAAAAAACAAAAAWkBAAAAC2lzc3VlTmV3bmZ0AAAAAAMJAQAAAAIhPQAAAAIJAAQgAAAAAQUAAAAJbmZ0SXNzdWVkBQAAAAR1bml0CQAAAgAAAAEJAAEsAAAAAgIAAAAvTmV3IG5mdCBpcyBhbHJlYWR5IGlzc3VlZCBhbmQgaXRzIGFzc2V0IGlkIGlzOiAJAQAAABFAZXh0ck5hdGl2ZSgxMDU4KQAAAAEFAAAACm5mdEFzc2V0SWQEAAAABm5ld05mdAkABEMAAAAHAgAAAAhEdWNrIEVnZwIAAABQVXRpbGl0eSBhbmQgUmV3YXJkIHRva2VuIEAgV2F2ZXNEdWNrcy5jb20gZ2FtZS4gVGhlIGR1Y2tpZXN0IHRva2VuIGluIHRoZS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AAAwUAAAANbmV3bmZ0QXNzZXRJZAUAAAANc3dhcHBlZEFtb3VudAYJAARMAAAAAgUAAAAHcmVpc3N1ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABXN3YXBfCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQCAAAAB19hbW91bnQFAAAADHRvU3dhcEFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAPVG90YWxuZnRTd2FwcGVkCQAAZAAAAAIFAAAAD3RvdGFsU3dhcHBlZFZhbAUAAAAMdG9Td2FwQW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANc3dhcHBlZEFtb3VudAUAAAANbmV3bmZ0QXNzZXRJZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXm96g5G",
"height": 2297901,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6dbArGBxr88325yTEfRadVdVYkQP8mW1oGa4kwWQd49T
Next: GohdFdQxN5zsenzkv4pHKmQPPnhe89stZXdabW5aqR4i
Diff:
Old | New | | Differences |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | @Callable(e) |
---|
24 | | - | func swapEgg () = if ((size(e.payments) != 1)) |
---|
25 | | - | then throw("You can attach only EGG tokens") |
---|
| 24 | + | func swapnft () = if ((size(e.payments) != 1)) |
---|
| 25 | + | then throw("You can attach only nft") |
---|
26 | 26 | | else if ((value(e.payments[0]).assetId != d)) |
---|
27 | | - | then throw("You can attach only EGG tokens") |
---|
| 27 | + | then throw("You can attach only nft tokens") |
---|
28 | 28 | | else { |
---|
29 | 29 | | let h = { |
---|
30 | 30 | | let i = getInteger(c) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "wasInited" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "nft_assetId" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "totalSwapped" |
---|
9 | 9 | | |
---|
10 | 10 | | let d = base58'' |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(e) |
---|
13 | 13 | | func issueNewnft () = if ((getBoolean(a) != unit)) |
---|
14 | 14 | | then throw(("New nft is already issued and its asset id is: " + getStringValue(b))) |
---|
15 | 15 | | else { |
---|
16 | 16 | | let f = Issue("Duck Egg", "Utility and Reward token @ WavesDucks.com game. The duckiest token in the world.", 1, 8, true, unit, 0) |
---|
17 | 17 | | let g = calculateAssetId(f) |
---|
18 | 18 | | [f, BooleanEntry(a, true), StringEntry(b, toBase58String(g))] |
---|
19 | 19 | | } |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | @Callable(e) |
---|
24 | | - | func swapEgg () = if ((size(e.payments) != 1)) |
---|
25 | | - | then throw("You can attach only EGG tokens") |
---|
| 24 | + | func swapnft () = if ((size(e.payments) != 1)) |
---|
| 25 | + | then throw("You can attach only nft") |
---|
26 | 26 | | else if ((value(e.payments[0]).assetId != d)) |
---|
27 | | - | then throw("You can attach only EGG tokens") |
---|
| 27 | + | then throw("You can attach only nft tokens") |
---|
28 | 28 | | else { |
---|
29 | 29 | | let h = { |
---|
30 | 30 | | let i = getInteger(c) |
---|
31 | 31 | | if ($isInstanceOf(i, "Int")) |
---|
32 | 32 | | then { |
---|
33 | 33 | | let j = i |
---|
34 | 34 | | j |
---|
35 | 35 | | } |
---|
36 | 36 | | else 0 |
---|
37 | 37 | | } |
---|
38 | 38 | | let k = fromBase58String(getStringValue(b)) |
---|
39 | 39 | | let l = value(e.payments[0]).amount |
---|
40 | 40 | | let m = (l * 1000000) |
---|
41 | 41 | | let n = Reissue(k, m, true) |
---|
42 | 42 | | [n, IntegerEntry((("swap_" + toBase58String(e.transactionId)) + "_amount"), l), IntegerEntry(c, (h + l)), ScriptTransfer(e.caller, m, k)] |
---|
43 | 43 | | } |
---|
44 | 44 | | |
---|
45 | 45 | | |
---|
46 | 46 | | @Verifier(o) |
---|
47 | 47 | | func p () = sigVerify(o.bodyBytes, o.proofs[0], o.senderPublicKey) |
---|
48 | 48 | | |
---|