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