tx · CG2TqGQzFfcu147Pp4qV2K3eHVUBKn6urjzR1j51aub1
3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx: -1.00000000 Waves
2019.02.21 15:04 [504999] smart asset 3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx > SELF 0.00000000 WTFG
{
"type": 15,
"id": "CG2TqGQzFfcu147Pp4qV2K3eHVUBKn6urjzR1j51aub1",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1550750643793,
"version": 1,
"sender": "3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx",
"senderPublicKey": "2hBxjELYxmCKQXARcQYckmzypjNkRLnL4tZSQp6XHhWg",
"proofs": [
"5ZRhphU6vJR2P6cFCm41vbWKeMf4HPkPAecmnZWRD1VmjqypaJa4kKf34y3YJveuN2GZsqon42XRR4nGrDSLtMgN"
],
"assetId": "EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg",
"script": "base64:AQQAAAAFcHJpY2UAAAAAAAX14QEEAAAACHByaWNlbWluAAAAAAAL68IBBAAAAARQYWlyCQEAAAAJQXNzZXRQYWlyAAAAAgUAAAAEdW5pdAEAAAAgzYx4W9Jed07esV0az1/a+QmnX6Nj+tfM2SX5aJD6CmcEAAAADmFkbWluUHVibGljS2V5AQAAABoBVELQ/DEmG2cVX3BF+geY7VLWSC9ksc87jQQAAAAFQlRDSWQBAAAAIM2MeFvSXndO3rFdGs9f2vkJp1+jY/rXzNkl+WiQ+gpnBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMAQAAAAEc2VsbAkAAfQAAAADCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWJvZHlCeXRlcwkAAZEAAAACCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAFlAAAACXNlbGxPcmR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cGUJAAACAAAAAQIAAAAgWW91IG9ubHkgY2FuIHRyYW5zZmVyIHRoaXMgdG9rZW4ICo4D",
"chainId": 84,
"height": 504999,
"spentComplexity": 0
}
View: original | compacted
Prev: JBUoJ1fzVc2et5CyxfDSkb1rVYU3qct63bbRZWfNN7BP
Next: CVAPLDCJkyPVbJxjTmwdqLyFVeFL4eSSZjv83vBJQdJo
Diff:
Old | New | | Differences |
---|
11 | 11 | | if (sell) |
---|
12 | 12 | | then { |
---|
13 | 13 | | let permit = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], adminPublicKey) |
---|
| 14 | + | let balance = assetBalance(addressFromPublicKey(tx.senderPublicKey), base58'WTFG') |
---|
14 | 15 | | if ((price > e.sellOrder.price)) |
---|
15 | 16 | | then throw("you cannot sell for less than 1.00000001") |
---|
16 | | - | else if ((10 >= assetBalance(addressFromPublicKey(e.senderPublicKey), base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg'))) |
---|
| 17 | + | else if ((10 > balance)) |
---|
17 | 18 | | then throw("you can sell only have at least 10 tokens") |
---|
18 | 19 | | else true |
---|
19 | 20 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 1 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let price = 100000001 |
---|
4 | 4 | | let pricemin = 200000001 |
---|
5 | 5 | | let Pair = AssetPair(unit, base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg') |
---|
6 | 6 | | let adminPublicKey = base58'3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx' |
---|
7 | 7 | | let BTCId = base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg' |
---|
8 | 8 | | match tx { |
---|
9 | 9 | | case e: ExchangeTransaction => |
---|
10 | 10 | | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
11 | 11 | | if (sell) |
---|
12 | 12 | | then { |
---|
13 | 13 | | let permit = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], adminPublicKey) |
---|
| 14 | + | let balance = assetBalance(addressFromPublicKey(tx.senderPublicKey), base58'WTFG') |
---|
14 | 15 | | if ((price > e.sellOrder.price)) |
---|
15 | 16 | | then throw("you cannot sell for less than 1.00000001") |
---|
16 | | - | else if ((10 >= assetBalance(addressFromPublicKey(e.senderPublicKey), base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg'))) |
---|
| 17 | + | else if ((10 > balance)) |
---|
17 | 18 | | then throw("you can sell only have at least 10 tokens") |
---|
18 | 19 | | else true |
---|
19 | 20 | | } |
---|
20 | 21 | | else true |
---|
21 | 22 | | case mass: SetAssetScriptTransaction|MassTransferTransaction => |
---|
22 | 23 | | let transaction = transactionById(extract(mass.assetId)) |
---|
23 | 24 | | match transaction { |
---|
24 | 25 | | case issueTx: IssueTransaction => |
---|
25 | 26 | | (mass.senderPublicKey == issueTx.senderPublicKey) |
---|
26 | 27 | | case _ => |
---|
27 | 28 | | throw("Bad issue tx type") |
---|
28 | 29 | | } |
---|
29 | 30 | | case _ => |
---|
30 | 31 | | throw("You only can transfer this token") |
---|
31 | 32 | | } |
---|