tx · JA5saJFBVNuAGoJHRad8fm7AAGGVwiPTJCDbJs6axHct
3MyewNpvp22jvzpxx2qxM2HFTowsqUEPo5w: -1.00400000 Waves
2019.02.11 22:50 [490931] smart asset 3MyewNpvp22jvzpxx2qxM2HFTowsqUEPo5w > SELF 0.00000000 mytest1
{
"type": 15,
"id": "JA5saJFBVNuAGoJHRad8fm7AAGGVwiPTJCDbJs6axHct",
"fee": 100400000,
"feeAssetId": null,
"timestamp": 1549914707536,
"version": 1,
"sender": "3MyewNpvp22jvzpxx2qxM2HFTowsqUEPo5w",
"senderPublicKey": "5NKM8mtxgaEeB89FzmujLBdJrJXkYBkftRoTffUS53f",
"proofs": [
"4N4S3tybhcRW4QhnLpfXAJdre2qJGJK7AkWDUQY5VesrQDGETmabQZrcnhYmdE9GcuL3gHqZQpJzDD8ZHWKNhGdn",
"3J3UqYzwPFiQ4SzPFWUiQLCDZihf6MeEkn1XSPDMnY4vXYfudzCKGwn19C2CEvsbx3sKn9NFrCHNF4iFeT82KCfd",
"5hBtAMwhz2gvZTMn34icpefBPEAPTAKYXXweZBG2KNHMpLNuUUFfX6xxEdnh2RFWaHcLQ8h21A2exzrEMj9mzJeM",
"5XrN15j2y5CbXMXfkck1yah1y46deDYRxMLxS5uNTHprG7rN5SwKkbkbSsBuHYXiwbWop9Vxv5H8uzK1ZPQkivtC"
],
"assetId": "FivmKRkvFdVhSHBtxQ1UFj4EmbAd87pk2hKenwnbdwsK",
"script": "base64:AQQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUatQCCuE3RLHy+k6O3owtbPTUFUwOIaG2BAAAAAZzZW5kZXIJAAJYAAAAAQgJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkAAAAFYnl0ZXMEAAAACGlzRnJvemVuCQEAAAAHZXh0cmFjdAAAAAEJAAQbAAAAAgUAAAAGaXNzdWVyAgAAAAtUb2tlbk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AAABcwUAAAAHJG1hdGNoMAcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAABcgUAAAAHJG1hdGNoMAcGrr2O6Q==",
"chainId": 84,
"height": 490931,
"spentComplexity": 0
}
View: original | compacted
Prev: CBEBfrKr3CNyvi7JKyAjffgGkVyaX34CyhVVgUxWdCwA
Next: CAEtwt5ZoDXBsLrTSYrFnyqyX77wBNU53GcrjersMhsb
Diff:
Old | New | | Differences |
---|
4 | 4 | | let sender = toBase58String(addressFromPublicKey(tx.senderPublicKey).bytes) |
---|
5 | 5 | | let isFrozen = extract(getBoolean(issuer, "TokenFrozen")) |
---|
6 | 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")) |
---|
7 | 10 | | if ((issuer == tx.sender)) |
---|
8 | 11 | | then match tx { |
---|
| 12 | + | case e: ExchangeTransaction => |
---|
| 13 | + | if (!(isDefined(e.sellOrder.assetPair.priceAsset))) |
---|
| 14 | + | then if ((e.sellOrder.price >= MinWavesPrice)) |
---|
| 15 | + | then true |
---|
| 16 | + | else { |
---|
| 17 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) |
---|
| 18 | + | throw(WAVerrStr) |
---|
| 19 | + | } |
---|
| 20 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) |
---|
| 21 | + | then if ((e.sellOrder.price >= MinBtcPrice)) |
---|
| 22 | + | then true |
---|
| 23 | + | else { |
---|
| 24 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) |
---|
| 25 | + | throw(BTCerrStr) |
---|
| 26 | + | } |
---|
| 27 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) |
---|
| 28 | + | then if ((e.sellOrder.price >= MinEthPrice)) |
---|
| 29 | + | then true |
---|
| 30 | + | else { |
---|
| 31 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) |
---|
| 32 | + | throw(ETHerrStr) |
---|
| 33 | + | } |
---|
| 34 | + | else throw("Only WAVES, BTC and ETH pairs allowed") |
---|
9 | 35 | | case _ => |
---|
10 | 36 | | true |
---|
11 | 37 | | } |
---|
|
23 | 49 | | false |
---|
24 | 50 | | } |
---|
25 | 51 | | else match tx { |
---|
| 52 | + | case e: ExchangeTransaction => |
---|
| 53 | + | if (!(isDefined(e.sellOrder.assetPair.priceAsset))) |
---|
| 54 | + | then if ((e.sellOrder.price >= MinWavesPrice)) |
---|
| 55 | + | then true |
---|
| 56 | + | else { |
---|
| 57 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) |
---|
| 58 | + | throw(WAVerrStr) |
---|
| 59 | + | } |
---|
| 60 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) |
---|
| 61 | + | then if ((e.sellOrder.price >= MinBtcPrice)) |
---|
| 62 | + | then true |
---|
| 63 | + | else { |
---|
| 64 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) |
---|
| 65 | + | throw(BTCerrStr) |
---|
| 66 | + | } |
---|
| 67 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) |
---|
| 68 | + | then if ((e.sellOrder.price >= MinEthPrice)) |
---|
| 69 | + | then true |
---|
| 70 | + | else { |
---|
| 71 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) |
---|
| 72 | + | throw(ETHerrStr) |
---|
| 73 | + | } |
---|
| 74 | + | else throw("Only WAVES, BTC and ETH pairs allowed") |
---|
26 | 75 | | case b: BurnTransaction => |
---|
27 | 76 | | false |
---|
28 | 77 | | case s: SetAssetScriptTransaction => |
---|
|
34 | 83 | | } |
---|
35 | 84 | | } |
---|
36 | 85 | | else match tx { |
---|
| 86 | + | case e: ExchangeTransaction => |
---|
| 87 | + | if (!(isDefined(e.sellOrder.assetPair.priceAsset))) |
---|
| 88 | + | then if ((e.sellOrder.price >= MinWavesPrice)) |
---|
| 89 | + | then true |
---|
| 90 | + | else { |
---|
| 91 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) |
---|
| 92 | + | throw(WAVerrStr) |
---|
| 93 | + | } |
---|
| 94 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) |
---|
| 95 | + | then if ((e.sellOrder.price >= MinBtcPrice)) |
---|
| 96 | + | then true |
---|
| 97 | + | else { |
---|
| 98 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) |
---|
| 99 | + | throw(BTCerrStr) |
---|
| 100 | + | } |
---|
| 101 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) |
---|
| 102 | + | then if ((e.sellOrder.price >= MinEthPrice)) |
---|
| 103 | + | then true |
---|
| 104 | + | else { |
---|
| 105 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) |
---|
| 106 | + | throw(ETHerrStr) |
---|
| 107 | + | } |
---|
| 108 | + | else throw("Only WAVES, BTC and ETH pairs allowed") |
---|
37 | 109 | | case b: BurnTransaction => |
---|
38 | 110 | | false |
---|
39 | 111 | | case s: SetAssetScriptTransaction => |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 1 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let issuer = Address(base58'3MyewNpvp22jvzpxx2qxM2HFTowsqUEPo5w') |
---|
4 | 4 | | let sender = toBase58String(addressFromPublicKey(tx.senderPublicKey).bytes) |
---|
5 | 5 | | let isFrozen = extract(getBoolean(issuer, "TokenFrozen")) |
---|
6 | 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")) |
---|
7 | 10 | | if ((issuer == tx.sender)) |
---|
8 | 11 | | then match tx { |
---|
| 12 | + | case e: ExchangeTransaction => |
---|
| 13 | + | if (!(isDefined(e.sellOrder.assetPair.priceAsset))) |
---|
| 14 | + | then if ((e.sellOrder.price >= MinWavesPrice)) |
---|
| 15 | + | then true |
---|
| 16 | + | else { |
---|
| 17 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) |
---|
| 18 | + | throw(WAVerrStr) |
---|
| 19 | + | } |
---|
| 20 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) |
---|
| 21 | + | then if ((e.sellOrder.price >= MinBtcPrice)) |
---|
| 22 | + | then true |
---|
| 23 | + | else { |
---|
| 24 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) |
---|
| 25 | + | throw(BTCerrStr) |
---|
| 26 | + | } |
---|
| 27 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) |
---|
| 28 | + | then if ((e.sellOrder.price >= MinEthPrice)) |
---|
| 29 | + | then true |
---|
| 30 | + | else { |
---|
| 31 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) |
---|
| 32 | + | throw(ETHerrStr) |
---|
| 33 | + | } |
---|
| 34 | + | else throw("Only WAVES, BTC and ETH pairs allowed") |
---|
9 | 35 | | case _ => |
---|
10 | 36 | | true |
---|
11 | 37 | | } |
---|
12 | 38 | | else if (isFrozen) |
---|
13 | 39 | | then match tx { |
---|
14 | 40 | | case _ => |
---|
15 | 41 | | false |
---|
16 | 42 | | } |
---|
17 | 43 | | else if (isOnBlacklist) |
---|
18 | 44 | | then { |
---|
19 | 45 | | let isBlocked = extract(getBoolean(issuer, sender)) |
---|
20 | 46 | | if (isBlocked) |
---|
21 | 47 | | then match tx { |
---|
22 | 48 | | case _ => |
---|
23 | 49 | | false |
---|
24 | 50 | | } |
---|
25 | 51 | | else match tx { |
---|
| 52 | + | case e: ExchangeTransaction => |
---|
| 53 | + | if (!(isDefined(e.sellOrder.assetPair.priceAsset))) |
---|
| 54 | + | then if ((e.sellOrder.price >= MinWavesPrice)) |
---|
| 55 | + | then true |
---|
| 56 | + | else { |
---|
| 57 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) |
---|
| 58 | + | throw(WAVerrStr) |
---|
| 59 | + | } |
---|
| 60 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) |
---|
| 61 | + | then if ((e.sellOrder.price >= MinBtcPrice)) |
---|
| 62 | + | then true |
---|
| 63 | + | else { |
---|
| 64 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) |
---|
| 65 | + | throw(BTCerrStr) |
---|
| 66 | + | } |
---|
| 67 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) |
---|
| 68 | + | then if ((e.sellOrder.price >= MinEthPrice)) |
---|
| 69 | + | then true |
---|
| 70 | + | else { |
---|
| 71 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) |
---|
| 72 | + | throw(ETHerrStr) |
---|
| 73 | + | } |
---|
| 74 | + | else throw("Only WAVES, BTC and ETH pairs allowed") |
---|
26 | 75 | | case b: BurnTransaction => |
---|
27 | 76 | | false |
---|
28 | 77 | | case s: SetAssetScriptTransaction => |
---|
29 | 78 | | false |
---|
30 | 79 | | case r: ReissueTransaction => |
---|
31 | 80 | | false |
---|
32 | 81 | | case _ => |
---|
33 | 82 | | true |
---|
34 | 83 | | } |
---|
35 | 84 | | } |
---|
36 | 85 | | else match tx { |
---|
| 86 | + | case e: ExchangeTransaction => |
---|
| 87 | + | if (!(isDefined(e.sellOrder.assetPair.priceAsset))) |
---|
| 88 | + | then if ((e.sellOrder.price >= MinWavesPrice)) |
---|
| 89 | + | then true |
---|
| 90 | + | else { |
---|
| 91 | + | let WAVerrStr = ((("Minimal WAVES price = " + toString((MinWavesPrice / 100000000))) + ".") + toString((MinWavesPrice % 100000000))) |
---|
| 92 | + | throw(WAVerrStr) |
---|
| 93 | + | } |
---|
| 94 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS')) |
---|
| 95 | + | then if ((e.sellOrder.price >= MinBtcPrice)) |
---|
| 96 | + | then true |
---|
| 97 | + | else { |
---|
| 98 | + | let BTCerrStr = ((("Minimal BTC price = " + toString((MinBtcPrice / 100000000))) + ".") + toString((MinBtcPrice % 100000000))) |
---|
| 99 | + | throw(BTCerrStr) |
---|
| 100 | + | } |
---|
| 101 | + | else if ((e.sellOrder.assetPair.priceAsset == base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu')) |
---|
| 102 | + | then if ((e.sellOrder.price >= MinEthPrice)) |
---|
| 103 | + | then true |
---|
| 104 | + | else { |
---|
| 105 | + | let ETHerrStr = ((("Minimal ETH price = " + toString((MinEthPrice / 100000000))) + ".") + toString((MinEthPrice % 100000000))) |
---|
| 106 | + | throw(ETHerrStr) |
---|
| 107 | + | } |
---|
| 108 | + | else throw("Only WAVES, BTC and ETH pairs allowed") |
---|
37 | 109 | | case b: BurnTransaction => |
---|
38 | 110 | | false |
---|
39 | 111 | | case s: SetAssetScriptTransaction => |
---|
40 | 112 | | false |
---|
41 | 113 | | case r: ReissueTransaction => |
---|
42 | 114 | | false |
---|
43 | 115 | | case _ => |
---|
44 | 116 | | true |
---|
45 | 117 | | } |
---|