tx · DDaq8M7gkvJZPh1d3UhxodDqR3wAjpvJ4qHif4cZUnZu
3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx: -1.00000000 Waves
2019.02.21 13:57 [504936] smart asset 3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx > SELF 0.00000000 WTFG
{
"type": 15,
"id": "DDaq8M7gkvJZPh1d3UhxodDqR3wAjpvJ4qHif4cZUnZu",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1550746693225,
"version": 1,
"sender": "3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx",
"senderPublicKey": "2hBxjELYxmCKQXARcQYckmzypjNkRLnL4tZSQp6XHhWg",
"proofs": [
"5CCqTmzG3tzb2d2ve2M4NLtJK5ywbMpSbUhxCky5V9atkwABUce7USfdpjjDWKpMhVgynVjDWdoM2iJFXfsvLi1v"
],
"assetId": "EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg",
"script": "base64:AQQAAAAFcHJpY2UAAAAAAAX14QEEAAAACHByaWNlbWluAAAAAAAL68IBBAAAAARQYWlyCQEAAAAJQXNzZXRQYWlyAAAAAgUAAAAEdW5pdAEAAAAgzYx4W9Jed07esV0az1/a+QmnX6Nj+tfM2SX5aJD6CmcEAAAABUJUQ0lkAQAAACDNjHhb0l53Tt6xXRrPX9r5Cadfo2P618zZJflokPoKZwQAAAAOYWRtaW5QdWJsaWNLZXkBAAAAGgFUQtD8MSYbZxVfcEX6B5jtUtZIL2SxzzuNBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMAQAAAAEc2VsbAkAAfQAAAADCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWJvZHlCeXRlcwkAAZEAAAACCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAFlAAAACX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XNzdWUgdHggdHlwZQkAAAIAAAABAgAAACBZb3Ugb25seSBjYW4gdHJhbnNmZXIgdGhpcyB0b2tlbrKOMyQ=",
"chainId": 84,
"height": 504936,
"spentComplexity": 0
}
View: original | compacted
Prev: ADWdYsG1ee8GWT3obozJ5FDUa9jPMkGfRMzAH3TNRP6B
Next: DyGhSWaC2hojgjWg3qFXxpENH5F7rpW9kWbzeYY4BDoH
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 balnce = assetBalance(addressFromPublicKey(tx.senderPublicKey), base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg') |
---|
| 14 | + | let balnce = assetBalance(addressFromPublicKey(e.senderPublicKey), BTCId) |
---|
15 | 15 | | if ((price > e.sellOrder.price)) |
---|
16 | 16 | | then throw("you cannot sell for less than 1.00000001") |
---|
17 | | - | else if ((10 > balnce)) |
---|
| 17 | + | else if ((10 >= balnce)) |
---|
18 | 18 | | then throw("you can sell only have at least 10 tokens") |
---|
19 | 19 | | else true |
---|
20 | 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 BTCId = base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg' |
---|
7 | 7 | | let adminPublicKey = base58'3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx' |
---|
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 balnce = assetBalance(addressFromPublicKey(tx.senderPublicKey), base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg') |
---|
| 14 | + | let balnce = assetBalance(addressFromPublicKey(e.senderPublicKey), BTCId) |
---|
15 | 15 | | if ((price > e.sellOrder.price)) |
---|
16 | 16 | | then throw("you cannot sell for less than 1.00000001") |
---|
17 | | - | else if ((10 > balnce)) |
---|
| 17 | + | else if ((10 >= balnce)) |
---|
18 | 18 | | then throw("you can sell only have at least 10 tokens") |
---|
19 | 19 | | else true |
---|
20 | 20 | | } |
---|
21 | 21 | | else true |
---|
22 | 22 | | case mass: SetAssetScriptTransaction|MassTransferTransaction => |
---|
23 | 23 | | let transaction = transactionById(extract(mass.assetId)) |
---|
24 | 24 | | match transaction { |
---|
25 | 25 | | case issueTx: IssueTransaction => |
---|
26 | 26 | | (mass.senderPublicKey == issueTx.senderPublicKey) |
---|
27 | 27 | | case _ => |
---|
28 | 28 | | throw("Bad issue tx type") |
---|
29 | 29 | | } |
---|
30 | 30 | | case _ => |
---|
31 | 31 | | throw("You only can transfer this token") |
---|
32 | 32 | | } |
---|