tx · H12wPUsE1uUpUQfEcSzqXC3VhZw2k9LLZF94HRiw5Jb6
3NCujHULyYqqR6K5M8UDFmEqUXrk7dhGgSN: -1.00000000 Waves
2019.08.30 13:15 [653852] smart asset 3NCujHULyYqqR6K5M8UDFmEqUXrk7dhGgSN > SELF 0.00000000 AAAAAA Smart
{
"type": 15,
"id": "H12wPUsE1uUpUQfEcSzqXC3VhZw2k9LLZF94HRiw5Jb6",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1567160136671,
"version": 1,
"sender": "3NCujHULyYqqR6K5M8UDFmEqUXrk7dhGgSN",
"senderPublicKey": "HdT6SidnMsevqyJszfDFydCQ9gcL3FBHks3e7hbdAqoS",
"proofs": [
"58anSQ8XS7HmAjF9TJoeg4RTNBxJXNkuCUnG1bmxVrF3yAxveaXWwBP1BxGnhMzY8C37JGHU2MF8732Cb17KkeFK"
],
"assetId": "BvaMEHy8zhcQpv2JvPCQmecZNrfqQXzyJkXXDGPMrjZ3",
"script": "base64:AwQAAAAFUkZCSWQBAAAAIAMz/gGnCcUK/p+p0VnirlfSe3D1csGqcNtLG5ZdEgaWBAAAABNtaW5pbWFsQW1vdW50VG9CdXJuCQAAaQAAAAIIBQAAAAR0aGlzAAAACHF1YW50aXR5AAAAAAAAAABkBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAARidXJuBQAAAAckbWF0Y2gwAwkAAGYAAAACBQAAABNtaW5pbWFsQW1vdW50VG9CdXJuCAUAAAAEYnVybgAAAAhxdWFudGl0eQkAAAIAAAABAgAAAD1Zb3UgY2FuIGJ1cm4gb25seSAxIHBlcmNlbnQgKG9yIG1vcmUpIG9mIGN1cnJlbnQgdG90YWwgc3VwcGx5BgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMAQAAAAHcmF0ZU1pbgkAAGsAAAADAAAAAAAF9eEACAkBAAAAB2V4dHJhY3QAAAABCQAD7AAAAAEFAAAABVJGQklkAAAACHF1YW50aXR5CAUAAAAEdGhpcwAAAAhxdWFudGl0eQQAAAAIcmF0ZURpZmYJAABlAAAAAgUAAAAHcmF0ZU1pbgkAAGsAAAADAAAAAOjUpRAACAUAAAABZQAAAAVwcmljZQgFAAAAAWUAAAAGYW1vdW50AwMDAwkAAAAAAAACCAgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAlhc3NldFBhaXIAAAAKcHJpY2VBc3NldAUAAAAFUkZCSWQGCQAAAAAAAAIICAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAAthbW91bnRBc3NldAUAAAAFUkZCSWQJAABmAAAAAgUAAAAIcmF0ZURpZmYA/////////5wHCQAAZgAAAAIAAAAAAAAAAGQFAAAACHJhdGVEaWZmBwYJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAB6VGhpcyB0b2tlbiBjYW4gYmUgdHJhZGVkIHdpdGggUkZCIFRva2VuIG9ubHkgYXQgcmF0ZSBjYWxjdWxhdGVkIHdpdGggZm9ybXVsYTogUkZCIFRvdGFsIFN1cHBseSAvIFJGQiBTbWFydCBUb3RhbCBTdXBwbHkgPSAJAAGkAAAAAQUAAAAHcmF0ZU1pbgIAAAAOLCByYXRlIGRpZmYgaXMJAAGkAAAAAQUAAAAIcmF0ZURpZmYG4uWRdQ==",
"chainId": 84,
"height": 653852,
"spentComplexity": 0
}
View: original | compacted
Prev: GnJLk4R2TyAT8vLiFzUAjFo3SuyqoyPQhxh1kecQPkp1
Next: 9Bz5WUe4UxdPCMUVMmk2WzUTYkX2Yf1JVE5xPT7YaSrb
Diff:
Old | New | | Differences |
---|
9 | 9 | | else true |
---|
10 | 10 | | case e: ExchangeTransaction => |
---|
11 | 11 | | let rateMin = fraction(100000000, extract(assetInfo(RFBId)).quantity, this.quantity) |
---|
12 | | - | let rateDiff = fraction(100000000, e.price, e.amount) |
---|
13 | | - | if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
| 12 | + | let rateDiff = (rateMin - fraction(1000000000000, e.price, e.amount)) |
---|
| 13 | + | if (if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
14 | 14 | | then true |
---|
15 | 15 | | else (e.sellOrder.assetPair.amountAsset == RFBId)) |
---|
16 | | - | then (e.price == rateMin) |
---|
| 16 | + | then (rateDiff > -100) |
---|
| 17 | + | else false) |
---|
| 18 | + | then (100 > rateDiff) |
---|
17 | 19 | | else false) |
---|
18 | 20 | | then true |
---|
19 | 21 | | else throw(((("This token can be traded with RFB Token only at rate calculated with formula: RFB Total Supply / RFB Smart Total Supply = " + toString(rateMin)) + ", rate diff is") + toString(rateDiff))) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let RFBId = base58'DWCuXbcXtrCkSKNX3D2uxh7zHh72SN7tC5eQXK92tC5' |
---|
4 | 4 | | let minimalAmountToBurn = (this.quantity / 100) |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case burn: BurnTransaction => |
---|
7 | 7 | | if ((minimalAmountToBurn > burn.quantity)) |
---|
8 | 8 | | then throw("You can burn only 1 percent (or more) of current total supply") |
---|
9 | 9 | | else true |
---|
10 | 10 | | case e: ExchangeTransaction => |
---|
11 | 11 | | let rateMin = fraction(100000000, extract(assetInfo(RFBId)).quantity, this.quantity) |
---|
12 | | - | let rateDiff = fraction(100000000, e.price, e.amount) |
---|
13 | | - | if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
| 12 | + | let rateDiff = (rateMin - fraction(1000000000000, e.price, e.amount)) |
---|
| 13 | + | if (if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
14 | 14 | | then true |
---|
15 | 15 | | else (e.sellOrder.assetPair.amountAsset == RFBId)) |
---|
16 | | - | then (e.price == rateMin) |
---|
| 16 | + | then (rateDiff > -100) |
---|
| 17 | + | else false) |
---|
| 18 | + | then (100 > rateDiff) |
---|
17 | 19 | | else false) |
---|
18 | 20 | | then true |
---|
19 | 21 | | else throw(((("This token can be traded with RFB Token only at rate calculated with formula: RFB Total Supply / RFB Smart Total Supply = " + toString(rateMin)) + ", rate diff is") + toString(rateDiff))) |
---|
20 | 22 | | case _ => |
---|
21 | 23 | | true |
---|
22 | 24 | | } |
---|