tx · 2w111uPCKJdnF5f9DxUGwdCuNFLJfZHG2EpwYSqVHRaL 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF: -1.00000000 Waves 2020.04.23 11:09 [966858] smart asset 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF > SELF 0 Goldmine6
{ "type": 15, "id": "2w111uPCKJdnF5f9DxUGwdCuNFLJfZHG2EpwYSqVHRaL", "fee": 100000000, "feeAssetId": null, "timestamp": 1587629364664, "version": 1, "sender": "3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF", "senderPublicKey": "B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk", "proofs": [ "pW1Yr3V9gBYVmaGjhaKfPedzAzKQ2DLqg8fNzGPbRDBHsnWid4cyjkEcV62hcQ942JGnLadsbsa5KPCGWdcxrCT" ], "assetId": "7xFACXkXqa1tXkHN5vAW5rQeWPXXK4PvzEEBwMAQJGnW", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNONUVyeVgzVHVjYndVcG5qcnlaQjNXTGczWURUY0M5QmJGBAAAAAdhZG1pblBLAQAAACCWxInPooVRwW18ClwwY9JNxtS2OLXlmutl3BPUc/L3GwQAAAAKc2VsbEFtb3VudAAAAAAAAAAnEAQAAAAJc2VsbFByaWNlCQAAaAAAAAIAAAAAAAAAJxAAAAAAAAX14QAEAAAACGJ1eVByaWNlCQAAaAAAAAIAAAAAAAAAIygAAAAAAAX14QAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwCQAAAAAAAAIIBQAAAAJ0eAAAAAZzZW5kZXIFAAAAC2RBcHBBZGRyZXNzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbW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3JkZXIAAAAGc2VuZGVyCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAAAdhZG1pblBLAwUAAAAFYWRtaW4GAwkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAApwcmljZUFzc2V0CQAAAgAAAAECAAAAE09ubHkgd2F2ZXMgYWNjZXB0ZWQDBQAAAARzZWxsAwkAAGYAAAACBQAAAApzZWxsQW1vdW50CAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABmFtb3VudAkAAAIAAAABCQABLAAAAAICAAAAKFNlbGwgYW1vdW50IG11c3QgYmUgZ3JlYXRlciBvciBlcXVhbCB0byAJAAGkAAAAAQkAAGkAAAACBQAAAApzZWxsQW1vdW50AAAAAAAF9eEAAwkAAGcAAAACBQAAAAlzZWxsUHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAIFNlbGwgcHJpY2UgbXVzdCBiZSBncmVhdGVyIHRoYW4gCQABpAAAAAEFAAAACXNlbGxQcmljZQIAAAAJIHdhdmVsZXRzBgMFAAAAA2J1eQMJAABnAAAAAgUAAAAIYnV5UHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAH0J1eSBwcmljZSBtdXN0IGJlIGdyZWF0ZXIgdGhlbiAJAAGkAAAAAQUAAAAIYnV5UHJpY2UCAAAACSB3YXZlbGV0cwYJAAACAAAAAQIAAAAWc29tZXRoaW5nIGJhZCBoYXBwZW5lZAf7FzM4", "chainId": 84, "height": 966858, "spentComplexity": 0 } View: original | compacted Prev: 2V7C5zhQS14FwU2rAnCRXJiW4RT2T7iVJzQxFUttiNPb Next: 9gFK4HEvcBKC7pEue1vB3YfvgX7NmhLLXquyBupwubMa Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | let dAppAddress = addressFromString("3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF") | |
4 | 4 | let adminPK = base58'B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk' | |
5 | 5 | let sellAmount = 10000 | |
6 | - | let sellPrice = (10000 | |
7 | - | let buyPrice = (9000 | |
6 | + | let sellPrice = (10000 * 100000000) | |
7 | + | let buyPrice = (9000 * 100000000) | |
8 | 8 | match tx { | |
9 | 9 | case tx: BurnTransaction => | |
10 | 10 | (tx.sender == dAppAddress) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let dAppAddress = addressFromString("3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF") | |
4 | 4 | let adminPK = base58'B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk' | |
5 | 5 | let sellAmount = 10000 | |
6 | - | let sellPrice = (10000 | |
7 | - | let buyPrice = (9000 | |
6 | + | let sellPrice = (10000 * 100000000) | |
7 | + | let buyPrice = (9000 * 100000000) | |
8 | 8 | match tx { | |
9 | 9 | case tx: BurnTransaction => | |
10 | 10 | (tx.sender == dAppAddress) | |
11 | 11 | case tx: ReissueTransaction => | |
12 | 12 | (tx.sender == dAppAddress) | |
13 | 13 | case tx: SetAssetScriptTransaction => | |
14 | 14 | (tx.sender == dAppAddress) | |
15 | 15 | case tx: MassTransferTransaction => | |
16 | 16 | (tx.sender == dAppAddress) | |
17 | 17 | case tx: TransferTransaction => | |
18 | 18 | (tx.sender == dAppAddress) | |
19 | 19 | case e: ExchangeTransaction => | |
20 | 20 | let sender = e.sellOrder.sender | |
21 | 21 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
22 | 22 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
23 | 23 | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
24 | 24 | if (admin) | |
25 | 25 | then true | |
26 | 26 | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
27 | 27 | then throw("Only waves accepted") | |
28 | 28 | else if (sell) | |
29 | 29 | then if ((sellAmount > e.sellOrder.amount)) | |
30 | 30 | then throw(("Sell amount must be greater or equal to " + toString((sellAmount / 100000000)))) | |
31 | 31 | else if ((sellPrice >= e.sellOrder.price)) | |
32 | 32 | then throw((("Sell price must be greater than " + toString(sellPrice)) + " wavelets")) | |
33 | 33 | else true | |
34 | 34 | else if (buy) | |
35 | 35 | then if ((buyPrice >= e.sellOrder.price)) | |
36 | 36 | then throw((("Buy price must be greater then " + toString(buyPrice)) + " wavelets")) | |
37 | 37 | else true | |
38 | 38 | else throw("something bad happened") | |
39 | 39 | case _ => | |
40 | 40 | false | |
41 | 41 | } |
github/deemru/w8io/026f985 30.03 ms ◑