tx · B7pJGDB8qWcs3oQzyjfc6zYt1KiynqpQkeLemFupXMsS
3NCujHULyYqqR6K5M8UDFmEqUXrk7dhGgSN: -1.00000000 Waves
2019.08.30 17:47 [654132] smart asset 3NCujHULyYqqR6K5M8UDFmEqUXrk7dhGgSN > SELF 0.00000000 AAAAAA Smart
{
"type": 15,
"id": "B7pJGDB8qWcs3oQzyjfc6zYt1KiynqpQkeLemFupXMsS",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1567176426828,
"version": 1,
"sender": "3NCujHULyYqqR6K5M8UDFmEqUXrk7dhGgSN",
"senderPublicKey": "HdT6SidnMsevqyJszfDFydCQ9gcL3FBHks3e7hbdAqoS",
"proofs": [
"2Gz1E7qHRh6kjsSRoJd9qA9AWiViszimd8MULpWJtDMu9uiZdUoRVtCGM96joGPo5YD3UQCbMhkkFXoHhdtty2zi"
],
"assetId": "BvaMEHy8zhcQpv2JvPCQmecZNrfqQXzyJkXXDGPMrjZ3",
"script": "base64:AwQAAAAFUkZCSWQBAAAAIAMz/gGnCcUK/p+p0VnirlfSe3D1csGqcNtLG5ZdEgaWBAAAABNtaW5pbWFsQW1vdW50VG9CdXJuCQAAaQAAAAIIBQAAAAR0aGlzAAAACHF1YW50aXR5AAAAAAAAACcQBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAARidXJuBQAAAAckbWF0Y2gwAwkAAGYAAAACBQAAABNtaW5pbWFsQW1vdW50VG9CdXJuCAUAAAAEYnVybgAAAAhxdWFudGl0eQkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAVllvdSBjYW4gYnVybiBvbmx5IDAuMSBwZXJjZW50IChvciBtb3JlKSBvZiBjdXJyZW50IHRvdGFsIHN1cHBseSwgdGhpcyBpcyBub3cgZXF1YWwgdG8gCQEAAAAJZHJvcFJpZ2h0AAAAAgkAAaQAAAABBQAAAB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AAAACBQAAAAdyYXRlTWluAAAAAAAAAAAHAAAAAAAAAAABAgAAAAYwIGFuZCAJAQAAAAlkcm9wUmlnaHQAAAACBQAAAAdyYXRlTWluAAAAAAAAAAAHAgAAAAEuCQEAAAAJZHJvcFJpZ2h0AAAAAgkBAAAACXRha2VSaWdodAAAAAIFAAAAB3JhdGVNaW4AAAAAAAAAAAcAAAAAAAAAAAECAAAAaDkgUkZCIFRva2VucywgdGhpcyByYXRlIGlzIGNhbHVjbGF0ZWQgd2l0aCBmb3JtdWxhIFJGQiBUb2tlbiBUb3RhbCBTdXBwbHkgLyBSRkIgU21hcnQgVG9rZW4gVG90YWwgU3VwcGx5BgF/RWI=",
"chainId": 84,
"height": 654132,
"spentComplexity": 0
}
View: original | compacted
Prev: 33T1r5ninkr2rBV9UqWobBTRBshCgNaadPmBs4WJMM2v
Next: none
Diff:
Old | New | | Differences |
---|
8 | 8 | | then throw((((("You can burn only 0.1 percent (or more) of current total supply, this is now equal to " + dropRight(toString(minimalAmountToBurn), 7)) + ".") + takeRight(toString(minimalAmountToBurn), 7)) + " RFB Smart Tokens")) |
---|
9 | 9 | | else true |
---|
10 | 10 | | case e: ExchangeTransaction => |
---|
11 | | - | let rateMin = fraction(100000000, extract(assetInfo(RFBId)).quantity, this.quantity) |
---|
12 | | - | let rateDiff = (rateMin - e.price) |
---|
13 | | - | if (if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
| 11 | + | let rateMin = toString(fraction(100000000, extract(assetInfo(RFBId)).quantity, this.quantity)) |
---|
| 12 | + | let price = e.price |
---|
| 13 | + | if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
14 | 14 | | then true |
---|
15 | 15 | | else (e.sellOrder.assetPair.amountAsset == RFBId)) |
---|
16 | | - | then (rateDiff > -10) |
---|
17 | | - | else false) |
---|
18 | | - | then (0 >= rateDiff) |
---|
| 16 | + | then (dropRight(toString(price), 1) == dropRight(rateMin, 1)) |
---|
19 | 17 | | else false) |
---|
20 | 18 | | then true |
---|
21 | | - | else throw((((((((("This token can be traded with RFB Token only, allowed RFB Smart Token rate is currently between " + dropRight(toString(rateMin), 7)) + ".") + takeRight(toString(rateMin), 7)) + " and ") + dropRight(toString(rateMin), 7)) + ".") + dropRight(takeRight(toString(rateMin), 7), 1)) + "9 RFB Tokens, this rate is caluclated with formula RFB Token Total Supply / RFB Smart Token Total Supply")) |
---|
| 19 | + | else throw((((((((("This token can be traded with RFB Token only, allowed RFB Smart Token rate is currently between " + dropRight(rateMin, 7)) + ".") + dropRight(takeRight(rateMin, 7), 1)) + "0 and ") + dropRight(rateMin, 7)) + ".") + dropRight(takeRight(rateMin, 7), 1)) + "9 RFB Tokens, this rate is caluclated with formula RFB Token Total Supply / RFB Smart Token Total Supply")) |
---|
22 | 20 | | case _ => |
---|
23 | 21 | | true |
---|
24 | 22 | | } |
---|
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 / 10000) |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case burn: BurnTransaction => |
---|
7 | 7 | | if ((minimalAmountToBurn > burn.quantity)) |
---|
8 | 8 | | then throw((((("You can burn only 0.1 percent (or more) of current total supply, this is now equal to " + dropRight(toString(minimalAmountToBurn), 7)) + ".") + takeRight(toString(minimalAmountToBurn), 7)) + " RFB Smart Tokens")) |
---|
9 | 9 | | else true |
---|
10 | 10 | | case e: ExchangeTransaction => |
---|
11 | | - | let rateMin = fraction(100000000, extract(assetInfo(RFBId)).quantity, this.quantity) |
---|
12 | | - | let rateDiff = (rateMin - e.price) |
---|
13 | | - | if (if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
| 11 | + | let rateMin = toString(fraction(100000000, extract(assetInfo(RFBId)).quantity, this.quantity)) |
---|
| 12 | + | let price = e.price |
---|
| 13 | + | if (if (if ((e.sellOrder.assetPair.priceAsset == RFBId)) |
---|
14 | 14 | | then true |
---|
15 | 15 | | else (e.sellOrder.assetPair.amountAsset == RFBId)) |
---|
16 | | - | then (rateDiff > -10) |
---|
17 | | - | else false) |
---|
18 | | - | then (0 >= rateDiff) |
---|
| 16 | + | then (dropRight(toString(price), 1) == dropRight(rateMin, 1)) |
---|
19 | 17 | | else false) |
---|
20 | 18 | | then true |
---|
21 | | - | else throw((((((((("This token can be traded with RFB Token only, allowed RFB Smart Token rate is currently between " + dropRight(toString(rateMin), 7)) + ".") + takeRight(toString(rateMin), 7)) + " and ") + dropRight(toString(rateMin), 7)) + ".") + dropRight(takeRight(toString(rateMin), 7), 1)) + "9 RFB Tokens, this rate is caluclated with formula RFB Token Total Supply / RFB Smart Token Total Supply")) |
---|
| 19 | + | else throw((((((((("This token can be traded with RFB Token only, allowed RFB Smart Token rate is currently between " + dropRight(rateMin, 7)) + ".") + dropRight(takeRight(rateMin, 7), 1)) + "0 and ") + dropRight(rateMin, 7)) + ".") + dropRight(takeRight(rateMin, 7), 1)) + "9 RFB Tokens, this rate is caluclated with formula RFB Token Total Supply / RFB Smart Token Total Supply")) |
---|
22 | 20 | | case _ => |
---|
23 | 21 | | true |
---|
24 | 22 | | } |
---|