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