# BurnHook error reference

<!-- GENERATED by burnHook-web/scripts/gen-agent-assets.mjs — do not edit by hand. -->

When a call reverts, the node returns revert data whose first 4 bytes are the error selector.
Look the selector up below. The same table is available as JSON under `errors` in
`assets/contracts.json`.

Rules:

- **Simulate first.** Run every transaction through `eth_call` (same `from`, `to`, `data`, `value`)
  before sending. A revert in simulation costs nothing; a revert on-chain costs gas.
- **Do not blind-retry.** Each row says what to do. If the action says "Stop" or "Do not retry",
  report the reason to the user instead of sending again.
- **Nested errors.** Swaps go through the Uniswap V4 PoolManager, which wraps a hook revert in
  `WrappedError(address target, bytes4 selector, bytes reason, bytes details)` (`0x90bfb865`).
  ABI-decode it and look up the first 4 bytes of `reason`.
- Plain string reverts (`Error(string)`, selector `0x08c379a0`) only occur for constructor/setup
  checks such as `"bad tokenIn"` or `"zero burn"`; the string explains itself.

| Selector | Error | Raised by | Meaning | What the agent should do |
|---|---|---|---|---|
| `0xa4420a95` | `Soulbound()` | Binance Agent ID (SPACE ID) | Agent ID NFTs cannot be transferred or approved. | Do not try to move an Agent ID between wallets. |
| `0x475a2535` | `AlreadyFinalized()` | BurnHook | finalize() already succeeded. | Nothing to do. Read Lens.protocolState(). |
| `0x0a85dc29` | `HookNotImplemented()` | BurnHook | A hook callback that this hook does not implement was invoked. | Not an agent action. |
| `0x7e3f64de` | `InitNotAllowed()` | BurnHook | Only the hook itself may initialize a pool using this hook. | Do not try to create another pool with this hook. |
| `0x8f4e75b2` | `LiquidityLocked()` | BurnHook | Nobody can add liquidity to this pool; the only position is the permanently locked one. | Do not try to add liquidity. Not supported by design. |
| `0xc4225078` | `NotBurnToken()` | BurnHook | Caller is not the BurnToken. | Not an agent action. |
| `0xae18210a` | `NotPoolManager()` | BurnHook, WrappedXBurn, BurnSwapRouter | unlockCallback may only be called by the Uniswap V4 PoolManager. | Not an agent action. Never call unlockCallback directly. |
| `0xeb7ba8ea` | `NotSuccess()` | BurnHook | finalize() called before 14,000 mints were reached. | Only call when phase is 2 (MINT_SUCCESS). |
| `0x5274afe7` | `SafeERC20FailedOperation(address)` | BurnHook, XBurn, WrappedXBurn, BurnSwapRouter | An ERC20 transfer inside the call failed (usually missing allowance or balance). | Check balance and allowance for the token in the error argument. |
| `0xe09f0331` | `TradingNotOpen()` | BurnHook, XBurn | A swap was attempted before the TRADING phase, or an xBURN deposit before finalize. | Swaps: wait until block.number >= Lens.protocolState().tradingStartBlock (phase 4). xBURN deposits: allowed from phase 3; wait for finalize. |
| `0x26376987` | `BadRouter()` | BurnHookLens | The address is not the BurnSwapRouter of this deployment. | Not an agent action. |
| `0x1057760f` | `BadWxBurn()` | BurnHookLens | The address is not the WrappedXBurn of this deployment. | Not an agent action. |
| `0xe42bc6f5` | `BonderNotSet()` | BurnHookLens, BurnToken | The hook (bonder) has not been set on BurnToken yet. | The protocol is not fully deployed. Stop. |
| `0x7bfa4b9f` | `NotAdmin()` | BurnHookLens | Only the Lens admin may register the periphery, once. | Not an agent action. |
| `0x1bee0d5a` | `NotFinalized()` | BurnHookLens, BurnSwapRouter | The pool does not exist yet (finalize has not happened). | Wait for finalize. Read Lens.protocolState().finalized. |
| `0x203d82d8` | `Expired()` | BurnSwapRouter | The deadline passed before the swap was mined. | Retry with a fresh deadline (now + a few minutes), after re-simulating. |
| `0xd92e233d` | `ZeroAddress()` | BurnSwapRouter | A zero address was supplied. | Pass a valid recipient. |
| `0x41aaf0fd` | `AgentIdRequired()` | BurnToken | The wallet does not hold a Binance Agent ID (.ai soulbound NFT). | Do not retry. The user must obtain an Agent ID for this exact wallet first; it cannot be transferred or borrowed. |
| `0xacf04168` | `AlreadyBonded()` | BurnToken | The token has already been bonded. | Nothing to do; finalize already happened. |
| `0x1fa27dcf` | `AlreadyBonderSet()` | BurnToken | setBonder() was already called. | Not an agent action. |
| `0x1fbde445` | `AlreadyStarted()` | BurnToken | startMint() was already called. | Not an agent action. |
| `0xfb8f41b2` | `ERC20InsufficientAllowance(address,uint256,uint256)` | BurnToken, XBurn, WrappedXBurn | Allowance is lower than the amount. | Send approve(spender, amount) first and wait for it to be mined. |
| `0xe450d38c` | `ERC20InsufficientBalance(address,uint256,uint256)` | BurnToken, XBurn, WrappedXBurn | Token balance is lower than the amount. | Read the balance and use an amount <= balance. |
| `0xe602df05` | `ERC20InvalidApprover(address)` | BurnToken, XBurn, WrappedXBurn | Invalid approver (zero address). | Not expected in normal use. |
| `0xec442f05` | `ERC20InvalidReceiver(address)` | BurnToken, XBurn, WrappedXBurn | Invalid receiver (zero address). | Pass a valid recipient. |
| `0x96c6fd1e` | `ERC20InvalidSender(address)` | BurnToken, XBurn, WrappedXBurn | Invalid sender (zero address). | Not expected in normal use. |
| `0x94280d62` | `ERC20InvalidSpender(address)` | BurnToken, XBurn, WrappedXBurn | Invalid spender (zero address). | Pass a valid spender. |
| `0xd6bda275` | `FailedCall()` | BurnToken, BurnSwapRouter | A low-level native transfer failed. | The recipient cannot receive BNB. |
| `0xf4d678b8` | `InsufficientBalance()` | BurnToken | Refund amount exceeds the wallet BURN balance. | Use Lens.position(wallet).refundableBurn as the amount. |
| `0xcf479181` | `InsufficientBalance(uint256,uint256)` | BurnToken, BurnSwapRouter | The contract lacks native balance for a transfer. | Not expected in normal use; report it. |
| `0x2c5211c6` | `InvalidAmount()` | BurnToken | Refund amount is zero or not a multiple of 1,000 BURN (1000e18). | Use Lens.position(wallet).refundableBurn as the amount. |
| `0x5963c6e2` | `InviterNotQualified()` | BurnToken | The inviter has minted fewer than 10 times. | Check BurnToken.canInvite(inviter). Ask the user for another inviter, or wait until this one qualifies. |
| `0xc33d31da` | `InviterRequired()` | BurnToken | First mint from this wallet and no inviter was passed. | Pass a qualified inviter address (one with canInvite == true). Ask the user for their referral address. |
| `0x49084b94` | `MintEnded()` | BurnToken | The 3-day mint window has passed without filling. | Stop minting. The phase is MINT_FAILED; use the refund recipe if the wallet holds BURN. |
| `0xeb09b888` | `MintNotEnded()` | BurnToken | checkTimeout() called before the 3-day deadline. | Wait until block.timestamp >= mintDeadline. |
| `0x6e992686` | `NoReward()` | BurnToken | Nothing to withdraw. | Check referralReward(wallet) / devReward() before calling. |
| `0x4ee5517e` | `NotBonder()` | BurnToken | Only BurnHook may call bondingFinalize(). | Call BurnHook.finalize() instead, never BurnToken.bondingFinalize(). |
| `0x8b906c97` | `NotDeployer()` | BurnToken | Only the deployer may call this, and only before the mint opens. | Not an agent action. Do not call. |
| `0x7d7c2937` | `NotFailed()` | BurnToken | refund() called but the mint has not failed. | Refunds exist only in phase 5 (MINT_FAILED). |
| `0x803a336f` | `NotMinting()` | BurnToken | Mint is not open: the phase is not MINTING (not started yet, or already succeeded). | Read Lens.protocolState().phase. Do not retry until the phase is 1 (MINTING). |
| `0x3ee5aeb5` | `ReentrancyGuardReentrantCall()` | BurnToken, BurnHook, XBurn, WrappedXBurn, BurnSwapRouter | Re-entrant call blocked. | Not expected from an EOA. Do not call from inside a callback. |
| `0x3c790c7c` | `RewardNotAvailable()` | BurnToken | Referral or dev rewards are locked (still MINTING) or voided (MINT_FAILED). | Only withdraw in phase 2, 3 or 4. In MINT_FAILED rewards are gone; do not retry. |
| `0xe7fc1dd6` | `SelfInvite()` | BurnToken | The inviter is the minting wallet itself. | Use a different, qualified inviter. |
| `0x52df9fe5` | `SoldOut()` | BurnToken | All 14,000 mints are taken. | Stop. Minting is over. |
| `0x90b8ec18` | `TransferFailed()` | BurnToken | A native-token transfer failed. | The recipient cannot receive BNB. Use an EOA or a contract with a payable receive. |
| `0xdb89e3f4` | `TransfersLocked()` | BurnToken | BURN cannot be transferred before the TRADING phase. The one exception is burning into xBURN during the cooldown (phase 3). | Wait for phase 4. This also blocks transferFrom and any swap before trading opens. Before finalize (phases 1 and 2) even burning into xBURN is locked. |
| `0x5426a580` | `WalletLimit()` | BurnToken | The wallet already minted MAX_MINTS_PER_WALLET (100) times. | Stop. This wallet cannot mint more. |
| `0x98d4901c` | `WrongValue()` | BurnToken | msg.value is not exactly MINT_PRICE. | Send exactly Lens.constants().mintPrice wei (0.005 BNB) per mint call. One call = one mint. |
| `0x90bfb865` | `WrappedError(address,bytes4,bytes,bytes)` | Uniswap V4 PoolManager | A hook call reverted during a swap. The real error is nested: the third field (`reason`) holds the hook's revert data — decode its first 4 bytes with this table (usually TradingNotOpen()). | Decode the nested selector and follow that row. |
| `0x5589b7d3` | `NoDividend()` | WrappedXBurn | The vault has no dividend to compound. | Check Lens.protocolState().vaultPendingDividend first; only call when it covers gas. |
| `0x7dd37f70` | `Slippage()` | WrappedXBurn, BurnSwapRouter | Output is below the minimum (your minOut, or the on-chain 2% spot check when compounding). | Re-simulate with eth_call to get the current output, recompute minOut, and retry. Consider a smaller amount. |
| `0x79012fb2` | `ERC4626ExceededMaxDeposit(address,uint256,uint256)` | XBurn, WrappedXBurn | Deposit exceeds the vault maximum. | Use a smaller amount. |
| `0x284ff667` | `ERC4626ExceededMaxMint(address,uint256,uint256)` | XBurn, WrappedXBurn | Mint exceeds the vault maximum. | Use a smaller amount. |
| `0xb94abeec` | `ERC4626ExceededMaxRedeem(address,uint256,uint256)` | XBurn, WrappedXBurn | Redeem exceeds what the owner can redeem. On xBURN this is always the case: xBURN is NOT redeemable for BURN. | On wxBURN use shares <= balanceOf(owner). Never call redeem/withdraw on xBURN. |
| `0xfe9cceec` | `ERC4626ExceededMaxWithdraw(address,uint256,uint256)` | XBurn, WrappedXBurn | Withdraw exceeds what the owner can withdraw. On xBURN this is always the case. | On wxBURN use previewRedeem / maxWithdraw. Never call redeem/withdraw on xBURN. |
| `0xc72cfc38` | `NotHook()` | XBurn | Only BurnHook may notify dividends. | Not an agent action. |
| `0x1f2a2005` | `ZeroAmount()` | XBurn, BurnSwapRouter | Amount is zero. | Pass a non-zero amount. For xBURN claim(), 1 (one wei) is enough to collect all pending dividends. |
