tx · HTc1JCADeC38Fgo6Pcag6PC1rEACrmuuexckqtzDBM44
3MqPdXWunQnVsfNux9YQ3eGmMfvBKv7zpoV: -1.00000000 Waves
2019.03.18 12:22 [541492] smart asset 3MqPdXWunQnVsfNux9YQ3eGmMfvBKv7zpoV > SELF 0.00000000 test3
{
"type": 15,
"id": "HTc1JCADeC38Fgo6Pcag6PC1rEACrmuuexckqtzDBM44",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1552900931176,
"version": 1,
"sender": "3MqPdXWunQnVsfNux9YQ3eGmMfvBKv7zpoV",
"senderPublicKey": "4fEj7DKYTPhNbYatj1wPFk8GxUNCu62QAgqgVF8A6r1y",
"proofs": [
"2XfKiC5pKFKa8h2vedJbgie3sfPGRF1JcsnExmPsvQPeBuD3VesL5XLmLgaghGG7nkMim8vq9zGfyqmfzcw4bFCM"
],
"assetId": "121BxF4uEX8hP6JZYKQDb8ZGqpFCaTV2ECPXkgmMLLe1",
"script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUEC3cmEatGb52HzfuglZKYNkiVPPK99oMBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAACXJlY2lwaWVudAkAAlgAAAABCAkABCQAAAABCAUAAAACdHgAAAAJcmVjaXBpZW50AAAABWJ5dGVzBAAAABFyZWNpcGllbnRDYXRlZ29yeQkABB0AAAACBQAAAAZpc3N1ZXIFAAAACXJlY2lwaWVudAMJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAAGaXNzdWVyBgkAAAIAAAABAgAAACFZb3UgY2Fubm90IHRyYW5zZmVycmVkIHRoaXMgdG9rZW4DCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBAAAAAR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uc2FjdGlvbgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAMJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAAGaXNzdWVyBgkAAAIAAAABAgAAABpZb3UgY2Fubm90IGJ1cm4gdGhpcyB0b2tlbgMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAZU2V0QXNzZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAGByelNMo=",
"chainId": 84,
"height": 541492,
"spentComplexity": 0
}
View: original | compacted
Prev: zZKjNUrTSTrazYTys3A4g9N4LNmmuibLeETkSxeBAzq
Next: none
Diff:
Old | New | | Differences |
---|
8 | 8 | | if ((tx.sender == issuer)) |
---|
9 | 9 | | then true |
---|
10 | 10 | | else throw("You cannot transferred this token") |
---|
| 11 | + | case tx: ExchangeTransaction => |
---|
| 12 | + | let sell = sigVerify(tx.sellOrder.bodyBytes, tx.sellOrder.proofs[0], tx.sellOrder.senderPublicKey) |
---|
| 13 | + | let buy = sigVerify(tx.buyOrder.bodyBytes, tx.buyOrder.proofs[0], tx.buyOrder.senderPublicKey) |
---|
| 14 | + | let sellOrderSender = toBase58String(tx.sellOrder.sender.bytes) |
---|
| 15 | + | let maximumprice = 1 |
---|
| 16 | + | if (if (buy) |
---|
| 17 | + | then if (isDefined((maximumprice > tx.buyOrder.price))) |
---|
| 18 | + | then true |
---|
| 19 | + | else throw("Transaction is not allowed by token-script ") |
---|
| 20 | + | else false) |
---|
| 21 | + | then true |
---|
| 22 | + | else if (sell) |
---|
| 23 | + | then if ((tx.sellOrder.sender == issuer)) |
---|
| 24 | + | then true |
---|
| 25 | + | else throw("Error: Minimum amount To Trade is 500 test3") |
---|
| 26 | + | else false |
---|
11 | 27 | | case tx: MassTransferTransaction => |
---|
12 | 28 | | if ((tx.sender == issuer)) |
---|
13 | 29 | | then true |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let issuer = Address(base58'3MqPdXWunQnVsfNux9YQ3eGmMfvBKv7zpoV') |
---|
4 | 4 | | match tx { |
---|
5 | 5 | | case tx: TransferTransaction => |
---|
6 | 6 | | let recipient = toBase58String(addressFromRecipient(tx.recipient).bytes) |
---|
7 | 7 | | let recipientCategory = getString(issuer, recipient) |
---|
8 | 8 | | if ((tx.sender == issuer)) |
---|
9 | 9 | | then true |
---|
10 | 10 | | else throw("You cannot transferred this token") |
---|
| 11 | + | case tx: ExchangeTransaction => |
---|
| 12 | + | let sell = sigVerify(tx.sellOrder.bodyBytes, tx.sellOrder.proofs[0], tx.sellOrder.senderPublicKey) |
---|
| 13 | + | let buy = sigVerify(tx.buyOrder.bodyBytes, tx.buyOrder.proofs[0], tx.buyOrder.senderPublicKey) |
---|
| 14 | + | let sellOrderSender = toBase58String(tx.sellOrder.sender.bytes) |
---|
| 15 | + | let maximumprice = 1 |
---|
| 16 | + | if (if (buy) |
---|
| 17 | + | then if (isDefined((maximumprice > tx.buyOrder.price))) |
---|
| 18 | + | then true |
---|
| 19 | + | else throw("Transaction is not allowed by token-script ") |
---|
| 20 | + | else false) |
---|
| 21 | + | then true |
---|
| 22 | + | else if (sell) |
---|
| 23 | + | then if ((tx.sellOrder.sender == issuer)) |
---|
| 24 | + | then true |
---|
| 25 | + | else throw("Error: Minimum amount To Trade is 500 test3") |
---|
| 26 | + | else false |
---|
11 | 27 | | case tx: MassTransferTransaction => |
---|
12 | 28 | | if ((tx.sender == issuer)) |
---|
13 | 29 | | then true |
---|
14 | 30 | | else throw("You cannot send this token via MassTransferTransaction") |
---|
15 | 31 | | case tx: BurnTransaction => |
---|
16 | 32 | | if ((tx.sender == issuer)) |
---|
17 | 33 | | then true |
---|
18 | 34 | | else throw("You cannot burn this token") |
---|
19 | 35 | | case tx: ReissueTransaction|SetAssetScriptTransaction => |
---|
20 | 36 | | true |
---|
21 | 37 | | case _ => |
---|
22 | 38 | | false |
---|
23 | 39 | | } |
---|