Troubleshooting · First-run help

Fix the common setup failures.

Work through wallet state, agent state, funding, then network config in that order — it catches 95% of first-run issues. Use the checklist at the bottom before digging deeper.

Registration

`AgentIdAlreadyRegistered`

What it means

The agent ID you are trying to claim is already taken on the current contract.

How to fix it

Use a new agent ID, or look up the existing wallet and decide whether you should reuse that identity instead.

On Sepolia, it is normal to hit this if you rerun examples with the same hardcoded IDs.

Registration

`WalletAlreadyRegistered`

What it means

The connected wallet has already registered an agent ID on this contract.

How to fix it

Reuse the existing agent ID for that wallet. In v1, one wallet can register one permanent agent identity.

Do not keep calling registerAgent() with new names on the same wallet.

Funding

`ERC20: transfer amount exceeds balance`

What it means

The payer wallet does not hold enough USDC for the transfer amount.

How to fix it

Fund the payer wallet with Base USDC on the same network you are testing against, then rerun the payment.

If your script prints a sender balance of 0 USDC, this is almost always the issue.

Gas

`insufficient funds for gas`

What it means

The wallet trying to register or pay does not have enough ETH on Base or Base Sepolia to cover gas.

How to fix it

Fund the wallet with a little ETH on the correct network. On Sepolia, both the payer and recipient need gas because both may send transactions.

Agent state

Recipient is not registered

What it means

You are trying to pay an agent ID that does not exist on the current contract.

How to fix it

Register the receiving wallet first, then use that exact agent ID in pay(from, to, amount).

Oryn does not auto-create the recipient identity during payment.

Config

Wrong network or contract address

What it means

Your wallet, RPC URL, USDC address, or ORYN_PAYMENT_CONTRACT_ADDRESS do not belong to the same network.

How to fix it

Double-check chain ID, RPC URL, USDC address, and OrynPayment contract address together. Sepolia values and mainnet values are not interchangeable.

Note: the OrynPayment address is the same on mainnet and Sepolia — intentional (deterministic deployment). Set chainId to 8453 for mainnet or 84532 for Sepolia.

Quick checklist

Check these before you debug deeper

Wallets and agents

  • Is the payer wallet connected to the network you expect?
  • Does the payer already have an agent ID you should reuse?
  • Is the recipient registered on this exact contract?
  • Are you accidentally trying to reuse a hardcoded example ID?

Funding and config

  • Does the payer have enough USDC for the payment?
  • Do both wallets have enough ETH for gas?
  • Is ORYN_PAYMENT_CONTRACT_ADDRESS correct for the network?
  • Are you using Base Sepolia values when you think you are testing?