tx · H3qZSNRBaf9t123p2rauoXWm9R55fXS7G8WrqFKwGSq9 3MsxAJrS5TnsHQMaFdAzfKsq3bcEZVDs1sc: -1.00000000 Waves 2019.03.24 23:10 [550877] smart asset 3MsxAJrS5TnsHQMaFdAzfKsq3bcEZVDs1sc > SELF 0.00000000 QQQQ
{ "type": 15, "id": "H3qZSNRBaf9t123p2rauoXWm9R55fXS7G8WrqFKwGSq9", "fee": 100000000, "feeAssetId": null, "timestamp": 1553458229185, "version": 1, "sender": "3MsxAJrS5TnsHQMaFdAzfKsq3bcEZVDs1sc", "senderPublicKey": "WHFZL2seDzc4cgHEy5jT7LStt5xpqztVfB58Vxhhi8T", "proofs": [ "2eGWNSEfKGk2ezvfBynqTZFmCBMZmQiUgA4iM4DEjJLfMBbkrAePaFJunwnqSChc2SRQTQyYE1D3N872rnAnvomS" ], "assetId": "FNmdUgxs9XY5Kx2EZ6APsF6SWveEGno1yCGJFHJXxCac", "script": "base64:AgQAAAAGc3lzdGVtAgAAACtXSEZaTDJzZUR6YzRjZ0hFeTVqVDdMU3R0NXhwcXp0VmZCNThWeGhoaThUBAAAAApzdGFydFByaWNlAAAAAAAAD0JABAAAAApkZWx0YVByaWNlAAAAAAAAACcQBAAAAAtzdGFydEhlaWdodAAAAAAAAAhn1gQAAAALZGVsdGFIZWlnaHQAAAAAAAAAAAoEAAAACXRpbWVPcmRlcgkAAGgAAAACCQAAaAAAAAIAAAAAAAAAADwAAAAAAAAAADwAAAAAAAAAA+gEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAFlBQAAAAckbWF0Y2gwAwkAAAAAAAACCQACWAAAAAEIBQAAAAFlAAAAD3NlbmRlclB1YmxpY0tleQUAAAAGc3lzdGVtBgcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMAMJA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wcmljZSBpcyAJAAGkAAAAAQUAAAACaWECAAAAAS4JAAEvAAAAAgUAAAACaWIAAAAAAAAAAAICAAAAByBXYXZlcy4JAAACAAAAAQIAAAAXUHJvaGliaXRlZCBieSBjb250cmFjdC7wYGFz", "chainId": 84, "height": 550877, "spentComplexity": 0 } View: original | compacted Prev: CWx6TZ41NF3RSLTvGgbCV9J6UspiCF9Pejy481QZ4DGu Next: CPYuhowiq3sR7byVBstKgP63ac1NMuueR3MejDA6Mzgt Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | let system = "WHFZL2seDzc4cgHEy5jT7LStt5xpqztVfB58Vxhhi8T" | |
4 | 4 | let startPrice = 1000000 | |
5 | 5 | let deltaPrice = 10000 | |
6 | - | let startHeight = | |
7 | - | let deltaHeight = | |
6 | + | let startHeight = 550870 | |
7 | + | let deltaHeight = 10 | |
8 | 8 | let timeOrder = ((60 * 60) * 1000) | |
9 | 9 | match tx { | |
10 | 10 | case e: TransferTransaction => | |
28 | 28 | then true | |
29 | 29 | else false | |
30 | 30 | case e: ExchangeTransaction => | |
31 | - | let minimumPrice = (startPrice + (((height - startHeight) / deltaHeight) * deltaPrice)) | |
32 | - | let orderPrice = e.price | |
33 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
34 | - | if (buy) | |
35 | - | then if ((orderPrice >= startPrice)) | |
36 | - | then if (isDefined(e.buyOrder.assetPair.priceAsset)) | |
37 | - | then false | |
38 | - | else true | |
39 | - | else { | |
40 | - | let ia = startPrice | |
41 | - | throw((("Minimum order price is " + toString(ia)) + " Waves.")) | |
42 | - | } | |
43 | - | else if ((orderPrice >= minimumPrice)) | |
44 | - | then if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
45 | - | then false | |
46 | - | else if ((timeOrder >= (e.sellOrder.expiration - e.sellOrder.timestamp))) | |
47 | - | then true | |
48 | - | else throw("Maximum order time 1 hour.") | |
49 | - | else { | |
50 | - | let ia = minimumPrice | |
51 | - | throw((("Minimum order price is " + toString(ia)) + " Waves.")) | |
52 | - | } | |
31 | + | if ((toBase58String(e.sellOrder.senderPublicKey) == system)) | |
32 | + | then true | |
33 | + | else { | |
34 | + | let minimumPrice = (startPrice + (((height - startHeight) / deltaHeight) * deltaPrice)) | |
35 | + | let orderPrice = (e.price / 1000000) | |
36 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
37 | + | if (buy) | |
38 | + | then if ((orderPrice >= startPrice)) | |
39 | + | then if (isDefined(e.buyOrder.assetPair.priceAsset)) | |
40 | + | then false | |
41 | + | else true | |
42 | + | else { | |
43 | + | let ia = (startPrice / 1000000) | |
44 | + | let ib = toString((startPrice - (ia * 1000000))) | |
45 | + | throw((((("Minimum order price is " + toString(ia)) + ".") + take(ib, 2)) + " Waves.")) | |
46 | + | } | |
47 | + | else if ((orderPrice >= minimumPrice)) | |
48 | + | then if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
49 | + | then false | |
50 | + | else if ((timeOrder >= (e.sellOrder.expiration - e.sellOrder.timestamp))) | |
51 | + | then true | |
52 | + | else throw("Maximum order time 1 hour.") | |
53 | + | else { | |
54 | + | let ia = (minimumPrice / 1000000) | |
55 | + | let ib = toString((minimumPrice - (ia * 1000000))) | |
56 | + | throw((((("Minimum order price is " + toString(ia)) + ".") + take(ib, 2)) + " Waves.")) | |
57 | + | } | |
58 | + | } | |
53 | 59 | case _ => | |
54 | 60 | throw("Prohibited by contract.") | |
55 | 61 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 2 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let system = "WHFZL2seDzc4cgHEy5jT7LStt5xpqztVfB58Vxhhi8T" | |
4 | 4 | let startPrice = 1000000 | |
5 | 5 | let deltaPrice = 10000 | |
6 | - | let startHeight = | |
7 | - | let deltaHeight = | |
6 | + | let startHeight = 550870 | |
7 | + | let deltaHeight = 10 | |
8 | 8 | let timeOrder = ((60 * 60) * 1000) | |
9 | 9 | match tx { | |
10 | 10 | case e: TransferTransaction => | |
11 | 11 | if ((toBase58String(e.senderPublicKey) == system)) | |
12 | 12 | then true | |
13 | 13 | else false | |
14 | 14 | case e: ReissueTransaction => | |
15 | 15 | if ((toBase58String(e.senderPublicKey) == system)) | |
16 | 16 | then true | |
17 | 17 | else false | |
18 | 18 | case e: BurnTransaction => | |
19 | 19 | if ((toBase58String(e.senderPublicKey) == system)) | |
20 | 20 | then true | |
21 | 21 | else false | |
22 | 22 | case e: MassTransferTransaction => | |
23 | 23 | if ((toBase58String(e.senderPublicKey) == system)) | |
24 | 24 | then true | |
25 | 25 | else false | |
26 | 26 | case e: SetAssetScriptTransaction => | |
27 | 27 | if ((toBase58String(e.senderPublicKey) == system)) | |
28 | 28 | then true | |
29 | 29 | else false | |
30 | 30 | case e: ExchangeTransaction => | |
31 | - | let minimumPrice = (startPrice + (((height - startHeight) / deltaHeight) * deltaPrice)) | |
32 | - | let orderPrice = e.price | |
33 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
34 | - | if (buy) | |
35 | - | then if ((orderPrice >= startPrice)) | |
36 | - | then if (isDefined(e.buyOrder.assetPair.priceAsset)) | |
37 | - | then false | |
38 | - | else true | |
39 | - | else { | |
40 | - | let ia = startPrice | |
41 | - | throw((("Minimum order price is " + toString(ia)) + " Waves.")) | |
42 | - | } | |
43 | - | else if ((orderPrice >= minimumPrice)) | |
44 | - | then if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
45 | - | then false | |
46 | - | else if ((timeOrder >= (e.sellOrder.expiration - e.sellOrder.timestamp))) | |
47 | - | then true | |
48 | - | else throw("Maximum order time 1 hour.") | |
49 | - | else { | |
50 | - | let ia = minimumPrice | |
51 | - | throw((("Minimum order price is " + toString(ia)) + " Waves.")) | |
52 | - | } | |
31 | + | if ((toBase58String(e.sellOrder.senderPublicKey) == system)) | |
32 | + | then true | |
33 | + | else { | |
34 | + | let minimumPrice = (startPrice + (((height - startHeight) / deltaHeight) * deltaPrice)) | |
35 | + | let orderPrice = (e.price / 1000000) | |
36 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
37 | + | if (buy) | |
38 | + | then if ((orderPrice >= startPrice)) | |
39 | + | then if (isDefined(e.buyOrder.assetPair.priceAsset)) | |
40 | + | then false | |
41 | + | else true | |
42 | + | else { | |
43 | + | let ia = (startPrice / 1000000) | |
44 | + | let ib = toString((startPrice - (ia * 1000000))) | |
45 | + | throw((((("Minimum order price is " + toString(ia)) + ".") + take(ib, 2)) + " Waves.")) | |
46 | + | } | |
47 | + | else if ((orderPrice >= minimumPrice)) | |
48 | + | then if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
49 | + | then false | |
50 | + | else if ((timeOrder >= (e.sellOrder.expiration - e.sellOrder.timestamp))) | |
51 | + | then true | |
52 | + | else throw("Maximum order time 1 hour.") | |
53 | + | else { | |
54 | + | let ia = (minimumPrice / 1000000) | |
55 | + | let ib = toString((minimumPrice - (ia * 1000000))) | |
56 | + | throw((((("Minimum order price is " + toString(ia)) + ".") + take(ib, 2)) + " Waves.")) | |
57 | + | } | |
58 | + | } | |
53 | 59 | case _ => | |
54 | 60 | throw("Prohibited by contract.") | |
55 | 61 | } |
github/deemru/w8io/169f3d6 32.51 ms ◑