CCIP v2.0.0 ILockBox API Reference

Summary

ILockBox defines the minimal interface for a lockbox contract that custody-holds ERC20 tokens for lock/release style CCIP token pools.

Lockboxes are used to:

  • Accept deposits during outbound transfers.
  • Release tokens during inbound transfers.
  • Decouple liquidity custody from pool execution logic.

Contract

chains/evm/contracts/interfaces/ILockBox.sol


Import

import {ILockBox} from "chainlink-ccip/chains/evm/contracts/interfaces/ILockBox.sol";

Interface surface

interface ILockBox {

deposit

function deposit(
  address token,
  uint64 remoteChainSelector,
  uint256 amount
) external;

withdraw

function withdraw(
  address token,
  uint64 remoteChainSelector,
  uint256 amount,
  address recipient
) external;

isTokenSupported

function isTokenSupported(
  address token
) external view returns (bool);

}

Integration notes / expectations

  • Implementations should restrict deposit and withdraw to authorized callers.
  • token validation must be enforced by the concrete implementation.
  • remoteChainSelector may be used for siloed or per-lane accounting.
  • withdraw may treat type(uint256).max as a full-balance sentinel depending on implementation.

Get the latest Chainlink content straight to your inbox.