tx · AoujyRNgyyDBWkLRG75QR87qaFMfiRWQkCxutSCugkTH 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.28 16:52 [1018355] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "AoujyRNgyyDBWkLRG75QR87qaFMfiRWQkCxutSCugkTH", "fee": 100000000, "feeAssetId": null, "timestamp": 1590673978515, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "eML5Q4GTsna3Qhj9EEqgExNmNu99W5KKjVXPG89CXV75cm94CaHJc5dpWviKrcXJE3JLbe332VfRj5qcbvcYXow" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAAFQlRDSWQBAAAAICZW18edbVw5IUDUbKCl7CbP+JI8377yHi104yBIibXVBAAAAAlzZWxsUHJpY2UAAAAAAAZCLEAEAAAACGJ1eVByaWNlAAAAAAAFqZXABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAALZ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BREtBUl9XQVZFUwMFAAAABHNlbGwDAwkAAGYAAAACCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlBQAAAAlzZWxsUHJpY2UGCQAAZgAAAAIFAAAACGJ1eVByaWNlCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlCQAAAgAAAAECAAAArVRyYWRpbmcgcmFuZ2UgMC45NSAtIDEuMDUgV0FWRVMuIERvIG5vdCB3cml0ZSBvZmYgdGhlIHNhbGUsIGluIHRoZSBmdXR1cmUgdG9rZW5zIHdpbGwgYmUgYWRkZWQgZm9yIHRyYWRpbmcgaW4gdGFuZGVtIHdpdGggQURLQVIuIERldGFpbHMgaW4gdGhlIHRlbGVncmFtIGNoYW5uZWwgQEFES0FSX1dBVkVTBgMFAAAAA2J1eQMJAABmAAAAAgUAAAAIYnV5UHJpY2UICAUAAAABZQAAAAlzZWxsT3JkZXIAAAAFcHJpY2UJAAACAAAAAQIAAAD4VGhlIHRyYWRpbmcgcmFuZ2UgaXMgMC45NSAtIDEuMDUgV0FWRVMsIHdoZXJlIDAuOTUgaXMgdGhlIG1pbmltdW0gcHVyY2hhc2UgcHJpY2UsIHdoaWxlIHNlbGxpbmcgYXQgdGhlIHByaWNlIG9mIDAuNSBXQVZFUywgeW91IGFsc28gbmVlZCB0byBzZXQgdGhlIHByaWNlIHRvIDAuOTUgV0FWRVMsIG90aGVyd2lzZSB0aGUgb3JkZXIgd2lsbCBub3Qgd29yay4gRGV0YWlscyBpbiB0aGUgdGVsZWdyYW0gY2hhbm5lbCBAQURLQVJfV0FWRVMGCQAAAgAAAAECAAAAFlNvbWV0aGluZyBiYWQgaGFwcGVuZWQHXtqJgw==", "chainId": 84, "height": 1018355, "spentComplexity": 0 } View: original | compacted Prev: 43ZD4PsA1AoRi6ZTjCEnRYju4UWpUd7W6cSSMnskqsAN Next: 7qme93amSv1wyB4Y6t79CJkHY7iKxdrADcxn7oc5qTsa Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | - | let startHeight = 1016000 | |
6 | - | let intervalHeight = 1500 | |
7 | - | let intervalPrice = 1000 | |
8 | - | let startPrice = 1000 | |
9 | - | let days = ((height - startHeight) / intervalHeight) | |
10 | - | let sum = (startPrice + (intervalPrice * days)) | |
11 | - | let sellPrice = sum | |
12 | - | let buyPrice = (sum - 500) | |
13 | - | let sellPricee = sellPrice | |
14 | - | let buyPricee = buyPrice | |
5 | + | let BTCId = base58'3afJDTZVMvCdLB3rd1PEY6M7icZj1VkvwBiprVRbfD3a' | |
6 | + | let sellPrice = 105000000 | |
7 | + | let buyPrice = 95000000 | |
15 | 8 | match tx { | |
16 | - | case tx: BurnTransaction => | |
17 | - | true | |
18 | - | case tx: ReissueTransaction => | |
9 | + | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => | |
19 | 10 | (tx.sender == dAppAddress) | |
20 | - | case tx: SetAssetScriptTransaction => | |
21 | - | (tx.sender == dAppAddress) | |
22 | - | case tx: MassTransferTransaction => | |
23 | - | true | |
24 | - | case tx: TransferTransaction => | |
11 | + | case tx: TransferTransaction|MassTransferTransaction => | |
25 | 12 | true | |
26 | 13 | case e: ExchangeTransaction => | |
27 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
28 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
29 | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
30 | - | if (admin) | |
14 | + | if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
31 | 15 | then true | |
32 | - | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
33 | - | then throw(" Only Waves accepted ") | |
34 | - | else if (sell) | |
35 | - | then if ((sellPrice > e.sellOrder.price)) | |
36 | - | then throw(((" Selling price should be higher " + toString(sellPricee)) + " Wavelets ")) | |
37 | - | else if (((e.sellOrder.expiration - e.sellOrder.timestamp) >= 6000000)) | |
38 | - | then throw(" The term of the order should not exceed 1 hour ") | |
39 | - | else true | |
40 | - | else if (buy) | |
41 | - | then if ((buyPrice > e.sellOrder.price)) | |
42 | - | then throw(((" Purchase price must be higher " + toString(buyPricee)) + " Wavelets ")) | |
43 | - | else true | |
44 | - | else throw(" Something bad happened ") | |
16 | + | else { | |
17 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
18 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
19 | + | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
20 | + | if (admin) | |
21 | + | then true | |
22 | + | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
23 | + | then throw("ADORE is being traded in a pair: ADORE/WAVES. Details in the telegram channel @ADKAR_WAVES") | |
24 | + | else if (sell) | |
25 | + | then if (if ((e.sellOrder.price > sellPrice)) | |
26 | + | then true | |
27 | + | else (buyPrice > e.sellOrder.price)) | |
28 | + | then throw("Trading range 0.95 - 1.05 WAVES. Do not write off the sale, in the future tokens will be added for trading in tandem with ADKAR. Details in the telegram channel @ADKAR_WAVES") | |
29 | + | else true | |
30 | + | else if (buy) | |
31 | + | then if ((buyPrice > e.sellOrder.price)) | |
32 | + | then throw("The trading range is 0.95 - 1.05 WAVES, where 0.95 is the minimum purchase price, while selling at the price of 0.5 WAVES, you also need to set the price to 0.95 WAVES, otherwise the order will not work. Details in the telegram channel @ADKAR_WAVES") | |
33 | + | else true | |
34 | + | else throw("Something bad happened") | |
35 | + | } | |
45 | 36 | case _ => | |
46 | 37 | false | |
47 | 38 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | - | let startHeight = 1016000 | |
6 | - | let intervalHeight = 1500 | |
7 | - | let intervalPrice = 1000 | |
8 | - | let startPrice = 1000 | |
9 | - | let days = ((height - startHeight) / intervalHeight) | |
10 | - | let sum = (startPrice + (intervalPrice * days)) | |
11 | - | let sellPrice = sum | |
12 | - | let buyPrice = (sum - 500) | |
13 | - | let sellPricee = sellPrice | |
14 | - | let buyPricee = buyPrice | |
5 | + | let BTCId = base58'3afJDTZVMvCdLB3rd1PEY6M7icZj1VkvwBiprVRbfD3a' | |
6 | + | let sellPrice = 105000000 | |
7 | + | let buyPrice = 95000000 | |
15 | 8 | match tx { | |
16 | - | case tx: BurnTransaction => | |
17 | - | true | |
18 | - | case tx: ReissueTransaction => | |
9 | + | case tx: BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => | |
19 | 10 | (tx.sender == dAppAddress) | |
20 | - | case tx: SetAssetScriptTransaction => | |
21 | - | (tx.sender == dAppAddress) | |
22 | - | case tx: MassTransferTransaction => | |
23 | - | true | |
24 | - | case tx: TransferTransaction => | |
11 | + | case tx: TransferTransaction|MassTransferTransaction => | |
25 | 12 | true | |
26 | 13 | case e: ExchangeTransaction => | |
27 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
28 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
29 | - | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
30 | - | if (admin) | |
14 | + | if ((e.sellOrder.assetPair.priceAsset != BTCId)) | |
31 | 15 | then true | |
32 | - | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
33 | - | then throw(" Only Waves accepted ") | |
34 | - | else if (sell) | |
35 | - | then if ((sellPrice > e.sellOrder.price)) | |
36 | - | then throw(((" Selling price should be higher " + toString(sellPricee)) + " Wavelets ")) | |
37 | - | else if (((e.sellOrder.expiration - e.sellOrder.timestamp) >= 6000000)) | |
38 | - | then throw(" The term of the order should not exceed 1 hour ") | |
39 | - | else true | |
40 | - | else if (buy) | |
41 | - | then if ((buyPrice > e.sellOrder.price)) | |
42 | - | then throw(((" Purchase price must be higher " + toString(buyPricee)) + " Wavelets ")) | |
43 | - | else true | |
44 | - | else throw(" Something bad happened ") | |
16 | + | else { | |
17 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
18 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
19 | + | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
20 | + | if (admin) | |
21 | + | then true | |
22 | + | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
23 | + | then throw("ADORE is being traded in a pair: ADORE/WAVES. Details in the telegram channel @ADKAR_WAVES") | |
24 | + | else if (sell) | |
25 | + | then if (if ((e.sellOrder.price > sellPrice)) | |
26 | + | then true | |
27 | + | else (buyPrice > e.sellOrder.price)) | |
28 | + | then throw("Trading range 0.95 - 1.05 WAVES. Do not write off the sale, in the future tokens will be added for trading in tandem with ADKAR. Details in the telegram channel @ADKAR_WAVES") | |
29 | + | else true | |
30 | + | else if (buy) | |
31 | + | then if ((buyPrice > e.sellOrder.price)) | |
32 | + | then throw("The trading range is 0.95 - 1.05 WAVES, where 0.95 is the minimum purchase price, while selling at the price of 0.5 WAVES, you also need to set the price to 0.95 WAVES, otherwise the order will not work. Details in the telegram channel @ADKAR_WAVES") | |
33 | + | else true | |
34 | + | else throw("Something bad happened") | |
35 | + | } | |
45 | 36 | case _ => | |
46 | 37 | false | |
47 | 38 | } |
github/deemru/w8io/169f3d6 41.22 ms ◑