tx · 8XwRLZgthwkLrG5zoXXseC3S3jVc2h6FpVCNrXsJL7zC
3MsbhuESLvMyybjDBGRhLHZX9p2rq1dBen7: -0.20000000 Waves
2019.03.15 02:00 [536436] smart account 3MsbhuESLvMyybjDBGRhLHZX9p2rq1dBen7 > SELF 0.00000000 Waves
{
"type": 13,
"id": "8XwRLZgthwkLrG5zoXXseC3S3jVc2h6FpVCNrXsJL7zC",
"fee": 20000000,
"feeAssetId": null,
"timestamp": 1552604468904,
"version": 1,
"sender": "3MsbhuESLvMyybjDBGRhLHZX9p2rq1dBen7",
"senderPublicKey": "6BPy1V7mRGY8ZTvgJ3Dj7N6DhDf3dmgxRoePoSUuYvQw",
"proofs": [
"27VMi8KtwsBs2aCo3k63XZr3rpDud8345REeUqB6M4BpSj8w1JCC18DZUZPNkKWtcu2qXku75uMQRVZzQrsAZ9po"
],
"script": "base64:AQQAAAANV2hpdGVsaXN0QWRkcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM043VG1QRkUxUVJLRXRLTkJjUXZQaUhxR2R2bTdSS2E2VjkEAAAACnZhbGlkU3RhdGUAAAAAAAAAA+gEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAJAAACAAAAAQIAAAAfSXQncyBub3QgYWxsb3dlZCB0byBjaGFuZ2UgVFNBUwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwBwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAACXVzZXJTdGF0ZQkABBoAAAACCQEAAAAHZXh0cmFjdAAAAAEFAAAADVdoaXRlbGlzdEFkZHIJAAJYAAAAAQgIBQAAAAJ0eAAAAAZzZW5kZXIAAAAFYnl0ZXMDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABBQAAAAl1c2VyU3RhdGUJAAACAAAAAQIAAAAYQWRkcmVzcyBub3QgaW4gd2hpdGVsaXN0AwkBAAAAAiE9AAAAAgUAAAAJdXNlclN0YXRlBQAAAAp2YWxpZFN0YXRlCQAAAgAAAAECAAAAD05vdCB2YWxpZCBzdGF0ZQMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAJ0eAAAAAdhc3NldElkBAAAAANrZXkJAAEsAAAAAgkAAlgAAAABCAgFAAAAAnR4AAAABnNlbmRlcgAAAAVieXRlcwIAAAAGX1dBVkVTBAAAAAltaW5BbW91bnQJAAQaAAAAAgkBAAAAB2V4dHJhY3QAAAABBQAAAA1XaGl0ZWxpc3RBZGRyBQAAAANrZXkDCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAAJbWluQW1vdW50BAAAAApjdXJCYWxhbmNlCQEAAAAMd2F2ZXNCYWxhbmNlAAAAAQkBAAAAB2V4dHJhY3QAAAABCAUAAAACdHgAAAAGc2VuZGVyAwkAAGYAAAACCQEAAAAHZXh0cmFjdAAAAAEFAAAACW1pbkFtb3VudAkAAGUAAAACBQAAAApjdXJCYWxhbmNlCAUAAAACdHgAAAAGYW1vdW50CQAAAgAAAAECAAAAFlRyYW5zZmVyIGlzIHByb2hpYml0ZWQGBgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V566x0fg==",
"chainId": 84,
"height": 536436,
"spentComplexity": 0
}
View: original | compacted
Prev: 4b5TNbgNSPkjDxx34DyT5Q8pyLiEmUGfh3wWbdRQJ95E
Next: none
Diff:
Old | New | | Differences |
---|
3 | 3 | | let WhitelistAddr = addressFromString("3N7TmPFE1QRKEtKNBcQvPiHqGdvm7RKa6V9") |
---|
4 | 4 | | let validState = 1000 |
---|
5 | 5 | | match tx { |
---|
| 6 | + | case tx: SetScriptTransaction => |
---|
| 7 | + | throw("It's not allowed to change TSAS") |
---|
6 | 8 | | case tx: MassTransferTransaction => |
---|
7 | 9 | | false |
---|
8 | 10 | | case tx: TransferTransaction => |
---|
|
13 | 15 | | then throw("Not valid state") |
---|
14 | 16 | | else if (!(isDefined(tx.assetId))) |
---|
15 | 17 | | then { |
---|
16 | | - | let senderAddress = extract(tx.sender) |
---|
17 | | - | let key = (toBase58String(senderAddress.bytes) + toBase58String(toBytes("_WAVES"))) |
---|
| 18 | + | let key = (toBase58String(tx.sender.bytes) + "_WAVES") |
---|
18 | 19 | | let minAmount = getInteger(extract(WhitelistAddr), key) |
---|
19 | 20 | | if (isDefined(minAmount)) |
---|
20 | 21 | | then { |
---|
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 | | match tx { |
---|
| 6 | + | case tx: SetScriptTransaction => |
---|
| 7 | + | throw("It's not allowed to change TSAS") |
---|
6 | 8 | | case tx: MassTransferTransaction => |
---|
7 | 9 | | false |
---|
8 | 10 | | case tx: TransferTransaction => |
---|
9 | 11 | | let userState = getInteger(extract(WhitelistAddr), toBase58String(tx.sender.bytes)) |
---|
10 | 12 | | if (!(isDefined(userState))) |
---|
11 | 13 | | then throw("Address not in whitelist") |
---|
12 | 14 | | else if ((userState != validState)) |
---|
13 | 15 | | then throw("Not valid state") |
---|
14 | 16 | | else if (!(isDefined(tx.assetId))) |
---|
15 | 17 | | then { |
---|
16 | | - | let senderAddress = extract(tx.sender) |
---|
17 | | - | let key = (toBase58String(senderAddress.bytes) + toBase58String(toBytes("_WAVES"))) |
---|
| 18 | + | let key = (toBase58String(tx.sender.bytes) + "_WAVES") |
---|
18 | 19 | | let minAmount = getInteger(extract(WhitelistAddr), key) |
---|
19 | 20 | | if (isDefined(minAmount)) |
---|
20 | 21 | | then { |
---|
21 | 22 | | let curBalance = wavesBalance(extract(tx.sender)) |
---|
22 | 23 | | if ((extract(minAmount) > (curBalance - tx.amount))) |
---|
23 | 24 | | then throw("Transfer is prohibited") |
---|
24 | 25 | | else true |
---|
25 | 26 | | } |
---|
26 | 27 | | else true |
---|
27 | 28 | | } |
---|
28 | 29 | | else true |
---|
29 | 30 | | case _ => |
---|
30 | 31 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
31 | 32 | | } |
---|