tx · 5gSirq3C5jx1DH1nSct1Z6DT8TJKP6TS91TDAkuSLEce 3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz: -1.00000000 Waves 2019.09.13 01:27 [673540] smart asset 3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz > SELF 0.00000000 time3
{ "type": 15, "id": "5gSirq3C5jx1DH1nSct1Z6DT8TJKP6TS91TDAkuSLEce", "fee": 100000000, "feeAssetId": null, "timestamp": 1568327290535, "version": 1, "sender": "3MozTr8r7fZ1siohKsJgDUBykyB3ZAmTXQz", "senderPublicKey": "8xbFEr8yZ5HF64v8tiadoqScjuYSatXx8ceugsivh1zn", "proofs": [ "282c4xFYzL711wQtHwcdCQML1ZruyMtJivFrEjt3uwdnuyXF3PYZfvfRMHetQ6GaP6Q1tzKxZUpMZ5mcwrshLMpM" ], "assetId": "J6C8iuvmPWE7erepvWeYQisAy6p2Wf1uYVB2cVqriC7", "script": "base64:AgQAAAATbWluaW11bVdhdmVzQmFsYW5jZQAAAAAABfXhAAQAAAAQbW92ZVRpbWVJbkJsb2NrcwAAAAAAAAAAAwQAAAAQbWluaW1hbEZlZVRvTW92ZQAAAAAAAJiWgAQAAAAQbWluaW1hbEZlZVRvQnVybgAAAAAAAvrwgAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAEAAAABHR4SWQIBQAAAAF0AAAACmF0dGFjaG1lbnQEAAAAHGN1cnJlbnRSZWNpcGllbnRXYXZlc0JhbGFuY2UJAQAAAAx3YXZlc0JhbGFuY2UAAAABCAUAAAABdAAAAAlyZWNpcGllbnQEAAAAC3RyYW5zYWN0aW9uCQAD6AAAAAEJAQAAAAdleHRyYWN0AAAAAQgFAAAAAXQAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMQUAAAALdHJhbnNhY3Rpb24DCQAAAQAAAAIFAAAAByRtYXRja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lzIHRva2Vu6EzOTg==", "chainId": 84, "height": 673540, "spentComplexity": 0 } View: original | compacted Prev: H7KX4rq7gVeF7xNe6TybegJ6DXweqTzZp8xQz6f4yeUk Next: none Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 2 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let minimumWavesBalance = 100000000 | |
4 | - | let moveTimeInBlocks = | |
4 | + | let moveTimeInBlocks = 3 | |
5 | 5 | let minimalFeeToMove = 10000000 | |
6 | 6 | let minimalFeeToBurn = 50000000 | |
7 | 7 | match tx { | |
16 | 16 | then if ((minimumWavesBalance > currentRecipientWavesBalance)) | |
17 | 17 | then throw("Current balance is less than minimalWavesBalance") | |
18 | 18 | else true | |
19 | - | else if ((32 > size(t.attachment))) | |
20 | - | then throw("Attachment should contain transaction id ") | |
21 | - | else { | |
22 | - | let receiveTx = transactionById(txId) | |
23 | - | match receiveTx { | |
24 | - | case recTx: MassTransferTransaction|TransferTransaction => | |
25 | - | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) | |
26 | - | let receivedAssetInLastNBlocks = if ((moveTimeInBlocks >= (height - receivedBlockNumber))) | |
27 | - | then (t.assetId == recTx.assetId) | |
28 | - | else false | |
29 | - | let feeMore1Waves = (t.fee >= minimalFeeToMove) | |
30 | - | if (if (!(receivedAssetInLastNBlocks)) | |
31 | - | then !(feeMore1Waves) | |
32 | - | else false) | |
33 | - | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") | |
34 | - | else if (receivedAssetInLastNBlocks) | |
35 | - | then true | |
36 | - | else feeMore1Waves | |
37 | - | case _ => | |
38 | - | throw("Receive tx should be a transfer") | |
39 | - | } | |
40 | - | } | |
19 | + | else { | |
20 | + | let receiveTx = transactionById(txId) | |
21 | + | match receiveTx { | |
22 | + | case recTx: MassTransferTransaction|TransferTransaction => | |
23 | + | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) | |
24 | + | let receivedAssetInLastNBlocks = if ((moveTimeInBlocks >= (height - receivedBlockNumber))) | |
25 | + | then (t.assetId == recTx.assetId) | |
26 | + | else false | |
27 | + | let feeMore1Waves = (t.fee >= minimalFeeToMove) | |
28 | + | if (if (!(receivedAssetInLastNBlocks)) | |
29 | + | then !(feeMore1Waves) | |
30 | + | else false) | |
31 | + | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") | |
32 | + | else if (receivedAssetInLastNBlocks) | |
33 | + | then true | |
34 | + | else feeMore1Waves | |
35 | + | case _ => | |
36 | + | throw("Receive tx should be a transfer") | |
37 | + | } | |
38 | + | } | |
41 | 39 | case _ => | |
42 | 40 | throw("Not issue tx") | |
43 | 41 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 2 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let minimumWavesBalance = 100000000 | |
4 | - | let moveTimeInBlocks = | |
4 | + | let moveTimeInBlocks = 3 | |
5 | 5 | let minimalFeeToMove = 10000000 | |
6 | 6 | let minimalFeeToBurn = 50000000 | |
7 | 7 | match tx { | |
8 | 8 | case t: TransferTransaction => | |
9 | 9 | let txId = t.attachment | |
10 | 10 | let currentRecipientWavesBalance = wavesBalance(t.recipient) | |
11 | 11 | let transaction = transactionById(extract(t.assetId)) | |
12 | 12 | match transaction { | |
13 | 13 | case issueTx: IssueTransaction => | |
14 | 14 | let transactionByIssuer = (t.senderPublicKey == issueTx.senderPublicKey) | |
15 | 15 | if (transactionByIssuer) | |
16 | 16 | then if ((minimumWavesBalance > currentRecipientWavesBalance)) | |
17 | 17 | then throw("Current balance is less than minimalWavesBalance") | |
18 | 18 | else true | |
19 | - | else if ((32 > size(t.attachment))) | |
20 | - | then throw("Attachment should contain transaction id ") | |
21 | - | else { | |
22 | - | let receiveTx = transactionById(txId) | |
23 | - | match receiveTx { | |
24 | - | case recTx: MassTransferTransaction|TransferTransaction => | |
25 | - | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) | |
26 | - | let receivedAssetInLastNBlocks = if ((moveTimeInBlocks >= (height - receivedBlockNumber))) | |
27 | - | then (t.assetId == recTx.assetId) | |
28 | - | else false | |
29 | - | let feeMore1Waves = (t.fee >= minimalFeeToMove) | |
30 | - | if (if (!(receivedAssetInLastNBlocks)) | |
31 | - | then !(feeMore1Waves) | |
32 | - | else false) | |
33 | - | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") | |
34 | - | else if (receivedAssetInLastNBlocks) | |
35 | - | then true | |
36 | - | else feeMore1Waves | |
37 | - | case _ => | |
38 | - | throw("Receive tx should be a transfer") | |
39 | - | } | |
40 | - | } | |
19 | + | else { | |
20 | + | let receiveTx = transactionById(txId) | |
21 | + | match receiveTx { | |
22 | + | case recTx: MassTransferTransaction|TransferTransaction => | |
23 | + | let receivedBlockNumber = extract(transactionHeightById(recTx.id)) | |
24 | + | let receivedAssetInLastNBlocks = if ((moveTimeInBlocks >= (height - receivedBlockNumber))) | |
25 | + | then (t.assetId == recTx.assetId) | |
26 | + | else false | |
27 | + | let feeMore1Waves = (t.fee >= minimalFeeToMove) | |
28 | + | if (if (!(receivedAssetInLastNBlocks)) | |
29 | + | then !(feeMore1Waves) | |
30 | + | else false) | |
31 | + | then throw("You got potato long time ago, now you have to pay 1 WAVES fee") | |
32 | + | else if (receivedAssetInLastNBlocks) | |
33 | + | then true | |
34 | + | else feeMore1Waves | |
35 | + | case _ => | |
36 | + | throw("Receive tx should be a transfer") | |
37 | + | } | |
38 | + | } | |
41 | 39 | case _ => | |
42 | 40 | throw("Not issue tx") | |
43 | 41 | } | |
44 | 42 | case burn: BurnTransaction => | |
45 | 43 | if ((minimalFeeToBurn > burn.fee)) | |
46 | 44 | then throw("You have to pay 5 WAVES to burn this token") | |
47 | 45 | else true | |
48 | 46 | case mass: SetAssetScriptTransaction|MassTransferTransaction => | |
49 | 47 | let transaction = transactionById(extract(mass.assetId)) | |
50 | 48 | match transaction { | |
51 | 49 | case issueTx: IssueTransaction => | |
52 | 50 | (mass.senderPublicKey == issueTx.senderPublicKey) | |
53 | 51 | case _ => | |
54 | 52 | throw("Bad issue tx type") | |
55 | 53 | } | |
56 | 54 | case _ => | |
57 | 55 | throw("You only can transfer this token") | |
58 | 56 | } |
github/deemru/w8io/169f3d6 43.90 ms ◑