tx · AyrhTCHqnx3CujdjpR2gmXnZDwmfC7bSNYHHTDR7uC4X
3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx: -1.00000000 Waves
2019.02.21 15:24 [505019] smart asset 3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx > SELF 0.00000000 WTFG
{
"type": 15,
"id": "AyrhTCHqnx3CujdjpR2gmXnZDwmfC7bSNYHHTDR7uC4X",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1550751898697,
"version": 1,
"sender": "3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx",
"senderPublicKey": "2hBxjELYxmCKQXARcQYckmzypjNkRLnL4tZSQp6XHhWg",
"proofs": [
"kRLy8CCBDVHsRkcSWCYWBbR3At5G9rqb1DB9iVjE9P9yT9J7D6rwZQ6oxMHdSgZjuk1hZ4h6sLrXryQWYSy2aJ1"
],
"assetId": "EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg",
"script": "base64:AQQAAAATbWluaW11bVdhdmVzQmFsYW5jZQAAAAAAO5rKAAQAAAAFcHJpY2UAAAAAAAX14QEEAAAACHByaWNlbWluAAAAAAAL68IBBAAAAA5hZG1pblB1YmxpY0tleQEAAAAaAVRC0PwxJhtnFV9wRfoHmO1S1kgvZLHPO40EAAAABUJUQ0lkAQAAACDNjHhb0l53Tt6xXRrPX9r5Cadfo2P618zZJflokPoKZwQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAWUFAAAAByRtYXRjaDAEAAAAF2N1cnJlbnRSZWNpcGllbnRCYWxhbmNlCQAD6wAAAAIIBQAAAAFlAAAABnNlbmRlcgUAAAAFQlRDSWQEAAAABHNlbGwJAAH0AAAAAwgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAlib2R5Qnl0ZXMJAAGRAAAAAggIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAZwcm9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GNhbiB0cmFuc2ZlciB0aGlzIHRva2VuL4EK4w==",
"chainId": 84,
"height": 505019,
"spentComplexity": 0
}
View: original | compacted
Prev: FxYrr1u17yDvTf8kFNeYYqbuwtZfz4PebWRtsw8kC6cr
Next: ApFKAEp4h93gvTQBC5XH38be48KzwmpkKH74Hb28WxqZ
Diff:
Old | New | | Differences |
---|
4 | 4 | | let price = 100000001 |
---|
5 | 5 | | let pricemin = 200000001 |
---|
6 | 6 | | let adminPublicKey = base58'3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx' |
---|
| 7 | + | let BTCId = base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg' |
---|
7 | 8 | | match tx { |
---|
8 | 9 | | case e: ExchangeTransaction => |
---|
9 | | - | let balance = assetBalance(addressFromPublicKey(e.senderPublicKey), base58'') |
---|
| 10 | + | let currentRecipientBalance = assetBalance(e.sender, BTCId) |
---|
10 | 11 | | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
11 | 12 | | if (sell) |
---|
12 | 13 | | then { |
---|
13 | 14 | | let permit = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], adminPublicKey) |
---|
14 | 15 | | if ((price > e.sellOrder.price)) |
---|
15 | 16 | | then throw("you cannot sell for less than 1.00000001") |
---|
16 | | - | else if ((minimumWavesBalance > balance)) |
---|
| 17 | + | else if ((minimumWavesBalance > currentRecipientBalance)) |
---|
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 minimumWavesBalance = 1000000000 |
---|
4 | 4 | | let price = 100000001 |
---|
5 | 5 | | let pricemin = 200000001 |
---|
6 | 6 | | let adminPublicKey = base58'3Mv1Nj83z4ZQjraVppPBuXGL9csBM4DRqQx' |
---|
| 7 | + | let BTCId = base58'EqNp1hxse9c13P9cqxCxvGagkAAENhJy8P615U5rwUbg' |
---|
7 | 8 | | match tx { |
---|
8 | 9 | | case e: ExchangeTransaction => |
---|
9 | | - | let balance = assetBalance(addressFromPublicKey(e.senderPublicKey), base58'') |
---|
| 10 | + | let currentRecipientBalance = assetBalance(e.sender, BTCId) |
---|
10 | 11 | | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
11 | 12 | | if (sell) |
---|
12 | 13 | | then { |
---|
13 | 14 | | let permit = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], adminPublicKey) |
---|
14 | 15 | | if ((price > e.sellOrder.price)) |
---|
15 | 16 | | then throw("you cannot sell for less than 1.00000001") |
---|
16 | | - | else if ((minimumWavesBalance > balance)) |
---|
| 17 | + | else if ((minimumWavesBalance > currentRecipientBalance)) |
---|
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 | | } |
---|