tx · J72w5kDP7DzZfYgftP3EbZN2HpNNvcNEiVeHbjHtapvw

3MuTTNitiCXtwNMFnExx77b8xiTBFVYyMVB:  -1.00000000 Waves

2019.02.08 21:54 [486496] smart asset 3MuTTNitiCXtwNMFnExx77b8xiTBFVYyMVB > SELF 0.00000000 test

{ "type": 15, "id": "J72w5kDP7DzZfYgftP3EbZN2HpNNvcNEiVeHbjHtapvw", "fee": 100000000, "feeAssetId": null, "timestamp": 1549652149185, "version": 1, "sender": "3MuTTNitiCXtwNMFnExx77b8xiTBFVYyMVB", "senderPublicKey": "AjiJTAnh1zMMUTHYCyrN4XzdpDb9YtU5xe8hD1Su7vSV", "proofs": [ "5D3n9oAWraXYg4KWgCJiHuh7UHkdaoBJwZVydnWifPrbG2HLa4sqjks4MEDcLRJrKJg9CX1ctFxqFw69DUeGZ6Tf" ], "assetId": "81bYhTjXoXFeDkYUiDxaYnX1tk38W69Jr3KgtCAK5WZT", "script": "base64:AQQAAAAOYWRtaW5QdWJsaWNLZXkBAAAAIJCqRn76vzIaLRPZfQ76udpC5ZaY6zUPmJGk4a239ScKBAAAAAxhZG1pbkFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAADmFkbWluUHVibGljS2V5BAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAABWFsbG93BQAAAAckbWF0Y2gwBAAAAAdhc3NldElkBAAAAAckbWF0Y2gxBQAAAAVhbGxvdwMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMQgICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0AwkAAAEAAAACBQAA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AAgUAAAAQd2hpdGVsaXN0QWRkcmVzcwkAAlgAAAABCAUAAAAQcmVjaXBpZW50QWRkcmVzcwAAAAVieXRlcwQAAAAHJG1hdGNoMQUAAAAFYWxsb3cDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAWUFAAAAByRtYXRjaDEDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABBQAAAA5zZW5kZXJBY2NlcHRlZAkBAAAABXRocm93AAAAAAkBAAAAB2V4dHJhY3QAAAABBQAAAA5zZW5kZXJBY2NlcHRlZAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMQMDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABBQAAAA5zZW5kZXJBY2NlcHRlZAYJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEFAAAAEXJlY2lwaWVudEFjY2VwdGVkCQEAAAAFdGhyb3cAAAAAAwkBAAAAB2V4dHJhY3QAAAABBQAAAA5zZW5kZXJBY2NlcHRlZAkBAAAAB2V4dHJhY3QAAAABBQAAABFyZWNpcGllbnRBY2NlcHRlZAcJAQAAAAV0aHJvdwAAAAAGEP2BDQ==", "chainId": 84, "height": 486496, "spentComplexity": 0 } View: original | compacted Prev: 998XomAJxVp3nzJF6mFc8xpg6xqQeF64cRL6C1ttHhEJ Next: none Diff:
OldNewDifferences
2929 case _ =>
3030 throw()
3131 }
32- let senderAccepted = extract(getBoolean(whitelistAddress, toBase58String(senderAddress.bytes)))
33- let recipientAccepted = extract(getBoolean(whitelistAddress, toBase58String(recipientAddress.bytes)))
32+ let senderAccepted = getBoolean(whitelistAddress, toBase58String(senderAddress.bytes))
33+ let recipientAccepted = getBoolean(whitelistAddress, toBase58String(recipientAddress.bytes))
3434 match allow {
3535 case e: ExchangeTransaction =>
36- senderAccepted
36+ if (!(isDefined(senderAccepted)))
37+ then throw()
38+ else extract(senderAccepted)
3739 case t: TransferTransaction =>
38- if (senderAccepted)
39- then recipientAccepted
40- else false
40+ if (if (!(isDefined(senderAccepted)))
41+ then true
42+ else !(isDefined(recipientAccepted)))
43+ then throw()
44+ else if (extract(senderAccepted))
45+ then extract(recipientAccepted)
46+ else false
4147 case _ =>
4248 throw()
4349 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let adminPublicKey = base58'AjiJTAnh1zMMUTHYCyrN4XzdpDb9YtU5xe8hD1Su7vSV'
44 let adminAddress = addressFromPublicKey(adminPublicKey)
55 match tx {
66 case allow: TransferTransaction|ExchangeTransaction =>
77 let assetId = match allow {
88 case e: ExchangeTransaction =>
99 e.sellOrder.assetPair.amountAsset
1010 case t: TransferTransaction =>
1111 t.assetId
1212 case _ =>
1313 throw()
1414 }
1515 let assetIdString = toBase58String(extract(assetId))
1616 let whitelistPK = extract(getString(adminAddress, assetIdString))
1717 let whitelistAddress = extract(addressFromPublicKey(fromBase58String(whitelistPK)))
1818 let senderAddress = match allow {
1919 case e: ExchangeTransaction =>
2020 e.sellOrder.sender
2121 case t: TransferTransaction =>
2222 t.sender
2323 case _ =>
2424 throw()
2525 }
2626 let recipientAddress = match allow {
2727 case t: TransferTransaction =>
2828 addressFromRecipient(t.recipient)
2929 case _ =>
3030 throw()
3131 }
32- let senderAccepted = extract(getBoolean(whitelistAddress, toBase58String(senderAddress.bytes)))
33- let recipientAccepted = extract(getBoolean(whitelistAddress, toBase58String(recipientAddress.bytes)))
32+ let senderAccepted = getBoolean(whitelistAddress, toBase58String(senderAddress.bytes))
33+ let recipientAccepted = getBoolean(whitelistAddress, toBase58String(recipientAddress.bytes))
3434 match allow {
3535 case e: ExchangeTransaction =>
36- senderAccepted
36+ if (!(isDefined(senderAccepted)))
37+ then throw()
38+ else extract(senderAccepted)
3739 case t: TransferTransaction =>
38- if (senderAccepted)
39- then recipientAccepted
40- else false
40+ if (if (!(isDefined(senderAccepted)))
41+ then true
42+ else !(isDefined(recipientAccepted)))
43+ then throw()
44+ else if (extract(senderAccepted))
45+ then extract(recipientAccepted)
46+ else false
4147 case _ =>
4248 throw()
4349 }
4450 case _ =>
4551 true
4652 }

github/deemru/w8io/026f985 
22.28 ms