tx · Axoa8ZZXyAsFn742idCewCGtoTaJ3vXJas8Q7Rai5PiG
3N49T9MHfWsZJp62WPv37cg2ToyDrvMzLww: -1.00000000 Waves
2023.01.31 00:39 [2428236] smart asset 3N49T9MHfWsZJp62WPv37cg2ToyDrvMzLww > SELF 0.000000 MainAsset
{
"type": 15,
"id": "Axoa8ZZXyAsFn742idCewCGtoTaJ3vXJas8Q7Rai5PiG",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1675114722657,
"version": 2,
"chainId": 84,
"sender": "3N49T9MHfWsZJp62WPv37cg2ToyDrvMzLww",
"senderPublicKey": "CJFqGECQ9QCcwYnw3kJCYZp35bzxjVo2akYs1B1C7gbS",
"proofs": [
"kg4ue9dYp9B8UvFxNNebzFpQ8T44FXGzAJMzoX1bnuf9RHKunNNPzJh2sHM5na3ep1nCb7nfyQ5HPGthRUMCaxQ"
],
"assetId": "G6GLtJ1wmZhE9uAeRABo4a66kwWFDgx3rcjsG3tFkG3C",
"script": "base64:BQQAAAAGb3JhY2xlCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU9xIy1Xhizmi8e7bCFGtkUZHvGPwzLF4uBAAAAAdhc3NldElkCQACWAAAAAEBAAAAIOA4jl8UgSEF8THo7qJLbeLX0iNn292leajB0R57xwQTBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAYDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNFeGNoYW5nZVRyYW5zYWN0aW9uBAAAAAFlBQAAAAckbWF0Y2gwBAAAAAxjb3JyZWN0UHJpY2UJAABnAAAAAggFAAAAAWUAAAAFcHJpY2UAAAAAAAAW42AEAAAAEWNvcnJlY3RQcmljZUFzc2V0CQAAAAAAAAIIBQAAAAFlAAAABXByaWNlCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAZvcmFjbGUFAAAAB2Fzc2V0SWQDBQAAAAxjb3JyZWN0UHJpY2UGBQAAABFjb3JyZWN0UHJpY2VBc3NldAZKhRSU",
"height": 2428236,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6ia7u7MbyfN5QSjfRq4djDwfK4hbj7NCqTm7UdQsr6n7
Next: 6GtjYwxa1A6nq8ci6Kz4RAdf2cZeVgnCS5eMZ62ttzhd
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
| 3 | + | let oracle = Address(base58'3NCSUUm7nAFGsH6GPxDLxiQFgB1bvtn5BYq') |
---|
| 4 | + | let assetId = toBase58String(base58'G6GLtJ1wmZhE9uAeRABo4a66kwWFDgx3rcjsG3tFkG3C') |
---|
3 | 5 | | match tx { |
---|
4 | 6 | | case t: TransferTransaction => |
---|
5 | 7 | | true |
---|
|
7 | 9 | | false |
---|
8 | 10 | | case e: ExchangeTransaction => |
---|
9 | 11 | | let correctPrice = (e.price >= 1500000) |
---|
10 | | - | let correctPriceAsset = !(isDefined(e.sellOrder.assetPair.priceAsset)) |
---|
| 12 | + | let correctPriceAsset = (e.price == getIntegerValue(oracle, assetId)) |
---|
11 | 13 | | if (correctPrice) |
---|
12 | 14 | | then true |
---|
13 | 15 | | else correctPriceAsset |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
| 3 | + | let oracle = Address(base58'3NCSUUm7nAFGsH6GPxDLxiQFgB1bvtn5BYq') |
---|
| 4 | + | let assetId = toBase58String(base58'G6GLtJ1wmZhE9uAeRABo4a66kwWFDgx3rcjsG3tFkG3C') |
---|
3 | 5 | | match tx { |
---|
4 | 6 | | case t: TransferTransaction => |
---|
5 | 7 | | true |
---|
6 | 8 | | case t: InvokeScriptTransaction|MassTransferTransaction => |
---|
7 | 9 | | false |
---|
8 | 10 | | case e: ExchangeTransaction => |
---|
9 | 11 | | let correctPrice = (e.price >= 1500000) |
---|
10 | | - | let correctPriceAsset = !(isDefined(e.sellOrder.assetPair.priceAsset)) |
---|
| 12 | + | let correctPriceAsset = (e.price == getIntegerValue(oracle, assetId)) |
---|
11 | 13 | | if (correctPrice) |
---|
12 | 14 | | then true |
---|
13 | 15 | | else correctPriceAsset |
---|
14 | 16 | | case _ => |
---|
15 | 17 | | true |
---|
16 | 18 | | } |
---|