tx · 71eERG5QVr4UrbPXczR13XjCNQVJrbkLM8Hd2Ke29EE1
3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD: -0.00100000 Waves
2022.07.16 17:27 [2142419] smart account 3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD > SELF 0.00000000 Waves
{
"type": 13,
"id": "71eERG5QVr4UrbPXczR13XjCNQVJrbkLM8Hd2Ke29EE1",
"fee": 100000,
"feeAssetId": null,
"timestamp": 1657981785493,
"version": 2,
"chainId": 84,
"sender": "3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD",
"senderPublicKey": "CU5wMqCBg4bC4Zgs8QGiqjjvmeMkSiKo3Ff6k5axJZwr",
"proofs": [
"2m1NXWp1LhAtadNjUArm1XXgZDRcTVY3SZxmLVyxU1ffmxo5FLHnkioQwxCvf35Yt7FQhXR9o7schBtVzV2trsgv"
],
"script": "base64:AAIFAAAAAAAAAAwIAhIDCgEBEgMKAQEAAAACAAAAAAVnd1VzZAEAAAAg1td3yV5SV/9sTRnPub7Z/8+5gW83ZtDAi9MIvEJ2JY0AAAAABHVzZG4BAAAAIA/yHBKs5MQ8muxGGqslqLDsugcrRsxtiHLwteKSSQG0AAAAAgAAAAFpAQAAAA9zd2FwR0d1c2RUb1VzZG4AAAABAAAABmFtb3VudAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAVnd1VzZAkAAAIAAAABAgAAAClPbmx5IGd3VXNkIHRva2VuIGlzIGFsbG93ZWQgZm9yIHN3YXBwaW5nLgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdXNkbgUAAAADbmlsAAAAAWkBAAAAD3N3YXBVc2RuVG9HR3VzZAAAAAEAAAAGYW1vdW50BAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABHVzZG4JAAACAAAAAQIAAAApT25seSBnd1VzZCB0b2tlbiBpcyBhbGxvd2VkIGZvciBzd2FwcGluZy4EAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABWd3VXNkBQAAAANuaWwAAAAAXLGy8g==",
"height": 2142419,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: A2CC27i7kagL5XPhpvnUUDwFAEg9gk2kw9Vor2w4cNk8
Next: FEN1bvLwmpJ3LiRupWbMLXSeFsdWA4Cte2x1uXPSGxdp
Diff:
Old | New | | Differences |
---|
29 | 29 | | |
---|
30 | 30 | | @Callable(c) |
---|
31 | 31 | | func swapUsdnToGGusd (d) = { |
---|
32 | | - | let f = toBase58String(c.caller.bytes) |
---|
33 | | - | let g = { |
---|
34 | | - | let h = getInteger(this, f) |
---|
35 | | - | if ($isInstanceOf(h, "Int")) |
---|
36 | | - | then { |
---|
37 | | - | let i = h |
---|
38 | | - | i |
---|
| 32 | + | let e = value(c.payments[0]) |
---|
| 33 | + | if ((e.assetId != b)) |
---|
| 34 | + | then throw("Only gwUsd token is allowed for swapping.") |
---|
| 35 | + | else { |
---|
| 36 | + | let f = toBase58String(c.caller.bytes) |
---|
| 37 | + | let g = { |
---|
| 38 | + | let h = getInteger(this, f) |
---|
| 39 | + | if ($isInstanceOf(h, "Int")) |
---|
| 40 | + | then { |
---|
| 41 | + | let i = h |
---|
| 42 | + | i |
---|
| 43 | + | } |
---|
| 44 | + | else 0 |
---|
39 | 45 | | } |
---|
40 | | - | else 0 |
---|
41 | | - | } |
---|
42 | 46 | | [ScriptTransfer(c.caller, d, a)] |
---|
| 47 | + | } |
---|
43 | 48 | | } |
---|
44 | 49 | | |
---|
45 | 50 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'FTeosv2BmZED7kBcGnqDy9tba1VdkeodQveSAATMQusJ' |
---|
5 | 5 | | |
---|
6 | 6 | | let b = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(c) |
---|
9 | 9 | | func swapGGusdToUsdn (d) = { |
---|
10 | 10 | | let e = value(c.payments[0]) |
---|
11 | 11 | | if ((e.assetId != a)) |
---|
12 | 12 | | then throw("Only gwUsd token is allowed for swapping.") |
---|
13 | 13 | | else { |
---|
14 | 14 | | let f = toBase58String(c.caller.bytes) |
---|
15 | 15 | | let g = { |
---|
16 | 16 | | let h = getInteger(this, f) |
---|
17 | 17 | | if ($isInstanceOf(h, "Int")) |
---|
18 | 18 | | then { |
---|
19 | 19 | | let i = h |
---|
20 | 20 | | i |
---|
21 | 21 | | } |
---|
22 | 22 | | else 0 |
---|
23 | 23 | | } |
---|
24 | 24 | | [ScriptTransfer(c.caller, d, b)] |
---|
25 | 25 | | } |
---|
26 | 26 | | } |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
29 | 29 | | |
---|
30 | 30 | | @Callable(c) |
---|
31 | 31 | | func swapUsdnToGGusd (d) = { |
---|
32 | | - | let f = toBase58String(c.caller.bytes) |
---|
33 | | - | let g = { |
---|
34 | | - | let h = getInteger(this, f) |
---|
35 | | - | if ($isInstanceOf(h, "Int")) |
---|
36 | | - | then { |
---|
37 | | - | let i = h |
---|
38 | | - | i |
---|
| 32 | + | let e = value(c.payments[0]) |
---|
| 33 | + | if ((e.assetId != b)) |
---|
| 34 | + | then throw("Only gwUsd token is allowed for swapping.") |
---|
| 35 | + | else { |
---|
| 36 | + | let f = toBase58String(c.caller.bytes) |
---|
| 37 | + | let g = { |
---|
| 38 | + | let h = getInteger(this, f) |
---|
| 39 | + | if ($isInstanceOf(h, "Int")) |
---|
| 40 | + | then { |
---|
| 41 | + | let i = h |
---|
| 42 | + | i |
---|
| 43 | + | } |
---|
| 44 | + | else 0 |
---|
39 | 45 | | } |
---|
40 | | - | else 0 |
---|
41 | | - | } |
---|
42 | 46 | | [ScriptTransfer(c.caller, d, a)] |
---|
| 47 | + | } |
---|
43 | 48 | | } |
---|
44 | 49 | | |
---|
45 | 50 | | |
---|