tx · 7Rzbp4aYMM8hd8tV24Dha9eKTKcpuEJLkGDKBdGHfjCB
3MxH4ABV9tA1qpHhNDv6wmswuioTTjAsjF5: -1.00000000 Waves
2019.03.21 20:29 [546357] smart asset 3MxH4ABV9tA1qpHhNDv6wmswuioTTjAsjF5 > SELF 0.00000000 Token
{
"type": 15,
"id": "7Rzbp4aYMM8hd8tV24Dha9eKTKcpuEJLkGDKBdGHfjCB",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1553189440381,
"version": 1,
"sender": "3MxH4ABV9tA1qpHhNDv6wmswuioTTjAsjF5",
"senderPublicKey": "BjncHcZ1KwcHLGe7xdxfaYsCEhQk3eTTtVpjjqEcCLBj",
"proofs": [
"5eVTwpzkGaXGy9xauz5GNxAi3PntP2RYeUkstX59b9qx4rqFLrsq1m9aNPkQyQi9gXdRsdYD3KDKAmZHQQrHarEk"
],
"assetId": "7JJgTXQm4gsDFkUk7PoNDidkdYBjN9BJQtcmr4Bbfjoa",
"script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUW7hkcH0hU14f4lhGQOrki5V820P/5PQ4BAAAAAdhc3NldElkAQAAACBdlPyKlpD5iwqaN+I1F55Omh9+m5ZQyXa2N5gCtxzsBQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAmV4BQAAAAckbWF0Y2gwBAAAAARwYWlyCQEAAAAJQXNzZXRQYWlyAAAAAgUAAAAHYXNzZXRJZAUAAAAEdW5pdAQAAAAEcmF0ZQkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABmlzc3VlcgIAAAAMZXhjaGFuZ2VSYXRlAwkAAAAAAAACCAgFAAAAAmV4AAAACGJ1eU9yZGVyAAAACWFzc2V0UGFpcgUAAAAEcGFpcgkAAGYAAAACCAUAAAACZXgAAAAFcHJpY2UFAAAABHJhdGUHBjq04C0=",
"chainId": 84,
"height": 546357,
"spentComplexity": 0
}
View: original | compacted
Prev: 45judDQPh84UF2nJeUPn5v6BAkXsAvtvLuvZRMutswpb
Next: HgmLtFsFS87so1Nwb4zYikAKqyHLt1cMFzv5d79kuWP9
Diff:
Old | New | | Differences |
---|
6 | 6 | | case ex: ExchangeTransaction => |
---|
7 | 7 | | let pair = AssetPair(assetId, unit) |
---|
8 | 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) |
---|
| 9 | + | if ((ex.buyOrder.assetPair == pair)) |
---|
| 10 | + | then (ex.price > rate) |
---|
14 | 11 | | else false |
---|
15 | 12 | | case _ => |
---|
16 | 13 | | true |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let issuer = Address(base58'3MxH4ABV9tA1qpHhNDv6wmswuioTTjAsjF5') |
---|
4 | 4 | | let assetId = base58'7JJgTXQm4gsDFkUk7PoNDidkdYBjN9BJQtcmr4Bbfjoa' |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case ex: ExchangeTransaction => |
---|
7 | 7 | | let pair = AssetPair(assetId, unit) |
---|
8 | 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) |
---|
| 9 | + | if ((ex.buyOrder.assetPair == pair)) |
---|
| 10 | + | then (ex.price > rate) |
---|
14 | 11 | | else false |
---|
15 | 12 | | case _ => |
---|
16 | 13 | | true |
---|
17 | 14 | | } |
---|