Reputation: 11
I have one question about asset script: It is possible to create token with script which allow to trade on WavesDex only for 1 usd? If sombody want to trade minimum or maximum of > 1< usd script will block this operation
Upvotes: 1
Views: 50
Reputation: 11
Yes, you can. You should get something like this:
let tokenId = base58'token id here'
match tx {
case ex : ExchangeTransaction =>
let selectedToken = ex.sellOrder.assetPair.priceAsset == tokenId || ex.sellOrder.assetPair.amountAsset == tokenId
let selectedPrice = ex.price == your_price_here
selectedToken && selectedPrice
case _ => true
}
Upvotes: 1