tx · BAx1SGeVh7kgchwPoPjtqojvTMgTZGRpb1XwTZz6M5hg
3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz: -1.00000000 Waves
2019.09.12 23:30 [673422] smart asset 3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz > SELF 0.00000000 time3
{
"type": 15,
"id": "BAx1SGeVh7kgchwPoPjtqojvTMgTZGRpb1XwTZz6M5hg",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1568320234191,
"version": 1,
"sender": "3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz",
"senderPublicKey": "8xbFEr8yZ5HF64v8tiadoqScjuYSatXx8ceugsivh1zn",
"proofs": [
"2kjgirmvx95yFETRYGyqRQLEfnJ7Npsqto62JWGsQo8uX9e5BHCSY36yv1J6RAiUtGjT2WkbyVhpHHj7eep3oUZG"
],
"assetId": "J6C8iuvmPWE7erepvWeYQisAy6p2Wf1uYVB2cVqriC7",
"script": "base64:AgQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAEAAAABHR4SWQIBQAAAAF0AAAACmF0dGFjaG1lbnQEAAAAC3RyYW5zYWN0aW9uCQAD6AAAAAEJAQAAAAdleHRyYWN0AAAAAQgFAAAAAXQAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMQUAAAALdHJhbnNhY3Rpb24DCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAEElzc3VlVHJhbnNhY3Rpb24EAAAAB2lzc3VlVHgFAAAAByRtYXRjaDEEAAAAE3RyYW5zYWN0aW9uQnlJc3N1ZXIJAAAAAAAAAggFAAAAAXQAAAAPc2VuZGVyUHVibGljS2V5CAUAAAAHaXNzdWVUeAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAACXJlY2VpdmVUeAkAA+gAAAABBQAAAAR0eElkBAAAAAckbWF0Y2gyBQAAAAlyZWNlaXZlVHgDAwkAAAEAAAACBQAAAAckbWF0Y2gyAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMgIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAFcmVjVHgFAAAAByRtYXRjaDIEAAAAE3JlY2VpdmVkQmxvY2tOdW1iZXIJAQAAAAdleHRyYWN0AAAAAQkAA+kAAAABCAUAAAAFcmVjVHgAAAACaWQEAAAAGnJlY2VpdmVkQXNzZXRJbkxhc3ROQmxvY2tzCQAAZgAAAAIAAAAAAAAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAABNyZWNlaXZlZEJsb2NrTnVtYmVyAwkBAAAAASEAAAABBQAAABpyZWNlaXZlZEFzc2V0SW5MYXN0TkJsb2NrcwkAAAIAAAABAgAAAD1Zb3UgZ290IHBvdGF0byBsb25nIHRpbWUgYWdvLCBub3cgeW91IGhhdmUgdG8gcGF5IDEgV0FWRVMgZmVlAwUAAAAacmVjZWl2ZWRBc3NldEluTGFzdE5CbG9ja3MGAwkBAAAAASEAAAABBQAAABN0cmFuc2FjdGlvbkJ5SXNzdWVyBwYJAAACAAAAAQIAAAAfUmVjZWl2ZSB0eCBzaG91bGQgYmUgYSB0cmFuc2ZlcgkAAAIAAAABAgAAAAlOb3QgaXNzdWUGg39qsg==",
"chainId": 84,
"height": 673422,
"spentComplexity": 0
}
View: original | compacted
Prev: 2PtNSsHzVNg2D7KpvHkmyLwyurjvvpJAQuGtEQpMC2Yt
Next: 5SPMfKjknpBtWvAQAd8rB4Hvk1dneGbVi5btmqgfGVNz
Diff:
Old | New | | Differences |
---|
10 | 10 | | let receiveTx = transactionById(txId) |
---|
11 | 11 | | match receiveTx { |
---|
12 | 12 | | case recTx: MassTransferTransaction|TransferTransaction => |
---|
13 | | - | let transactionByIssuers = (recTx.senderPublicKey == issueTx.senderPublicKey) |
---|
14 | 13 | | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) |
---|
15 | 14 | | let receivedAssetInLastNBlocks = (2 > (height - receivedBlockNumber)) |
---|
16 | 15 | | if (!(receivedAssetInLastNBlocks)) |
---|
17 | 16 | | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") |
---|
18 | 17 | | else if (receivedAssetInLastNBlocks) |
---|
19 | 18 | | then true |
---|
20 | | - | else if (transactionByIssuers) |
---|
21 | | - | then true |
---|
22 | | - | else false |
---|
| 19 | + | else if (!(transactionByIssuer)) |
---|
| 20 | + | then false |
---|
| 21 | + | else true |
---|
23 | 22 | | case _ => |
---|
24 | 23 | | throw("Receive tx should be a transfer") |
---|
25 | 24 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | match tx { |
---|
4 | 4 | | case t: TransferTransaction => |
---|
5 | 5 | | let txId = t.attachment |
---|
6 | 6 | | let transaction = transactionById(extract(t.assetId)) |
---|
7 | 7 | | match transaction { |
---|
8 | 8 | | case issueTx: IssueTransaction => |
---|
9 | 9 | | let transactionByIssuer = (t.senderPublicKey == issueTx.senderPublicKey) |
---|
10 | 10 | | let receiveTx = transactionById(txId) |
---|
11 | 11 | | match receiveTx { |
---|
12 | 12 | | case recTx: MassTransferTransaction|TransferTransaction => |
---|
13 | | - | let transactionByIssuers = (recTx.senderPublicKey == issueTx.senderPublicKey) |
---|
14 | 13 | | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) |
---|
15 | 14 | | let receivedAssetInLastNBlocks = (2 > (height - receivedBlockNumber)) |
---|
16 | 15 | | if (!(receivedAssetInLastNBlocks)) |
---|
17 | 16 | | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") |
---|
18 | 17 | | else if (receivedAssetInLastNBlocks) |
---|
19 | 18 | | then true |
---|
20 | | - | else if (transactionByIssuers) |
---|
21 | | - | then true |
---|
22 | | - | else false |
---|
| 19 | + | else if (!(transactionByIssuer)) |
---|
| 20 | + | then false |
---|
| 21 | + | else true |
---|
23 | 22 | | case _ => |
---|
24 | 23 | | throw("Receive tx should be a transfer") |
---|
25 | 24 | | } |
---|
26 | 25 | | case _ => |
---|
27 | 26 | | throw("Not issue") |
---|
28 | 27 | | } |
---|
29 | 28 | | case _ => |
---|
30 | 29 | | true |
---|
31 | 30 | | } |
---|