Whats wrong with my asset contract code?

I’m building a smart asset script to make 1 token = 10 wave, and have a minimum buy of 5 tokens.

The below work fine when within their own seperate script. However, when I combine them as I do below, I get contract error scripts. Is this a bug in my code, or waves itself?

let expiration = 1552064400000 # March 8 2019, 8pm Moscow time
let price = 1000000000 # 10 WAVES
let amount = 5
match tx {
case a: ExchangeTransaction =>
let pair = a.buyOrder.assetPair
let tradedForWaves = ! isDefined(pair.amountAsset) ||
! isDefined(pair.priceAsset)
tradedForWaves && a.price == price
case b: ExchangeTransaction =>
b.amount == amount
case c: BurnTransaction =>
c.timestamp > expiration
case _: TransferTransaction | MassTransferTransaction => true
case _ => false

You agree that:

I) You will not use the token for fraudulent purposes;
II) You will not duplicate, fully or in part, the name of an existing cryptocurrency or a well-known company with the aim of misleading users;
III) You will not use names of states, other administrative units or municipal institutions for the token’s name with the aim of misleading users;
IV) You will not set a script on a smart asset that limits exchange transactions on Waves DEX by asset quantity;
V) You will not give false information in a smart asset’s description concerning the rules governing the token’s use, which do not correspond to those of the script installed on it;

Failure to observe these points will lead to your token being classified as suspicious, and it will be available to search only by ID.

1 Like

Where are you getting that information from?

I ask, as their smartasset script on the ide examples do exactly that!

You could use our platdorm to hire a smart asset developer and pay them in Waves swiftly