tx · G6aSgpG54VhceuQTjCBVuWWMf5AyXDuDCvKhgzzowk2L 3MqPdXWunQnVsfNux9YQ3eGmMfvBKv7zpoV: -1.00000000 Waves 2019.03.10 19:24 [530206] smart asset 3MqPdXWunQnVsfNux9YQ3eGmMfvBKv7zpoV > SELF 0.00000000 test2
{ "type": 15, "id": "G6aSgpG54VhceuQTjCBVuWWMf5AyXDuDCvKhgzzowk2L", "fee": 100000000, "feeAssetId": null, "timestamp": 1552235043913, "version": 1, "sender": "3MqPdXWunQnVsfNux9YQ3eGmMfvBKv7zpoV", "senderPublicKey": "4fEj7DKYTPhNbYatj1wPFk8GxUNCu62QAgqgVF8A6r1y", "proofs": [ "2M149SZx9GuXMnjMMp4hT58SpdEoQe7RKxN2BFLuTADJiRvN8vsWNsNuimuurzexrDJT7J2c9BPxte8Voz2UXizM" ], "assetId": "AzqDQB9HWaq9mDBnqzTyLkq3mQGP3Ksw5BM5bFuwWKti", "script": "base64:AQQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUEC3cmEatGb52HzfuglZKYNkiVPPK99oMBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAACXJlY2lwaWVudAkAAlgAAAABCAkABCQAAAABCAUAAAACdHgAAAAJcmVjaXBpZW50AAAABWJ5dGVzBAAAABFyZWNpcGllbnRDYXRlZ29yeQkABB0AAAACBQAAAAZpc3N1ZXIFAAAACXJlY2lwaWVudAMJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAAGaXNzdWVyBgMDCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAARcmVjaXBpZW50Q2F0ZWdvcnkJAAAAAAAAAgkBAAAAB2V4dHJhY3QAAAABBQAAABFyZWNpcGllbnRDYXRlZ29yeQIAAAAKYW1iYXNzYWRvcgcGCQAAAgAAAAECAAAAL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IHRlc3QyIAMJAAAAAAAAAggIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAGc2VuZGVyBQAAAAZpc3N1ZXIGCQAAAgAAAAECAAAAKlRyYW5zYWN0aW9uIGlzIG5vdCBhbGxvd2VkIGJ5IHRva2VuLXNjcmlwdAcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAMJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAAGaXNzdWVyBgkAAAIAAAABAgAAADZZb3UgY2Fubm90IHNlbmQgdGhpcyBhc3NldCB2aWEgTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24DCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDADCQAAAAAAAAIIBQAAAAJ0eAAAAAZzZW5kZXIFAAAABmlzc3VlcgYJAAACAAAAAQIAAAAaWW91IGNhbm5vdCBidXJuIHRoaXMgYXNzZXQDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBgfIA8Oa", "chainId": 84, "height": 530206, "spentComplexity": 0 } View: original | compacted Prev: GzFyT6WdXK5gdJF7bSTFND4VyLCNgrvkpitgATqV1a1Q Next: B95G1YmmQnpaTMYmsA6CbJzSaRCwGmsZJrbA3FE6JU5 Diff:
Old | New | Differences | |
---|---|---|---|
21 | 21 | if (if (buy) | |
22 | 22 | then if (isDefined((maximumprice > tx.buyOrder.price))) | |
23 | 23 | then true | |
24 | - | else if ((tx.sellOrder.sender == issuer)) | |
25 | - | then true | |
26 | - | else throw("Transaction is not allowed by token-script ") | |
24 | + | else throw("Transaction is not allowed by token-script ") | |
27 | 25 | else false) | |
28 | 26 | then true | |
29 | 27 | else if (sell) | |
30 | 28 | then if (isDefined((minimumamount > tx.sellOrder.amount))) | |
31 | - | then throw("Minimum transaction amount is 1,500 test2") | |
29 | + | then throw("Minimum transaction amount is 1,500 test2 ") | |
32 | 30 | else if ((tx.sellOrder.sender == issuer)) | |
33 | 31 | then true | |
34 | - | else throw("Transaction is not allowed by token-script | |
32 | + | else throw("Transaction is not allowed by token-script") | |
35 | 33 | else false | |
36 | 34 | case tx: MassTransferTransaction => | |
37 | 35 | if ((tx.sender == issuer)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
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 if (if (isDefined(recipientCategory)) | |
11 | 11 | then (extract(recipientCategory) == "ambassador") | |
12 | 12 | else false) | |
13 | 13 | then true | |
14 | 14 | else throw("This asset can be transferred to whitelist only") | |
15 | 15 | case tx: ExchangeTransaction => | |
16 | 16 | let sell = sigVerify(tx.sellOrder.bodyBytes, tx.sellOrder.proofs[0], tx.sellOrder.senderPublicKey) | |
17 | 17 | let buy = sigVerify(tx.buyOrder.bodyBytes, tx.buyOrder.proofs[0], tx.buyOrder.senderPublicKey) | |
18 | 18 | let sellOrderSender = toBase58String(tx.sellOrder.sender.bytes) | |
19 | 19 | let minimumamount = 150000 | |
20 | 20 | let maximumprice = 1 | |
21 | 21 | if (if (buy) | |
22 | 22 | then if (isDefined((maximumprice > tx.buyOrder.price))) | |
23 | 23 | then true | |
24 | - | else if ((tx.sellOrder.sender == issuer)) | |
25 | - | then true | |
26 | - | else throw("Transaction is not allowed by token-script ") | |
24 | + | else throw("Transaction is not allowed by token-script ") | |
27 | 25 | else false) | |
28 | 26 | then true | |
29 | 27 | else if (sell) | |
30 | 28 | then if (isDefined((minimumamount > tx.sellOrder.amount))) | |
31 | - | then throw("Minimum transaction amount is 1,500 test2") | |
29 | + | then throw("Minimum transaction amount is 1,500 test2 ") | |
32 | 30 | else if ((tx.sellOrder.sender == issuer)) | |
33 | 31 | then true | |
34 | - | else throw("Transaction is not allowed by token-script | |
32 | + | else throw("Transaction is not allowed by token-script") | |
35 | 33 | else false | |
36 | 34 | case tx: MassTransferTransaction => | |
37 | 35 | if ((tx.sender == issuer)) | |
38 | 36 | then true | |
39 | 37 | else throw("You cannot send this asset via MassTransferTransaction") | |
40 | 38 | case tx: BurnTransaction => | |
41 | 39 | if ((tx.sender == issuer)) | |
42 | 40 | then true | |
43 | 41 | else throw("You cannot burn this asset") | |
44 | 42 | case tx: ReissueTransaction|SetAssetScriptTransaction => | |
45 | 43 | true | |
46 | 44 | case _ => | |
47 | 45 | false | |
48 | 46 | } |
github/deemru/w8io/026f985 34.02 ms ◑