tx · 9pidJ2dTsKgatfk11wZ2PkxZervg3SzKVcNdtMFAPdS4
3N4Lt6bWndH4yUAkTFge3F93yhT2c2Pmj9z: -1.00000000 Waves
2019.07.08 16:49 [576714] smart asset 3N4Lt6bWndH4yUAkTFge3F93yhT2c2Pmj9z > SELF 0.00000000 KYC1
{
"type": 15,
"id": "9pidJ2dTsKgatfk11wZ2PkxZervg3SzKVcNdtMFAPdS4",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1562593706034,
"version": 1,
"sender": "3N4Lt6bWndH4yUAkTFge3F93yhT2c2Pmj9z",
"senderPublicKey": "HzSnoJKTVwezUBmo2gh9HYq52F1maKBsvv1ZWrZAHyHV",
"proofs": [
"5T5DZZCtFyZyL6JtDbHXAs71Cg5cPpdj3YakoPGqjbmePJBNEZptfBM4uA555TAaretNvbcwpCgfPQsYf7DfJGXR"
],
"assetId": "3MznhTvkssYjnNyXC8dx5vHeYvUDRJpcfsYhAWfZt11w",
"script": "base64:AwQAAAADS1lDCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU1jQgya/wHVSfx3QaL4bt+6D7mCj3PD1TBAAAAAtQYXNzQXNzZXRJZAEAAAAgIxhUvRrV9qlGyG2iRSgmyaw7t0LEn3vpFkF1WJh1d64KAQAAAA5jaGVja1doaXRlbGlzdAAAAAEAAAAHYWRkcmVzcwQAAAASYWRkcmVzc0luV2hpdGVsaXN0CQAEGwAAAAIFAAAAA0tZQwkAAlgAAAABCAUAAAAHYWRkcmVzcwAAAAVieXRlcwMJAQAAAAlpc0RlZmluZWQAAAABBQAAABJhZGRyZXNzSW5XaGl0ZWxpc3QJAQAAAAdleHRyYWN0AAAAAQUAAAASYWRkcmVzc0luV2hpdGVsaXN0BwQAAAAHJG1hdGNoMAUAAAACdHgDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXMFAAAAByRtYXRjaDAGAwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAQAAAA5jaGVja1doaXRlbGlzdAAAAAEIBQAAAAF0AAAABnNlbmRlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMAQAAAALYW1vdW50QXNzZXQICAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAAthbW91bnRBc3NldAQAAAAKcHJpY2VBc3NldAgICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQDCQAAAAAAAAIICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAGc2VuZGVyCAgFAAAAAWUAAAAIYnV5T3JkZXIAAAAGc2VuZGVyBgMJAAAAAAAAAgUAAAALYW1vdW50QXNzZXQFAAAAC1Bhc3NBc3NldElkCQEAAAAOY2hlY2tXaGl0ZWxpc3QAAAABCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABnNlbmRlcgYHI08JIg==",
"chainId": 84,
"height": 576714,
"spentComplexity": 0
}
View: original | compacted
Prev: 4e3iFx1bYfGuo956kRsVDoputwLNYJqPWYLYuS3dT4kD
Next: none
Diff:
Old | New | | Differences |
---|
17 | 17 | | case e: ExchangeTransaction => |
---|
18 | 18 | | let amountAsset = e.sellOrder.assetPair.amountAsset |
---|
19 | 19 | | let priceAsset = e.sellOrder.assetPair.priceAsset |
---|
20 | | - | if ((amountAsset == PassAssetId)) |
---|
21 | | - | then checkWhitelist(e.sellOrder.sender) |
---|
22 | | - | else true |
---|
| 20 | + | if ((e.sellOrder.sender == e.buyOrder.sender)) |
---|
| 21 | + | then true |
---|
| 22 | + | else if ((amountAsset == PassAssetId)) |
---|
| 23 | + | then checkWhitelist(e.sellOrder.sender) |
---|
| 24 | + | else true |
---|
23 | 25 | | case _ => |
---|
24 | 26 | | false |
---|
25 | 27 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let KYC = Address(base58'3N9Sgptqbbc9whta6iLeeQENfHd833G9hQE') |
---|
4 | 4 | | let PassAssetId = base58'3MznhTvkssYjnNyXC8dx5vHeYvUDRJpcfsYhAWfZt11w' |
---|
5 | 5 | | func checkWhitelist (address) = { |
---|
6 | 6 | | let addressInWhitelist = getBoolean(KYC, toBase58String(address.bytes)) |
---|
7 | 7 | | if (isDefined(addressInWhitelist)) |
---|
8 | 8 | | then extract(addressInWhitelist) |
---|
9 | 9 | | else false |
---|
10 | 10 | | } |
---|
11 | 11 | | |
---|
12 | 12 | | match tx { |
---|
13 | 13 | | case s: ReissueTransaction|SetAssetScriptTransaction => |
---|
14 | 14 | | true |
---|
15 | 15 | | case t: TransferTransaction|MassTransferTransaction => |
---|
16 | 16 | | checkWhitelist(t.sender) |
---|
17 | 17 | | case e: ExchangeTransaction => |
---|
18 | 18 | | let amountAsset = e.sellOrder.assetPair.amountAsset |
---|
19 | 19 | | let priceAsset = e.sellOrder.assetPair.priceAsset |
---|
20 | | - | if ((amountAsset == PassAssetId)) |
---|
21 | | - | then checkWhitelist(e.sellOrder.sender) |
---|
22 | | - | else true |
---|
| 20 | + | if ((e.sellOrder.sender == e.buyOrder.sender)) |
---|
| 21 | + | then true |
---|
| 22 | + | else if ((amountAsset == PassAssetId)) |
---|
| 23 | + | then checkWhitelist(e.sellOrder.sender) |
---|
| 24 | + | else true |
---|
23 | 25 | | case _ => |
---|
24 | 26 | | false |
---|
25 | 27 | | } |
---|