tx · 2PtNSsHzVNg2D7KpvHkmyLwyurjvvpJAQuGtEQpMC2Yt
3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz: -1.00000000 Waves
2019.09.12 23:26 [673416] smart asset 3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz > SELF 0.00000000 time3
{
"type": 15,
"id": "2PtNSsHzVNg2D7KpvHkmyLwyurjvvpJAQuGtEQpMC2Yt",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1568319969278,
"version": 1,
"sender": "3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz",
"senderPublicKey": "8xbFEr8yZ5HF64v8tiadoqScjuYSatXx8ceugsivh1zn",
"proofs": [
"28HiqPrHRXF8PpWKEAGCSi2uxpj7bYgnSKDo945uLqcNn7v3K3N6YPaaBjnoMzspz6ieFhaf79Y3RsMZBbQbgnK1"
],
"assetId": "J6C8iuvmPWE7erepvWeYQisAy6p2Wf1uYVB2cVqriC7",
"script": "base64:AgQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAEAAAABHR4SWQIBQAAAAF0AAAACmF0dGFjaG1lbnQEAAAAC3RyYW5zYWN0aW9uCQAD6AAAAAEJAQAAAAdleHRyYWN0AAAAAQgFAAAAAXQAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMQUAAAALdHJhbnNhY3Rpb24DCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAEElzc3VlVHJhbnNhY3Rpb24EAAAAB2lzc3VlVHgFAAAAByRtYXRjaDEEAAAAE3RyYW5zYWN0aW9uQnlJc3N1ZXIJAAAAAAAAAggFAAAAAXQAAAAPc2VuZGVyUHVibGljS2V5CAUAAAAHaXNzdWVUeAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAACXJlY2VpdmVUeAkAA+gAAAABBQAAAAR0eElkBAAAAAckbWF0Y2gyBQAAAAlyZWNlaXZlVHgDAwkAAAEAAAACBQAAAAckbWF0Y2gyAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMgIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAFcmVjVHgFAAAAByRtYXRjaDIEAAAAFHRyYW5zYWN0aW9uQnlJc3N1ZXJzCQAAAAAAAAIIBQAAAAVyZWNUeAAAAA9zZW5kZXJQdWJsaWNLZXkIBQAAAAdpc3N1ZVR4AAAAD3NlbmRlclB1YmxpY0tleQQAAAATcmVjZWl2ZWRCbG9ja051bWJlcgkBAAAAB2V4dHJhY3QAAAABCQAD6QAAAAEIBQAAAAVyZWNUeAAAAAJpZAQAAAAacmVjZWl2ZWRBc3NldEluTGFzdE5CbG9ja3MJAABmAAAAAgAAAAAAAAAAAgkAAGUAAAACBQAAAAZoZWlnaHQFAAAAE3JlY2VpdmVkQmxvY2tOdW1iZXIDCQEAAAABIQAAAAEFAAAAGnJlY2VpdmVkQXNzZXRJbkxhc3ROQmxvY2tzCQAAAgAAAAECAAAAPVlvdSBnb3QgcG90YXRvIGxvbmcgdGltZSBhZ28sIG5vdyB5b3UgaGF2ZSB0byBwYXkgMSBXQVZFUyBmZWUDBQAAABpyZWNlaXZlZEFzc2V0SW5MYXN0TkJsb2NrcwYDBQAAABR0cmFuc2FjdGlvbkJ5SXNzdWVycwYHCQAAAgAAAAECAAAAH1JlY2VpdmUgdHggc2hvdWxkIGJlIGEgdHJhbnNmZXIJAAACAAAAAQIAAAAJTm90IGlzc3VlBgcFUrs=",
"chainId": 84,
"height": 673416,
"spentComplexity": 0
}
View: original | compacted
Prev: 75UV5Z8LGmusgeLXdGST7EuBmo8h46tnYzDof1R65aWG
Next: BAx1SGeVh7kgchwPoPjtqojvTMgTZGRpb1XwTZz6M5hg
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) |
---|
13 | 14 | | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) |
---|
14 | | - | let receivedAssetInLastNBlocks = if ((5 >= (height - receivedBlockNumber))) |
---|
15 | | - | then (t.assetId == recTx.assetId) |
---|
16 | | - | else false |
---|
| 15 | + | let receivedAssetInLastNBlocks = (2 > (height - receivedBlockNumber)) |
---|
17 | 16 | | if (!(receivedAssetInLastNBlocks)) |
---|
18 | 17 | | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") |
---|
19 | 18 | | else if (receivedAssetInLastNBlocks) |
---|
20 | 19 | | then true |
---|
21 | | - | else if (transactionByIssuer) |
---|
| 20 | + | else if (transactionByIssuers) |
---|
22 | 21 | | then true |
---|
23 | 22 | | else false |
---|
24 | 23 | | case _ => |
---|
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) |
---|
13 | 14 | | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) |
---|
14 | | - | let receivedAssetInLastNBlocks = if ((5 >= (height - receivedBlockNumber))) |
---|
15 | | - | then (t.assetId == recTx.assetId) |
---|
16 | | - | else false |
---|
| 15 | + | let receivedAssetInLastNBlocks = (2 > (height - receivedBlockNumber)) |
---|
17 | 16 | | if (!(receivedAssetInLastNBlocks)) |
---|
18 | 17 | | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") |
---|
19 | 18 | | else if (receivedAssetInLastNBlocks) |
---|
20 | 19 | | then true |
---|
21 | | - | else if (transactionByIssuer) |
---|
| 20 | + | else if (transactionByIssuers) |
---|
22 | 21 | | then true |
---|
23 | 22 | | else false |
---|
24 | 23 | | case _ => |
---|
25 | 24 | | throw("Receive tx should be a transfer") |
---|
26 | 25 | | } |
---|
27 | 26 | | case _ => |
---|
28 | 27 | | throw("Not issue") |
---|
29 | 28 | | } |
---|
30 | 29 | | case _ => |
---|
31 | 30 | | true |
---|
32 | 31 | | } |
---|