tx · 2zn9RTfYkUVDMvg9g5gUXzrxx5EU8XTDcDJWZNVpu835
3MtHweJiyA6ikkkPCn4ssqpi4Nokcrf9hT9: -1.00000000 Waves
2019.03.18 05:28 [541081] smart asset 3MtHweJiyA6ikkkPCn4ssqpi4Nokcrf9hT9 > SELF 0.00000000 serrote
{
"type": 15,
"id": "2zn9RTfYkUVDMvg9g5gUXzrxx5EU8XTDcDJWZNVpu835",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1552876115335,
"version": 1,
"sender": "3MtHweJiyA6ikkkPCn4ssqpi4Nokcrf9hT9",
"senderPublicKey": "5HwUTPzUP1wy7djMELX2wLNmasSaARD4kw1xpAyeJw1h",
"proofs": [
"4Qo7FvWR4qUCtcdjQohNxC6pTqjNww3xrc9h8HUgL4pXEqdac77bzoSnxGheodRAfwS3q5xYhY1PxweNeHouTL4S"
],
"assetId": "CpMnMP75j2vyK5cGaiVsLTgFTfxgFcFLMnVUshzzeHrA",
"script": "base64:AgQAAAAFcHJpY2UAAAAAAAAAAAEEAAAABmFtb3VudAAAAAAAAAAABQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAWEFAAAAByRtYXRjaDAEAAAABHBhaXIICAUAAAABYQAAAAhidXlPcmRlcgAAAAlhc3NldFBhaXIEAAAADnRyYWRlZEZvcldhdmVzAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAABHBhaXIAAAALYW1vdW50QXNzZXQGCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAUAAAAEcGFpcgAAAApwcmljZUFzc2V0AwUAAAAOdHJhZGVkRm9yV2F2ZXMJAAAAAAAAAggFAAAAAWEAAAAFcHJpY2UFAAAABXByaWNlBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABYgUAAAAHJG1hdGNoMAQAAAAEcGFpcggIBQAAAAFiAAAACGJ1eU9yZGVyAAAACWFzc2V0UGFpcgQAAAAOdHJhZGVkRm9yV2F2ZXMDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCAUAAAAEcGFpcgAAAAthbW91bnRBc3NldAYJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAARwYWlyAAAACnByaWNlQXNzZXQDBQAAAA50cmFkZWRGb3JXYXZlcwkAAAAAAAACCAUAAAABYgAAAAZhbW91bnQFAAAABmFtb3VudAcDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYH9gM4Kg==",
"chainId": 84,
"height": 541081,
"spentComplexity": 0
}
View: original | compacted
Prev: AGpWNL9dRaUxpJQhU469BSMxSVNKpABhkFJFrR7zKmLk
Next: none
Diff:
Old | New | | Differences |
---|
12 | 12 | | then (a.price == price) |
---|
13 | 13 | | else false |
---|
14 | 14 | | case b: ExchangeTransaction => |
---|
15 | | - | (b.amount == amount) |
---|
| 15 | + | let pair = b.buyOrder.assetPair |
---|
| 16 | + | let tradedForWaves = if (!(isDefined(pair.amountAsset))) |
---|
| 17 | + | then true |
---|
| 18 | + | else !(isDefined(pair.priceAsset)) |
---|
| 19 | + | if (tradedForWaves) |
---|
| 20 | + | then (b.amount == amount) |
---|
| 21 | + | else false |
---|
| 22 | + | case _: MassTransferTransaction|TransferTransaction => |
---|
| 23 | + | true |
---|
16 | 24 | | case _ => |
---|
17 | | - | true |
---|
| 25 | + | false |
---|
18 | 26 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let price = 1 |
---|
4 | 4 | | let amount = 5 |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case a: ExchangeTransaction => |
---|
7 | 7 | | let pair = a.buyOrder.assetPair |
---|
8 | 8 | | let tradedForWaves = if (!(isDefined(pair.amountAsset))) |
---|
9 | 9 | | then true |
---|
10 | 10 | | else !(isDefined(pair.priceAsset)) |
---|
11 | 11 | | if (tradedForWaves) |
---|
12 | 12 | | then (a.price == price) |
---|
13 | 13 | | else false |
---|
14 | 14 | | case b: ExchangeTransaction => |
---|
15 | | - | (b.amount == amount) |
---|
| 15 | + | let pair = b.buyOrder.assetPair |
---|
| 16 | + | let tradedForWaves = if (!(isDefined(pair.amountAsset))) |
---|
| 17 | + | then true |
---|
| 18 | + | else !(isDefined(pair.priceAsset)) |
---|
| 19 | + | if (tradedForWaves) |
---|
| 20 | + | then (b.amount == amount) |
---|
| 21 | + | else false |
---|
| 22 | + | case _: MassTransferTransaction|TransferTransaction => |
---|
| 23 | + | true |
---|
16 | 24 | | case _ => |
---|
17 | | - | true |
---|
| 25 | + | false |
---|
18 | 26 | | } |
---|