Skip to Content
DevelopersError CodesCodesRPCBaseContract call failed

Contract call failed

Code

RPC/BASE/CONTRACT_CALL_FAILED

What it means

The contract call reached the chain/VM, but the VM returned a failure (contract runtime error, revert-like behavior, invalid arguments, authorization failure, etc.).

When it happens

  • The chain/VM reports an error for a contract call (e.g. m_call error).

Typical scenarios:

  • A contract function rejects input (invalid args, invalid address, invalid realm id).
  • The contract state does not allow the operation (not enough balance, forbidden action).
  • The VM or node returns an execution error (panic, gas error, internal failure).

How to handle

  • Log:
    • meta.via (must include the contract signature like <pkg>.<func>)
    • meta.params (safe request parameters)
    • meta.contractError (if available)
    • meta.txHash (if available)
  • Client UX:
    • If it’s likely user-driven (bad input / forbidden), show a clear actionable message.
    • If it’s transient (node/VM instability), show a generic retry suggestion.

Example

import { AppError, AppErrorCodes } from '@aina/shared-common'; throw new AppError({ code: AppErrorCodes.RPC.BASE_CONTRACT_CALL_FAILED, message: 'Contract call failed', status: 500, meta: { via: ['rpc.base.call', 'gno.land/r/akkadia/personal_world.CreateWorld'], params: { /* safe args */ }, txHash: '...', contractError: '...' } });
Last updated on
Docsv1.0.10