I'm using anchor, and would like a handler call to error if there are other instructions within the same transaction. How can I accomplish this?
The use-case here is a liquidation call in a perp market, in an attempt to deter liquidation hunting.
i.e.
- manipulate price
- force liquidation
- unwind + profit
all within the same transaction