tx · 4wXBBdAZCKxRNTNRo73oxrRyTzQwnM9D1kotjjEPWa9x 3NCHkdhkeBBP1gfHpckmb2yPoYJ2CH7fxPN: -0.20000000 Waves 2019.03.17 18:09 [540356] smart account 3NCHkdhkeBBP1gfHpckmb2yPoYJ2CH7fxPN > SELF 0.00000000 Waves
{ "type": 13, "id": "4wXBBdAZCKxRNTNRo73oxrRyTzQwnM9D1kotjjEPWa9x", "fee": 20000000, "feeAssetId": null, "timestamp": 1552835430461, "version": 1, "sender": "3NCHkdhkeBBP1gfHpckmb2yPoYJ2CH7fxPN", "senderPublicKey": "si2dSJdZCsTdJWYDXE6WbT5coL1B3jbUuKsBRG3hYUm", "proofs": [ "h49aYKbc4ZbNrw4DKknnfGmJXwp2w3hceHrs6GNzG8pzZ4pXBKgX4cqeMRTPqdfQQJUk3VxMW2P47wgnZtdkS6C", "5rkapRXB7TpVUMgHJwX6JXuveVBsVUShDjrTSpVmn8JfKVRrV5SXvb6aRA4h3vNQ4ZQvD8B8bKBkYytnrVWZTHGu", "44aJ9gVnFiVuDAanYvxJJkzxNf6Z9oUmLu2K5XQZsNjtFZfjJBhJTs6PxjTvd9ZEmPyUdjGSVBze1CMkSM2XYSoy" ], "script": "base64:AQQAAAANV2hpdGVsaXN0QWRkcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM043VG1QRkUxUVJLRXRLTkJjUXZQaUhxR2R2bTdSS2E2VjkEAAAACnZhbGlkU3RhdGUAAAAAAAAAA+gEAAAACnByb3RlY3RvcjABAAAAIEsrHsqTbcDh9o7MyWEe8ZnH4ZcJJ2JKvnQlgjBcVqhGBAAAAApwcm90ZWN0b3IxAQAAACDuShUap7FLVAGsh+ULX9wbwT9+COcW2u8Z2z0HsoyzJgQAAAAKcHJvdGVjdG9yMgEAAAAg8OQWBfiA7fQMx+pB8DVMLroM7Lb9BDfGnZHXbDKxF24EAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y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J0eAAAAA9zZW5kZXJQdWJsaWNLZXlEphsG", "chainId": 84, "height": 540356, "spentComplexity": 0 } View: original | compacted Prev: 87sd5wpsNoAPtiBK8v1B2mMgZCiQM1wq3vjtkqyij1kT Next: HhWEkjCGBb7T64Ykvq8RtkVSGABMZ5k6XFVu8jQwVWX4 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let WhitelistAddr = addressFromString("3N7TmPFE1QRKEtKNBcQvPiHqGdvm7RKa6V9") | |
4 | 4 | let validState = 1000 | |
5 | 5 | let protector0 = base58'64RiMxFkTamG4znZQBhi4oxs43nNrHiHdUYYwdYQhdPj' | |
6 | 6 | let protector1 = base58'H3BYxQ8MPzosmxYf3uj5ZLNDovW1XpbooD5K11K3vwkh' | |
7 | 7 | let protector2 = base58'HDLZwRd7786Tk7p7Bu4ziX7dzL24yNSkVzXctJPgPTLR' | |
8 | 8 | match tx { | |
9 | 9 | case tx: MassTransferTransaction => | |
10 | 10 | false | |
11 | 11 | case tx: TransferTransaction => | |
12 | 12 | if (!(sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))) | |
13 | 13 | then throw("Transaction must be signed by owner") | |
14 | 14 | else { | |
15 | 15 | let userState = getInteger(extract(WhitelistAddr), toBase58String(tx.sender.bytes)) | |
16 | 16 | if (!(isDefined(userState))) | |
17 | 17 | then throw("Address not in whitelist") | |
18 | 18 | else if ((userState != validState)) | |
19 | 19 | then throw("Not valid state") | |
20 | 20 | else if (!(isDefined(tx.assetId))) | |
21 | 21 | then { | |
22 | 22 | let key = (toBase58String(tx.sender.bytes) + "_WAVES") | |
23 | 23 | let minAmount = getInteger(extract(WhitelistAddr), key) | |
24 | 24 | if (isDefined(minAmount)) | |
25 | 25 | then { | |
26 | 26 | let curBalance = wavesBalance(extract(tx.sender)) | |
27 | 27 | if ((extract(minAmount) > (curBalance - tx.amount))) | |
28 | 28 | then throw("Transfer is prohibited") | |
29 | 29 | else true | |
30 | 30 | } | |
31 | 31 | else true | |
32 | 32 | } | |
33 | 33 | else true | |
34 | 34 | } | |
35 | 35 | case tx: SetScriptTransaction => | |
36 | 36 | let p0signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], protector0)) | |
37 | 37 | then 1 | |
38 | 38 | else 0 | |
39 | 39 | let p1signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], protector1)) | |
40 | 40 | then 1 | |
41 | 41 | else 0 | |
42 | 42 | let p2signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], protector2)) | |
43 | 43 | then 1 | |
44 | 44 | else 0 | |
45 | 45 | (((p0signed + p1signed) + p2signed) >= 2) | |
46 | 46 | case tx: LeaseTransaction => | |
47 | 47 | false | |
48 | 48 | case tx: SponsorFeeTransaction => | |
49 | 49 | false | |
50 | 50 | case _ => | |
51 | 51 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
52 | 52 | } |
github/deemru/w8io/169f3d6 30.10 ms ◑