tx · FRXtyCjSe2DWyBmdjCQ7DVLQqoB8i39aay3rGkhn5p6H 3MtMR16kp56cr9Hfb2dVBAM5PtuhJDCK5fu: -1.00000000 Waves 2020.08.07 22:39 [1122449] smart asset 3MtMR16kp56cr9Hfb2dVBAM5PtuhJDCK5fu > SELF 0.000000 miamortoken
{ "type": 15, "id": "FRXtyCjSe2DWyBmdjCQ7DVLQqoB8i39aay3rGkhn5p6H", "fee": 100000000, "feeAssetId": null, "timestamp": 1596829179432, "version": 1, "sender": "3MtMR16kp56cr9Hfb2dVBAM5PtuhJDCK5fu", "senderPublicKey": "EEyLKa9SPmnKsjMrbvYfErhHvpJ7wbLRTyNj3C4Qy4q5", "proofs": [ "48CbPcrq2n8qVMmaywWTCJoxrXLRUuNAwtgSHEhjoESpgFmrBGWP7UocJkUyAaymBrKhNYL8wnJJhDBm7qiDzet" ], "assetId": "HdLzLbzCgbjWsiQMRwveD1FW1e3pv1WJ5cMiYxFS5mD7", "script": "base64:AgQAAAAKYnRjQXNzZXRJZAEAAAAguec/qo8QJtuj3bookxh1fq0CogDYmuE6CdbFUTcLG40EAAAAC3VzZG5Bc3NldElkAQAAACAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24EAAAAAmV0BQAAAAckbWF0Y2gwBAAAAAd3aXRoQnRjAwkAAAAAAAACCAgIBQAAAAJldAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAAC2Ftb3VudEFzc2V0BQAAAApidGNBc3NldElkBgkAAAAAAAACCAgIBQAAAAJldAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQFAAAACmJ0Y0Fzc2V0SWQEAAAACHdpdGhVc2RuAwkAAAAAAAACCAgIBQAAAAJldAAAAAlzZWxsT3JkZXIAAAAJYXNzZXRQYW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c3VlckFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAdpc3N1ZVR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAAAAAAAAgUAAAAOZmlyc3RSZWNpcGllbnQFAAAADWlzc3VlckFkZHJlc3MJAABnAAAAAgUAAAALZmlyc3RBbW91bnQJAABoAAAAAggFAAAAA210dAAAAAt0b3RhbEFtb3VudAUAAAAJY29tbWlzaW9uBwcGL9oV5w==", "chainId": 84, "height": 1122449, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 2 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let btcAssetId = base58'DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn' | |
4 | + | let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
5 | + | match tx { | |
6 | + | case et: ExchangeTransaction => | |
7 | + | let withBtc = if ((et.sellOrder.assetPair.amountAsset == btcAssetId)) | |
8 | + | then true | |
9 | + | else (et.sellOrder.assetPair.priceAsset == btcAssetId) | |
10 | + | let withUsdn = if ((et.sellOrder.assetPair.amountAsset == usdnAssetId)) | |
11 | + | then true | |
12 | + | else (et.sellOrder.assetPair.priceAsset == usdnAssetId) | |
13 | + | let marginIncrease = (5 / 100) | |
14 | + | let acceptedSellMargin = (et.price * marginIncrease) | |
15 | + | let canSell = (et.sellOrder.price >= (et.price + acceptedSellMargin)) | |
16 | + | if (if (withBtc) | |
17 | + | then true | |
18 | + | else withUsdn) | |
19 | + | then canSell | |
20 | + | else false | |
21 | + | case mtt: MassTransferTransaction => | |
22 | + | let firstRecipient = mtt.transfers[0].recipient | |
23 | + | let firstAmount = mtt.transfers[0].amount | |
24 | + | let assetId = extract(mtt.assetId) | |
25 | + | let commision = (24 / 100) | |
26 | + | let issueTransaction = transactionById(assetId) | |
27 | + | match issueTransaction { | |
28 | + | case issueTx: IssueTransaction => | |
29 | + | let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey) | |
30 | + | if ((firstRecipient == issuerAddress)) | |
31 | + | then (firstAmount >= (mtt.totalAmount * commision)) | |
32 | + | else false | |
33 | + | case _ => | |
34 | + | false | |
35 | + | } | |
36 | + | case _ => | |
37 | + | true | |
38 | + | } |
github/deemru/w8io/169f3d6 27.27 ms ◑