tx · GniEWX7esG5f8WoDnbE3du8JmpGWZTQ8Fyn4WVeGVETe
3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM: -1.00000000 Waves
2019.03.23 19:11 [549201] smart asset 3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM > SELF 0.00000000 Token
{
"type": 15,
"id": "GniEWX7esG5f8WoDnbE3du8JmpGWZTQ8Fyn4WVeGVETe",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1553357496475,
"version": 1,
"sender": "3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM",
"senderPublicKey": "3u3aeyi8aVT6ouJPSgpXyNzPcKAfm4eggtkD1PRJKFpi",
"proofs": [
"5HU4rjiRaMVED3R3tP6T22NB1wS7bme2XEPH4NRauJKm95FbRncy4UBg6iJHbh3rm3juTcJgsEYExTfKxmSwVzU9"
],
"assetId": "5WEgwFcP4VXp4Gh34XgdZrbREHZmWVPRWaQ4eAbRj68p",
"script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU40mqx+iKFqCBRTN5WZYD5tUciBjTsOJ0BAAAAAdhc3NldElkAQAAACBC7BGgO/A+wbqMtKRPTS5WqqrfDvFXME8Dq9DLdj3oiQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAmV4BQAAAAckbWF0Y2gwBAAAAARzZWxsCQAB9AAAAAMICAUAAAACZXgAAAAJc2VsbE9yZGVyAAAACWJvZHlCeXRlcwkAAZEAAAACCAgFAAAAAmV4AAAACXNlbGxPcmRlcgAAAAZwcm9vZnMAAAAAAAAAAAAICAUAAAACZXgAAAAJc2VsbE9yZGVyAAAAD3NlbmRlclB1YmxpY0tleQQAAAAIbWluUHJpY2UJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAZpc3N1ZXICAAAACG1pblByaWNlBAAAAAhtYXhQcmljZQkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABmlzc3VlcgIAAAAIbWF4UHJpY2UEAAAABWFsZXJ0CQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAgUAAAAGaXNzdWVyAgAAAAVhbGVydAMFAAAABHNlbGwEAAAABnBlcm1pdAkAAAAAAAACCAgFAAAAAmV4AAAACXNlbGxPcmRlcgAAAAZzZW5kZXIFAAAABmlzc3VlcgMJAQAAAAEhAAAAAQUAAAAGcGVybWl0AwMJAABmAAAAAggFAAAAAmV4AAAABXByaWNlBQAAAAhtaW5QcmljZQkAAGYAAAACBQAAAAhtYXhQcmljZQgFAAAAAmV4AAAABXByaWNlBwYJAAACAAAAAQUAAAAFYWxlcnQGBgZp+wHg",
"chainId": 84,
"height": 549201,
"spentComplexity": 0
}
View: original | compacted
Prev: FtrxhdaJ3zV12nB6Zoicm9haACpYXPstTZQuYLhunRNG
Next: CKcpjmzEVwMzgmaUCngSCn5oQP49av3H3jtZq1DtRfR9
Diff:
Old | New | | Differences |
---|
6 | 6 | | case ex: ExchangeTransaction => |
---|
7 | 7 | | let sell = sigVerify(ex.sellOrder.bodyBytes, ex.sellOrder.proofs[0], ex.sellOrder.senderPublicKey) |
---|
8 | 8 | | let minPrice = extract(getInteger(issuer, "minPrice")) |
---|
| 9 | + | let maxPrice = extract(getInteger(issuer, "maxPrice")) |
---|
9 | 10 | | let alert = extract(getString(issuer, "alert")) |
---|
10 | 11 | | if (sell) |
---|
11 | 12 | | then { |
---|
12 | 13 | | let permit = (ex.sellOrder.sender == issuer) |
---|
13 | 14 | | if (!(permit)) |
---|
14 | | - | then if ((ex.price > minPrice)) |
---|
| 15 | + | then if (if ((ex.price > minPrice)) |
---|
| 16 | + | then (maxPrice > ex.price) |
---|
| 17 | + | else false) |
---|
15 | 18 | | then true |
---|
16 | | - | else throw(((((alert + "sell: ") + toString(sell)) + "permit:") + toString(permit))) |
---|
| 19 | + | else throw(alert) |
---|
17 | 20 | | else true |
---|
18 | 21 | | } |
---|
19 | 22 | | else true |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let issuer = Address(base58'3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM') |
---|
4 | 4 | | let assetId = base58'5WEgwFcP4VXp4Gh34XgdZrbREHZmWVPRWaQ4eAbRj68p' |
---|
5 | 5 | | match tx { |
---|
6 | 6 | | case ex: ExchangeTransaction => |
---|
7 | 7 | | let sell = sigVerify(ex.sellOrder.bodyBytes, ex.sellOrder.proofs[0], ex.sellOrder.senderPublicKey) |
---|
8 | 8 | | let minPrice = extract(getInteger(issuer, "minPrice")) |
---|
| 9 | + | let maxPrice = extract(getInteger(issuer, "maxPrice")) |
---|
9 | 10 | | let alert = extract(getString(issuer, "alert")) |
---|
10 | 11 | | if (sell) |
---|
11 | 12 | | then { |
---|
12 | 13 | | let permit = (ex.sellOrder.sender == issuer) |
---|
13 | 14 | | if (!(permit)) |
---|
14 | | - | then if ((ex.price > minPrice)) |
---|
| 15 | + | then if (if ((ex.price > minPrice)) |
---|
| 16 | + | then (maxPrice > ex.price) |
---|
| 17 | + | else false) |
---|
15 | 18 | | then true |
---|
16 | | - | else throw(((((alert + "sell: ") + toString(sell)) + "permit:") + toString(permit))) |
---|
| 19 | + | else throw(alert) |
---|
17 | 20 | | else true |
---|
18 | 21 | | } |
---|
19 | 22 | | else true |
---|
20 | 23 | | case _ => |
---|
21 | 24 | | true |
---|
22 | 25 | | } |
---|