tx · 4eVdBvjRLbpxMUgxL4kFMyiwsAKovE1dnfxE3v8ioyEu
3NC6z8qVwvnUtjkCPjWkChi9pWqcR2DpDa3: -1.00000000 Waves
2019.03.20 11:32 [544362] smart asset 3NC6z8qVwvnUtjkCPjWkChi9pWqcR2DpDa3 > SELF 0.00000000 98token
{
"type": 15,
"id": "4eVdBvjRLbpxMUgxL4kFMyiwsAKovE1dnfxE3v8ioyEu",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1553070740219,
"version": 1,
"sender": "3NC6z8qVwvnUtjkCPjWkChi9pWqcR2DpDa3",
"senderPublicKey": "6hRFV3c39EhCuHoNozcqU17q3PuMT48rjq6B4nYwNP3W",
"proofs": [
"2CmfzeaQLZmT2bAYzxo92ZsNmwU96mF9wL2rVWjDDS1owA8RkkDo5mzDLuzTroWgWbWkjRyFLXhi2m6ud8rDFxBr"
],
"assetId": "4UfTfQQZDtFbW89oqBSXHt9gt4KCA9SC8roSbzjFGh7T",
"script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU82Kio9qxzJwolMCf2VgGRgcAN/mQjvhkBAAAAAdhc3NldElkAQAAACAzqTqorhTfO4QOcZZ+pD0JN/6dFzoRLtBZi0EAkZ4UzgQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAmV4BQAAAAckbWF0Y2gwBAAAAARwYWlyCQEAAAAJQXNzZXRQYWlyAAAAAgUAAAAHYXNzZXRJZAUAAAAEdW5pdAQAAAAEcmF0ZQkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABmlzc3VlcgIAAAAMZXhjaGFuZ2VSYXRlBAAAAAhyYXRlRGlmZgkAAGUAAAACBQAAAARyYXRlCQAAawAAAAMAAAAAAAX14QAIBQAAAAJleAAAAAVwcmljZQgFAAAAAmV4AAAABmFtb3VudAMDCQAAAAAAAAIICAUAAAACZXgAAAAIYnV5T3JkZXIAAAAJYXNzZXRQYWlyBQAAAARwYWlyCQAAZgAAAAIFAAAACHJhdGVEaWZmAP////////+cBwkAAGYAAAACAAAAAAAAAABkBQAAAAhyYXRlRGlmZgcGJDT/NA==",
"chainId": 84,
"height": 544362,
"spentComplexity": 0
}
View: original | compacted
Prev: 4neNvsLfr94H6uwJuqc6Vz2QNt4YsjmooVVc5xLafFyZ
Next: 4yeL5TKZxxnKzVXH1EDFsUzBp3U9BWAwqxtLGDvc49d2
Diff:
Old | New | | Differences |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case ex: ExchangeTransaction => |
---|
7 | 7 | | let pair = AssetPair(assetId, unit) |
---|
8 | | - | (ex.buyOrder.assetPair == pair) |
---|
| 8 | + | let rate = extract(getInteger(issuer, "exchangeRate")) |
---|
| 9 | + | let rateDiff = (rate - fraction(100000000, ex.price, ex.amount)) |
---|
| 10 | + | if (if ((ex.buyOrder.assetPair == pair)) |
---|
| 11 | + | then (rateDiff > -100) |
---|
| 12 | + | else false) |
---|
| 13 | + | then (100 > rateDiff) |
---|
| 14 | + | else false |
---|
9 | 15 | | case _ => |
---|
10 | 16 | | true |
---|
11 | 17 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let issuer = Address(base58'3NC6z8qVwvnUtjkCPjWkChi9pWqcR2DpDa3') |
---|
4 | 4 | | let assetId = base58'4UfTfQQZDtFbW89oqBSXHt9gt4KCA9SC8roSbzjFGh7T' |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case ex: ExchangeTransaction => |
---|
7 | 7 | | let pair = AssetPair(assetId, unit) |
---|
8 | | - | (ex.buyOrder.assetPair == pair) |
---|
| 8 | + | let rate = extract(getInteger(issuer, "exchangeRate")) |
---|
| 9 | + | let rateDiff = (rate - fraction(100000000, ex.price, ex.amount)) |
---|
| 10 | + | if (if ((ex.buyOrder.assetPair == pair)) |
---|
| 11 | + | then (rateDiff > -100) |
---|
| 12 | + | else false) |
---|
| 13 | + | then (100 > rateDiff) |
---|
| 14 | + | else false |
---|
9 | 15 | | case _ => |
---|
10 | 16 | | true |
---|
11 | 17 | | } |
---|