tx · AvgFWFUhwU4sjFr24mgjeUunQ4NwQfVQxDNyohjnzamR 3N7sgwhSS8xPkYAJBvrjhAu5NNM8nSVBK6d: -0.01000000 Waves 2023.10.02 10:03 [2780689] smart account 3N7sgwhSS8xPkYAJBvrjhAu5NNM8nSVBK6d > SELF 0.00000000 Waves
{ "type": 13, "id": "AvgFWFUhwU4sjFr24mgjeUunQ4NwQfVQxDNyohjnzamR", "fee": 1000000, "feeAssetId": null, "timestamp": 1696230269003, "version": 2, "chainId": 84, "sender": "3N7sgwhSS8xPkYAJBvrjhAu5NNM8nSVBK6d", "senderPublicKey": "2xepYpePcdoBmD6T455w9bKmTxgot7zSjzpg4wbQ7HLQ", "proofs": [ "4WEVPFbSvGmtcdAc8jW1UnMqBZBB2iZNUkysorU2Eat3pmggr7VvKG5NPErLk8FyrCRNf2Cd4ur2vuKikkUjMBQG" ], "script": "base64:BgIECAISAAYAA1NFUAICX18AEWtleUZhY3RvcnlBZGRyZXNzCQC5CQIJAMwIAgICJXMJAMwIAgIHZmFjdG9yeQUDbmlsBQNTRVAADmZhY3RvcnlBZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzBRFrZXlGYWN0b3J5QWRkcmVzcwAOa2V5SW1wbEFkZHJlc3MJALkJAgkAzAgCAgIlcwkAzAgCAgRpbXBsBQNuaWwFA1NFUAALaW1wbEFkZHJlc3MJARFAZXh0ck5hdGl2ZSgxMDYyKQEJARFAZXh0ck5hdGl2ZSgxMDUzKQIFDmZhY3RvcnlBZGRyZXNzBQ5rZXlJbXBsQWRkcmVzcwEPYXNzZXRJZFRvU3RyaW5nAQdhc3NldElkBAckbWF0Y2gwBQdhc3NldElkAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAWIFByRtYXRjaDAJANgEAQUBYgIFV0FWRVMBAWkBA3B1dAAEDWFtb3VudEFzc2V0SWQJAQ9hc3NldElkVG9TdHJpbmcBCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQEEWFtb3VudEFzc2V0QW1vdW50CAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQMcHJpY2VBc3NldElkCQEPYXNzZXRJZFRvU3RyaW5nAQgJAJEDAggFAWkIcGF5bWVudHMAAQdhc3NldElkBBBwcmljZUFzc2V0QW1vdW50CAkAkQMCCAUBaQhwYXltZW50cwABBmFtb3VudAQGcmVzdWx0CQD9BwQFC2ltcGxBZGRyZXNzAgNwdXQJAMwIAgUNYW1vdW50QXNzZXRJZAkAzAgCBRFhbW91bnRBc3NldEFtb3VudAkAzAgCBQxwcmljZUFzc2V0SWQJAMwIAgUQcHJpY2VBc3NldEFtb3VudAUDbmlsBQNuaWwDCQAAAgUGcmVzdWx0BQZyZXN1bHQEA3JlcwQHJG1hdGNoMAUGcmVzdWx0AwkAAQIFByRtYXRjaDACCUxpc3RbQW55XQQBdAUHJG1hdGNoMAUBdAkAAgECA0VSUgkAlAoCBQNuaWwFA3JlcwkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgBfBaQH", "height": 2780689, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7Y3vU7xxYyAPDWJiJsEmtBxQ31zQoKiaLQubequKT7u7 Next: 7cmNATEo5iXEkBbHWHPKzPEewQ9DmwYUjt5dc3qm7xY5 Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | let priceAssetId = assetIdToString(i.payments[1].assetId) | |
27 | 27 | let priceAssetAmount = i.payments[1].amount | |
28 | 28 | let result = reentrantInvoke(implAddress, "put", [amountAssetId, amountAssetAmount, priceAssetId, priceAssetAmount], nil) | |
29 | - | $Tuple2(nil, result) | |
29 | + | if ((result == result)) | |
30 | + | then { | |
31 | + | let res = match result { | |
32 | + | case t: List[Any] => | |
33 | + | t | |
34 | + | case _ => | |
35 | + | throw("ERR") | |
36 | + | } | |
37 | + | $Tuple2(nil, res) | |
38 | + | } | |
39 | + | else throw("Strict value is not equal to itself.") | |
30 | 40 | } | |
31 | 41 | ||
32 | 42 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let keyFactoryAddress = makeString(["%s", "factory"], SEP) | |
7 | 7 | ||
8 | 8 | let factoryAddress = addressFromStringValue(getStringValue(this, keyFactoryAddress)) | |
9 | 9 | ||
10 | 10 | let keyImplAddress = makeString(["%s", "impl"], SEP) | |
11 | 11 | ||
12 | 12 | let implAddress = addressFromStringValue(getStringValue(factoryAddress, keyImplAddress)) | |
13 | 13 | ||
14 | 14 | func assetIdToString (assetId) = match assetId { | |
15 | 15 | case b: ByteVector => | |
16 | 16 | toBase58String(b) | |
17 | 17 | case _ => | |
18 | 18 | "WAVES" | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | @Callable(i) | |
23 | 23 | func put () = { | |
24 | 24 | let amountAssetId = assetIdToString(i.payments[0].assetId) | |
25 | 25 | let amountAssetAmount = i.payments[0].amount | |
26 | 26 | let priceAssetId = assetIdToString(i.payments[1].assetId) | |
27 | 27 | let priceAssetAmount = i.payments[1].amount | |
28 | 28 | let result = reentrantInvoke(implAddress, "put", [amountAssetId, amountAssetAmount, priceAssetId, priceAssetAmount], nil) | |
29 | - | $Tuple2(nil, result) | |
29 | + | if ((result == result)) | |
30 | + | then { | |
31 | + | let res = match result { | |
32 | + | case t: List[Any] => | |
33 | + | t | |
34 | + | case _ => | |
35 | + | throw("ERR") | |
36 | + | } | |
37 | + | $Tuple2(nil, res) | |
38 | + | } | |
39 | + | else throw("Strict value is not equal to itself.") | |
30 | 40 | } | |
31 | 41 | ||
32 | 42 |
github/deemru/w8io/026f985 36.29 ms ◑