tour · rules · lesson 12 of 25
checks
trust_me_bro!(condition, "message") stops the instruction unless the condition holds. It becomes Anchor's require!.
Your message becomes an error code. typeshi names it and adds it to enum Cope, every program's list of errors, after the six that are the same everywhere: skill issue, you are exit liquidity, and the rest.
a mogs b means a > b.
your move: reject empty trades. Add trust_me_bro!(size mogs 0, "zero is not a trade"); as the first line of trade. Then find ZeroIsNotATrade in lib.rs.
loading the compiler…