tx · GRixh9HPhxheiRvippFQ1geonrXG9vRc5DRepMDMMogM
3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM: -1.00000000 Waves
2019.03.25 03:12 [551128] smart asset 3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM > SELF 0.00000000 Token Trade
{
"type": 15,
"id": "GRixh9HPhxheiRvippFQ1geonrXG9vRc5DRepMDMMogM",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1553472737869,
"version": 1,
"sender": "3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM",
"senderPublicKey": "3u3aeyi8aVT6ouJPSgpXyNzPcKAfm4eggtkD1PRJKFpi",
"proofs": [
"255zfJwj9aJSAXfRYHMFULtdh1X6SyJbq9pFugwnJFJn7CghyeX72iavraXUHrnGGGxdKaYEpNV6835aYBYiv75D"
],
"assetId": "GMzzn9Vm5YBba1s6pqBmUM7Vpt63vnUpnK4ZEUh2zmpV",
"script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU40mqx+iKFqCBRTN5WZYD5tUciBjTsOJ0BAAAAAdhc3NldElkAQAAACDkQH8e64ZjMSJsA3wOy/mEyFrGPsQhPcEOwaMpyfJtKgQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAmV4BQAAAAckbWF0Y2gwBAAAAARwYWlyCQEAAAAJQXNzZXRQYWlyAAAAAgUAAAAHYXNzZXRJZAUAAAAEdW5pdAQAAAAEc2VsbAkAAfQAAAADCAgFAAAAAmV4AAAACXNlbGxPcmRlcgAAAAlib2R5Qnl0ZXMJAAGRAAAAAggIBQAAAAJleAAAAAlzZWxsT3JkZXIAAAAGcHJvb2ZzAAAAAAAAAAAACAgFAAAAAmV4AAAACXNlbGxPcmRlcgAAAA9zZW5kZXJQdWJsaWNLZXkEAAAADW1pblByaWNlV2F2ZXMJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAZpc3N1ZXICAAAADW1pblByaWNlV2F2ZXMEAAAADW1heFByaWNlV2F2ZXMJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAZpc3N1ZXICAAAADW1heFByaWNlV2F2ZXMEAAAABWFsZXJ0CQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAgUAAAAGaXNzdWVyAgAAAAVhbGVydAMDBQAAAARzZWxsCQAAAAAAAAIICAUAAAACZXgAAAAIYnV5T3JkZXIAAAAJYXNzZXRQYWlyBQAAAARwYWlyBwQAAAAGcGVybWl0CQAAAAAAAAIICAUAAAACZXgAAAAJc2VsbE9yZGVyAAAABnNlbmRlcgUAAAAGaXNzdWVyAwkBAAAAASEAAAABBQAAAAZwZXJtaXQDAwkAAGcAAAACCAUAAAACZXgAAAAFcHJpY2UFAAAADW1pblByaWNlV2F2ZXMJAABnAAAAAgUAAAANbWF4UHJpY2VXYXZlcwgFAAAAAmV4AAAABXByaWNlBwYJAAACAAAAAQUAAAAFYWxlcnQGBgYLiGfT",
"chainId": 84,
"height": 551128,
"spentComplexity": 0
}
View: original | compacted
Prev: 85ux4E38a7VLiVZbznwzZ4dKfcsZxSdGJvEknFkdHyim
Next: none
Diff:
Old | New | | Differences |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let issuer = Address(base58'3NAdsQwsE66yqqKHBviC4bYqNfc72PTo2oM') |
---|
4 | 4 | | let assetId = base58'GMzzn9Vm5YBba1s6pqBmUM7Vpt63vnUpnK4ZEUh2zmpV' |
---|
5 | | - | let WAVESId = base58'WAVES' |
---|
6 | 5 | | match tx { |
---|
7 | 6 | | case ex: ExchangeTransaction => |
---|
8 | 7 | | let pair = AssetPair(assetId, unit) |
---|
|
11 | 10 | | let maxPriceWaves = extract(getInteger(issuer, "maxPriceWaves")) |
---|
12 | 11 | | let alert = extract(getString(issuer, "alert")) |
---|
13 | 12 | | if (if (sell) |
---|
14 | | - | then (ex.sellOrder.assetPair.priceAsset == WAVESId) |
---|
| 13 | + | then (ex.buyOrder.assetPair == pair) |
---|
15 | 14 | | else false) |
---|
16 | 15 | | then { |
---|
17 | 16 | | let permit = (ex.sellOrder.sender == issuer) |
---|
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'GMzzn9Vm5YBba1s6pqBmUM7Vpt63vnUpnK4ZEUh2zmpV' |
---|
5 | | - | let WAVESId = base58'WAVES' |
---|
6 | 5 | | match tx { |
---|
7 | 6 | | case ex: ExchangeTransaction => |
---|
8 | 7 | | let pair = AssetPair(assetId, unit) |
---|
9 | 8 | | let sell = sigVerify(ex.sellOrder.bodyBytes, ex.sellOrder.proofs[0], ex.sellOrder.senderPublicKey) |
---|
10 | 9 | | let minPriceWaves = extract(getInteger(issuer, "minPriceWaves")) |
---|
11 | 10 | | let maxPriceWaves = extract(getInteger(issuer, "maxPriceWaves")) |
---|
12 | 11 | | let alert = extract(getString(issuer, "alert")) |
---|
13 | 12 | | if (if (sell) |
---|
14 | | - | then (ex.sellOrder.assetPair.priceAsset == WAVESId) |
---|
| 13 | + | then (ex.buyOrder.assetPair == pair) |
---|
15 | 14 | | else false) |
---|
16 | 15 | | then { |
---|
17 | 16 | | let permit = (ex.sellOrder.sender == issuer) |
---|
18 | 17 | | if (!(permit)) |
---|
19 | 18 | | then if (if ((ex.price >= minPriceWaves)) |
---|
20 | 19 | | then (maxPriceWaves >= ex.price) |
---|
21 | 20 | | else false) |
---|
22 | 21 | | then true |
---|
23 | 22 | | else throw(alert) |
---|
24 | 23 | | else true |
---|
25 | 24 | | } |
---|
26 | 25 | | else true |
---|
27 | 26 | | case _ => |
---|
28 | 27 | | true |
---|
29 | 28 | | } |
---|