tx · AY24znK5gCsbjFsvTHr3sUaynvH8PCPHRwUGsbLfvxKN 3N3MWcKUXiq9Kq6yHJPtocC6vn8GU9oRBV4: -0.01400000 Waves 2019.11.27 19:07 [783895] smart account 3N3MWcKUXiq9Kq6yHJPtocC6vn8GU9oRBV4 > SELF 0.00000000 Waves
{ "type": 13, "id": "AY24znK5gCsbjFsvTHr3sUaynvH8PCPHRwUGsbLfvxKN", "fee": 1400000, "feeAssetId": null, "timestamp": 1574871123526, "version": 1, "sender": "3N3MWcKUXiq9Kq6yHJPtocC6vn8GU9oRBV4", "senderPublicKey": "G1KQu4exzvuHhgBrCqrQXywgiZdZ2de7NcWXV787Miyw", "proofs": [ "2GuCyUvM7TmvKT5Uevim38oLDdvarcRei5csowGiaYvekDNHNovXdXUt31LCgTYL57QaB5ttikaRBdhZwbg8nvHM", "2KNG54TzfP5FqiPfcvd1iBRsmWGcxsJY4jC2NAefRjMErn8PzwbWzTybJtNNExydefy2vut58vQjiZX1FENUXWCz" ], "script": "base64:AwQAAAAHYXNzZXRJZAEAAAAgB+ix+ct2rY67Li5myqCXhbvtYU+/Ua4qRDfSO102YokEAAAAEHdoaXRlTGlzdEFkZHJlc3MCAAAAIzNOQ1NFeHRkb3hNWHc4TUVBenNYNU1RZ2E1UlF5OXAzZVVTBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAMJAQAAAAIhPQAAAAIIBQAAAAF0AAAAB2Fzc2V0SWQFAAAAB2Fzc2V0SWQJAAH0AAAAAwgFAAAAAXQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAF0AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAXQAAAAPc2VuZGVyUHVibGljS2V5BAAAABByZWNpcGllbnRBZGRyZXNzCQAEJQAAAAEJAAQkAAAAAQgFAAAAAXQAAAAJcmVjaXBpZW50BAAAABV3a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AAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAUYXNzZXRJc3N1ZXJQdWJsaWNLZXkHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24EAAAAAWIFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQAAAABaQUAAAAHJG1hdGNoMAMJAAAAAAAAAgkABCUAAAABCQAEJAAAAAEIBQAAAAFpAAAABGRBcHAFAAAAEHdoaXRlTGlzdEFkZHJlc3MJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BwkAAAIAAAABAgAAABRCYWQgdHJhbnNhY3Rpb24gdHlwZZebZfw=", "chainId": 84, "height": 783895, "spentComplexity": 0 } View: original | compacted Prev: 9eNno3mJmvdk4Qtmy4CpyxNb7CkreccUaNt4Uh819cFS Next: 3VkLaMP7hwYgyL8pN7ySdduD9kwYa2knb9CvSaytvgd9 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let assetId = base58'Xsek1E1FUWrv1pqvknTTktkbtVRRW4fuGpepYtzqpHW' | |
4 | 4 | let whiteListAddress = "3NCSExtdoxMXw8MEAzsX5MQga5RQy9p3eUS" | |
5 | 5 | match tx { | |
6 | 6 | case t: TransferTransaction => | |
7 | 7 | if ((t.assetId != assetId)) | |
8 | 8 | then sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey) | |
9 | 9 | else { | |
10 | 10 | let recipientAddress = toString(addressFromRecipient(t.recipient)) | |
11 | 11 | let whiteListAddressValue = addressFromStringValue(whiteListAddress) | |
12 | 12 | let addressIsAllowed = getBoolean(whiteListAddressValue, recipientAddress) | |
13 | 13 | let addressInWhiteList = match addressIsAllowed { | |
14 | 14 | case b: Boolean => | |
15 | 15 | (b == true) | |
16 | 16 | case _ => | |
17 | 17 | false | |
18 | 18 | } | |
19 | 19 | if (if (addressInWhiteList) | |
20 | 20 | then true | |
21 | 21 | else (recipientAddress == whiteListAddress)) | |
22 | 22 | then if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
23 | 23 | then true | |
24 | 24 | else throw("Signature is required") | |
25 | 25 | else throw("You can send this token only to white-listed addresses") | |
26 | 26 | } | |
27 | 27 | case s: SetScriptTransaction => | |
28 | 28 | let assetIssuerPublicKey = extract(assetInfo(assetId)).issuerPublicKey | |
29 | 29 | if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
30 | 30 | then sigVerify(tx.bodyBytes, tx.proofs[1], assetIssuerPublicKey) | |
31 | 31 | else false | |
32 | 32 | case b: BurnTransaction => | |
33 | 33 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
34 | 34 | case i: InvokeScriptTransaction => | |
35 | 35 | if ((toString(addressFromRecipient(i.dApp)) == whiteListAddress)) | |
36 | 36 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
37 | 37 | else false | |
38 | 38 | case _ => | |
39 | 39 | throw("Bad transaction type") | |
40 | 40 | } |
github/deemru/w8io/026f985 32.39 ms ◑