When a call fails, the engine panics and nothing in the call changes: no balances, no storage. Deposits with *_transfer_call are refunded by the token contract. The message is in the receipt’s failure, as Smart contract panicked: <message>.
<asset> is an asset ID, <owner> is Account(<account id>) or Dex(<dex id>).
| Message |
Cause |
Contract is paused |
The contract is paused. Try again later |
Requires attached deposit of exactly 1 yoctoNEAR |
The method needs exactly 1 yoctoNEAR attached |
Deposit of at least one yoctoNEAR is required. |
execute_operations was called without a deposit |
| Message |
Cause |
Asset <asset> is not registered for <owner> |
The owner would receive an asset that isn’t registered for them |
Failed to deposit assets to contract tracked balance: asset not registered |
Nobody ever registered this asset. Register it for yourself |
Insufficient balance for account <account> and asset <asset>: <balance> < <amount> |
Not enough in your inner balance |
Insufficient balance of <asset> for <owner>: <balance> < <amount> |
Not enough in your inner balance for the attached_assets of a DEX call |
Failed to withdraw assets from user balance: user <account> balance for asset <asset> was not found |
The asset isn’t registered for you, so you have none of it |
Not enough balance for withdraw <asset>: <balance> < <at_least> |
A Full withdrawal with a balance lower than at_least |
account_id and dex_id are mutually exclusive |
registered_assets_of needs exactly one of them |
| Message |
Cause |
Output amount is less than constraint |
An ExactIn swap would give less than constraint. The price moved: get a new quote |
Input amount is greater than constraint |
An ExactOut swap would cost more than constraint |
Insufficient balance for dex <dex id> and asset <asset>: <balance> < <amount> |
The DEX doesn’t hold enough asset_out |
Amount in does not match, Amount out does not match |
The DEX returned a different exact amount than requested. A bug in the DEX |
Dex code not found |
No DEX with this ID |
| Message |
Cause |
[<dex id>] Dex panicked: <message> |
The DEX refused the swap or call. <message> comes from the DEX |
Failed to get function '<method>' |
The DEX has no such method |
Method name 'swap' is reserved for the swap operation |
dex_call and dex_view can’t call swap. Use swap_simple |
Cannot modify data in view-only mode |
The DEX tried to change its storage in dex_view |
| Message |
Cause |
Failed to parse operations |
msg of a deposit isn’t a valid DepositMessage |
Operation only available in execute_actions |
RegisterAssets or DeployDexCode in a deposit message |
Sandboxed assets must be empty after execution. Did you forget to withdraw <amount> <asset>? |
Operations in a deposit didn’t use up everything. Add a Withdraw or TransferAsset for the rest |
Asset in not found in anonymous assets, Asset to withdraw not found in anonymous assets, Asset to transfer not found in anonymous assets |
An operation in a deposit uses an asset that wasn’t deposited and isn’t the output of an earlier swap |
Not enough balance in anonymous assets, Not enough input balance in anonymous assets |
An operation in a deposit uses more than what’s left. The second one is a swap whose input is more than what’s left, for example an ExactOut swap that needs more than was deposited |
No rescue address provided and user doesn't have a registered balance for this asset |
A Withdraw in a deposit needs the sender or rescue_address to have the asset registered. See Withdrawing from a deposit |
Amount is required for first SwapSimple operation |
OutputOfLastIn without a swap before it |
Amount can only be omitted if the last swap asset out matches the current asset in |
OutputOfLastIn after a swap to a different asset |
PreviousSwapOutput can only be used after a swap, in the same operation batch |
PreviousSwapOutput without a swap before it |
PreviousSwapOutput can only be used if the last swap asset out matches the withdraw asset |
PreviousSwapOutput after a swap to a different asset |
Only the previous owner can execute operations on behalf of the previous owner |
An NFT or multi token sent with an approval, with a non-empty msg |
r#for is required for StorageDeposit operation |
StorageDeposit without for |
| Message |
Cause |
Storage used (<used>) exceeds total (<total>) |
Not enough storage balance: yours for a registration, the DEX’s for a swap or call that stores more data. Deposit more |
Deposit amount <amount> is less than the minimum bound <min> |
Storage deposits must be at least 0.005 NEAR |
Storage used not found |
storage_withdraw from an account without a storage balance |
Amount exceeds storage used |
storage_withdraw of more than available |
Only the deployer can withdraw dex storage |
dex_storage_withdraw by someone other than the DEX’s deployer |
| Message |
Cause |
Only the trusted code deployer can deploy dex code |
deploy_dex_code by another account |
Only the trusted code deployer can transfer this permission |
set_trusted_code_deployer by another account |
Only authorized accounts can pause the contract |
pause or unpause by another account |