tx · 3LWrx8X1dSLvQjn2LJooqVTapuK7hguLdAfCUECWXrYh

3PDN2aDShCiE81GT5UxMuaFpgghQUXPD1si:  -0.01400000 Waves

2019.11.18 13:22 [1800725] smart account 3PDN2aDShCiE81GT5UxMuaFpgghQUXPD1si > SELF 0.00000000 Waves

{ "type": 13, "id": "3LWrx8X1dSLvQjn2LJooqVTapuK7hguLdAfCUECWXrYh", "fee": 1400000, "feeAssetId": null, "timestamp": 1574072586334, "version": 1, "sender": "3PDN2aDShCiE81GT5UxMuaFpgghQUXPD1si", "senderPublicKey": "DECZSwSg2JmQFnrPt6Dm38pn4fzmTyfv1D7kduMvU3F3", "proofs": [ "3BRBhyKCJmc8SfErTWCmEyL5e1Tzy6iYbPqNfhPxBVGVvhp7igPtxTUfxes1VkSd7u45NsozQneDa8epiDDq6XoT", "5xCUjuLTvjVEFeTxNfHW15WndLtYQt2wLV1W35X7MZR1BJ4n1x723GTSvxneWtedGzmZzqsS7xmifjAyHMxQtZHg" ], "script": "base64:AwQAAAAHYXNzZXRJZAEAAAAgiEW64ARXw/t+nKroLmO/NjYfHGv7F0WhqaxPCaX+jWkEAAAAEHdoaXRlTGlzdEFkZHJlc3MCAAAAIzNQRXZ0UnhQSnl5cHM3Y0tSa0xiS0ZBUThxYmRjenBMa0I5BAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAMJAQAAAAIhPQAAAAIIBQAAAAF0AAAAB2Fzc2V0SWQFAAAAB2Fzc2V0SWQJAAH0AAAAAwgFAAAAAXQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAF0AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAXQAAAAPc2VuZGVyUHVibGljS2V5BAAAABByZWNpcGllbnRBZGRyZXNzCQAEJQAAAAEJAAQkAAAAAQgFAAAAAXQAAAAJcmVjaXBpZW50BAAAABV3a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AAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAUYXNzZXRJc3N1ZXJQdWJsaWNLZXkHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24EAAAAAWIFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAABaQUAAAAHJG1hdGNoMAMJAAAAAAAAAgkABCUAAAABCQAEJAAAAAEIBQAAAAFpAAAABGRBcHAFAAAAEHdoaXRlTGlzdEFkZHJlc3MJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BwkAAAIAAAABAgAAABRCYWQgdHJhbnNhY3Rpb24gdHlwZblXtcU=", "chainId": 87, "height": 1800725, "spentComplexity": 0 } View: original | compacted Prev: D9ahwyzvqqYmU2LKp6gHyt1KSc3DriJRPMBrqcSaFiGJ Next: 9W5LvwrGSMJt3ZAjvEJQn3Cu4aSbDyemVCmGpFMV9DH7 Diff:
OldNewDifferences
88 then sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
99 else {
1010 let recipientAddress = toString(addressFromRecipient(t.recipient))
11- let addressIsAllowed = getBoolean(addressFromStringValue(whiteListAddress), recipientAddress)
12- match addressIsAllowed {
11+ let whiteListAddressValue = addressFromStringValue(whiteListAddress)
12+ let addressIsAllowed = getBoolean(whiteListAddressValue, recipientAddress)
13+ let addressInWhiteList = match addressIsAllowed {
1314 case b: Boolean =>
1415 (b == true)
1516 case _ =>
16- throw("You can send this token only to white-listed addresses")
17+ false
1718 }
19+ if (if (addressInWhiteList)
20+ then true
21+ else (recipientAddress == whiteListAddress))
22+ then if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
23+ then true
24+ else throw("Signature is required")
25+ else throw("You can send this token only to white-listed addresses")
1826 }
1927 case s: SetScriptTransaction =>
2028 let assetIssuerPublicKey = extract(assetInfo(assetId)).issuerPublicKey
2129 if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
2230 then sigVerify(tx.bodyBytes, tx.proofs[1], assetIssuerPublicKey)
2331 else false
32+ case b: BurnTransaction =>
33+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2434 case i: InvokeScriptTransaction =>
2535 if ((toString(addressFromRecipient(i.dApp)) == whiteListAddress))
2636 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let assetId = base58'AAx7kicknEXkWUqSF1DKXp7bQHH6Z383Bw9H5v16MgFJ'
44 let whiteListAddress = "3PEvtRxPJyyps7cKRkLbKFAQ8qbdczpLkB9"
55 match tx {
66 case t: TransferTransaction =>
77 if ((t.assetId != assetId))
88 then sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
99 else {
1010 let recipientAddress = toString(addressFromRecipient(t.recipient))
11- let addressIsAllowed = getBoolean(addressFromStringValue(whiteListAddress), recipientAddress)
12- match addressIsAllowed {
11+ let whiteListAddressValue = addressFromStringValue(whiteListAddress)
12+ let addressIsAllowed = getBoolean(whiteListAddressValue, recipientAddress)
13+ let addressInWhiteList = match addressIsAllowed {
1314 case b: Boolean =>
1415 (b == true)
1516 case _ =>
16- throw("You can send this token only to white-listed addresses")
17+ false
1718 }
19+ if (if (addressInWhiteList)
20+ then true
21+ else (recipientAddress == whiteListAddress))
22+ then if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
23+ then true
24+ else throw("Signature is required")
25+ else throw("You can send this token only to white-listed addresses")
1826 }
1927 case s: SetScriptTransaction =>
2028 let assetIssuerPublicKey = extract(assetInfo(assetId)).issuerPublicKey
2129 if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
2230 then sigVerify(tx.bodyBytes, tx.proofs[1], assetIssuerPublicKey)
2331 else false
32+ case b: BurnTransaction =>
33+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2434 case i: InvokeScriptTransaction =>
2535 if ((toString(addressFromRecipient(i.dApp)) == whiteListAddress))
2636 then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2737 else false
2838 case _ =>
2939 throw("Bad transaction type")
3040 }

github/deemru/w8io/fabc49c 
99.26 ms