tx · 2zpgtmQ23xuGp8ZPpNbpNEUjKvEsygtZW4Vhe3oQ25SX 3MsXGy1CJfW5c8GJJAkimm2afr9TPVYjgXr: -1.00000000 Waves 2019.03.01 23:42 [517253] smart asset 3MsXGy1CJfW5c8GJJAkimm2afr9TPVYjgXr > SELF 0.00000000 testtest2
{ "type": 15, "id": "2zpgtmQ23xuGp8ZPpNbpNEUjKvEsygtZW4Vhe3oQ25SX", "fee": 100000000, "feeAssetId": null, "timestamp": 1551472946305, "version": 1, "sender": "3MsXGy1CJfW5c8GJJAkimm2afr9TPVYjgXr", "senderPublicKey": "6wAP6yziEYov9Vbdfa25JfXgFgakhMRo3Z9UbNW3Y4nV", "proofs": [ "ZziRUqREkAtJM7h3ixb6D6SWkkL51Vfo8B5dKNKDDncYYtmWBjTh7n9Jap2CuAcouv7MGzhWsi7fe1vQcZAuytj" ], "assetId": "7Mjm994f5AjTpj9iixRSHfJKG7HMUbm19HBeu9sKLSzQ", "script": "base64:AQQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFXLMPeaxM9JsB/Ec4htAneeRMLAAgXVrCQBAAAAAZzZW5kZXIJAAJYAAAAAQgJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkAAAAFYnl0ZXMEAAAACGlzRnJvemVuCQEAAAAHZXh0cmFjdAAAAAEJAAQbAAAAAgUAAAAGaXNzdWVyAgAAAAtUb2tlbkZyb3plbgQAAAANaXNPbkJsYWNrbGlzdAkBAAAACWlzRGVmaW5lZAAAAAEJAAQbAAAAAgUAAAAGaXNzdWVyBQAAAAZzZW5kZXIEAAAADU1pbldhdmVzUHJpY2UJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAZpc3N1ZXICAAAADU1pbldhdmVzUHJpY2UEAAAAC01pbkJ0Y1ByaWNlCQEAAAAHZXh0cmFjdAAAAAEJAAQaAAAAAgUAAAAGaXNzd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zZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABcwUAAAAHJG1hdGNoMAcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAABcgUAAAAHJG1hdGNoMAcGU+BBhw==", "chainId": 84, "height": 517253, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let issuer = Address(base58'3P61b6te2fvjL7agKHqNcCkputgYs65xw5R') | |
4 | + | let sender = toBase58String(addressFromPublicKey(tx.senderPublicKey).bytes) | |
5 | + | let isFrozen = extract(getBoolean(issuer, "TokenFrozen")) | |
6 | + | let isOnBlacklist = isDefined(getBoolean(issuer, sender)) | |
7 | + | let MinWavesPrice = extract(getInteger(issuer, "MinWavesPrice")) | |
8 | + | let MinBtcPrice = extract(getInteger(issuer, "MinBtcPrice")) | |
9 | + | let MinEthPrice = extract(getInteger(issuer, "MinEthPrice")) | |
10 | + | if ((issuer == tx.sender)) | |
11 | + | then match tx { | |
12 | + | case e: ExchangeTransaction => | |
13 | + | if (!(isDefined(e.sellOrder.assetPair.priceAsset))) | |
14 | + | then true | |
15 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) | |
16 | + | then true | |
17 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) | |
18 | + | then true | |
19 | + | else throw("Only WAVES, BTC and ETH pairs allowed") | |
20 | + | case _ => | |
21 | + | true | |
22 | + | } | |
23 | + | else if (isFrozen) | |
24 | + | then match tx { | |
25 | + | case _ => | |
26 | + | false | |
27 | + | } | |
28 | + | else if (isOnBlacklist) | |
29 | + | then { | |
30 | + | let isBlocked = extract(getBoolean(issuer, sender)) | |
31 | + | if (isBlocked) | |
32 | + | then match tx { | |
33 | + | case _ => | |
34 | + | false | |
35 | + | } | |
36 | + | else match tx { | |
37 | + | case e: ExchangeTransaction => | |
38 | + | if (!(isDefined(e.buyOrder.assetPair.priceAsset))) | |
39 | + | then if (if ((e.buyOrder.price >= MinWavesPrice)) | |
40 | + | then true | |
41 | + | else (e.sellOrder.price >= 1)) | |
42 | + | then true | |
43 | + | else { | |
44 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) | |
45 | + | throw(WAVerrStr) | |
46 | + | } | |
47 | + | else if ((e.buyOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) | |
48 | + | then if ((e.buyOrder.price >= MinBtcPrice)) | |
49 | + | then true | |
50 | + | else { | |
51 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) | |
52 | + | throw(BTCerrStr) | |
53 | + | } | |
54 | + | else if ((e.buyOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) | |
55 | + | then if ((e.buyOrder.price >= MinEthPrice)) | |
56 | + | then true | |
57 | + | else { | |
58 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) | |
59 | + | throw(ETHerrStr) | |
60 | + | } | |
61 | + | else throw("Only WAVES, BTC and ETH pairs allowed") | |
62 | + | case b: BurnTransaction => | |
63 | + | false | |
64 | + | case s: SetAssetScriptTransaction => | |
65 | + | false | |
66 | + | case r: ReissueTransaction => | |
67 | + | false | |
68 | + | case _ => | |
69 | + | true | |
70 | + | } | |
71 | + | } | |
72 | + | else match tx { | |
73 | + | case e: ExchangeTransaction => | |
74 | + | if (!(isDefined(e.buyOrder.assetPair.priceAsset))) | |
75 | + | then if (if ((e.buyOrder.price >= MinWavesPrice)) | |
76 | + | then true | |
77 | + | else (e.sellOrder.price >= 1)) | |
78 | + | then true | |
79 | + | else { | |
80 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) | |
81 | + | throw(WAVerrStr) | |
82 | + | } | |
83 | + | else if ((e.buyOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) | |
84 | + | then if ((e.buyOrder.price >= MinBtcPrice)) | |
85 | + | then true | |
86 | + | else { | |
87 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) | |
88 | + | throw(BTCerrStr) | |
89 | + | } | |
90 | + | else if ((e.buyOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) | |
91 | + | then if ((e.buyOrder.price >= MinEthPrice)) | |
92 | + | then true | |
93 | + | else { | |
94 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) | |
95 | + | throw(ETHerrStr) | |
96 | + | } | |
97 | + | else throw("Only WAVES, BTC and ETH pairs allowed") | |
98 | + | case b: BurnTransaction => | |
99 | + | false | |
100 | + | case s: SetAssetScriptTransaction => | |
101 | + | false | |
102 | + | case r: ReissueTransaction => | |
103 | + | false | |
104 | + | case _ => | |
105 | + | true | |
106 | + | } |
github/deemru/w8io/026f985 15.62 ms ◑