Illegal operations/invalid operation codes compiled from smart contracts not only fail to deploy/execute, but also incur a full penalty of the _fee_limit_. As users normally set the fee limit to 1000 TRX (max), this is a significant penalty and is even more costly if the user attempts to retry the operations automatically.

There are two common ways invalid operation codes are triggered:

  1. User is manually trying to inject arbitrarily invalid operation code into the smart contract bytecode.

  2. User is using a newer compiler before new operation codes are supported. Specifically as a past example, before the "TRC-10 token transfer in smart contracts" is allowed (, if user happens to use the new compiler to deploy/execute smart contracts, the full _fee_limit_ would be deducted from the user account.

In the above example, _transferToken_ maps to op code _0xd0_, _tokenBalance_ maps to op code _0xd1_, _msg.tokenid_ maps to op code _0xd2_, _msg.tokenvalue_ maps to op code _0xd3_. If any of these is used before network has activated the new TRC-10 transfer proposal, TVM will reject this operation and penalize the entire _fee_limit_.

The general rule of thumb is to always use the latest Tron-Web/Tron-Box for compiling/deploying/executing contracts. When switching between Testnet and Mainnet, make sure to re-compile all contracts in case of different network parameters deciding different sets of valid operation codes.