tx · 998XomAJxVp3nzJF6mFc8xpg6xqQeF64cRL6C1ttHhEJ 3MuTTNitiCXtwNMFnExx77b8xiTBFVYyMVB: -1.00000000 Waves 2019.02.08 21:51 [486492] smart asset 3MuTTNitiCXtwNMFnExx77b8xiTBFVYyMVB > SELF 0.00000000 test
{ "type": 15, "id": "998XomAJxVp3nzJF6mFc8xpg6xqQeF64cRL6C1ttHhEJ", "fee": 100000000, "feeAssetId": null, "timestamp": 1549651940238, "version": 1, "sender": "3MuTTNitiCXtwNMFnExx77b8xiTBFVYyMVB", "senderPublicKey": "AjiJTAnh1zMMUTHYCyrN4XzdpDb9YtU5xe8hD1Su7vSV", "proofs": [ "2LxEiDEVcY98WqaFRKFKhteFeaXxje4LYbz69Zp2jrsJgph1es4jt6QpkCvRkCgHNm9K94kqFub9iN8yEktEuRYP" ], "assetId": "81bYhTjXoXFeDkYUiDxaYnX1tk38W69Jr3KgtCAK5WZT", "script": "base64:AQQAAAAOYWRtaW5QdWJsaWNLZXkBAAAAIJCqRn76vzIaLRPZfQ76udpC5ZaY6zUPmJGk4a239ScKBAAAAAxhZG1pbkFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAADmFkbWluUHVibGljS2V5BAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAABWFsbG93BQAAAAckbWF0Y2gwBAAAAAdhc3NldElkBAAAAAckbWF0Y2gxBQAAAAVhbGxvdwMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMQgICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0AwkAAAEAAAACBQAAAAckbW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NlcHRlZAkBAAAAB2V4dHJhY3QAAAABCQAEGwAAAAIFAAAAEHdoaXRlbGlzdEFkZHJlc3MJAAJYAAAAAQgFAAAAEHJlY2lwaWVudEFkZHJlc3MAAAAFYnl0ZXMEAAAAByRtYXRjaDEFAAAABWFsbG93AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNFeGNoYW5nZVRyYW5zYWN0aW9uBAAAAAFlBQAAAAckbWF0Y2gxBQAAAA5zZW5kZXJBY2NlcHRlZAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMQMFAAAADnNlbmRlckFjY2VwdGVkBQAAABFyZWNpcGllbnRBY2NlcHRlZAcJAQAAAAV0aHJvdwAAAAAGhjjrjQ==", "chainId": 84, "height": 486492, "spentComplexity": 0 } View: original | compacted Prev: 2KvFGdbT72ifqxmynjRX9sochZtnJBU9DZDRxMBEZev8 Next: J72w5kDP7DzZfYgftP3EbZN2HpNNvcNEiVeHbjHtapvw Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | case _ => | |
30 | 30 | throw() | |
31 | 31 | } | |
32 | - | let senderAccepted = | |
33 | - | let recipientAccepted = | |
32 | + | let senderAccepted = extract(getBoolean(whitelistAddress, toBase58String(senderAddress.bytes))) | |
33 | + | let recipientAccepted = extract(getBoolean(whitelistAddress, toBase58String(recipientAddress.bytes))) | |
34 | 34 | match allow { | |
35 | 35 | case e: ExchangeTransaction => | |
36 | 36 | senderAccepted |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let adminPublicKey = base58'AjiJTAnh1zMMUTHYCyrN4XzdpDb9YtU5xe8hD1Su7vSV' | |
4 | 4 | let adminAddress = addressFromPublicKey(adminPublicKey) | |
5 | 5 | match tx { | |
6 | 6 | case allow: TransferTransaction|ExchangeTransaction => | |
7 | 7 | let assetId = match allow { | |
8 | 8 | case e: ExchangeTransaction => | |
9 | 9 | e.sellOrder.assetPair.amountAsset | |
10 | 10 | case t: TransferTransaction => | |
11 | 11 | t.assetId | |
12 | 12 | case _ => | |
13 | 13 | throw() | |
14 | 14 | } | |
15 | 15 | let assetIdString = toBase58String(extract(assetId)) | |
16 | 16 | let whitelistPK = extract(getString(adminAddress, assetIdString)) | |
17 | 17 | let whitelistAddress = extract(addressFromPublicKey(fromBase58String(whitelistPK))) | |
18 | 18 | let senderAddress = match allow { | |
19 | 19 | case e: ExchangeTransaction => | |
20 | 20 | e.sellOrder.sender | |
21 | 21 | case t: TransferTransaction => | |
22 | 22 | t.sender | |
23 | 23 | case _ => | |
24 | 24 | throw() | |
25 | 25 | } | |
26 | 26 | let recipientAddress = match allow { | |
27 | 27 | case t: TransferTransaction => | |
28 | 28 | addressFromRecipient(t.recipient) | |
29 | 29 | case _ => | |
30 | 30 | throw() | |
31 | 31 | } | |
32 | - | let senderAccepted = | |
33 | - | let recipientAccepted = | |
32 | + | let senderAccepted = extract(getBoolean(whitelistAddress, toBase58String(senderAddress.bytes))) | |
33 | + | let recipientAccepted = extract(getBoolean(whitelistAddress, toBase58String(recipientAddress.bytes))) | |
34 | 34 | match allow { | |
35 | 35 | case e: ExchangeTransaction => | |
36 | 36 | senderAccepted | |
37 | 37 | case t: TransferTransaction => | |
38 | 38 | if (senderAccepted) | |
39 | 39 | then recipientAccepted | |
40 | 40 | else false | |
41 | 41 | case _ => | |
42 | 42 | throw() | |
43 | 43 | } | |
44 | 44 | case _ => | |
45 | 45 | true | |
46 | 46 | } |
github/deemru/w8io/026f985 42.02 ms ◑