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