Skip to main content

Events & errors

The covenant lifecycle events are a frozen contract: indexers and the frontend depend on them, so their signatures do not change. Index the queue address to capture the full lifecycle.

Covenant lifecycle events (frozen)

Emitted by CovenantQueue:

event CovenantCreated(
uint256 indexed id,
address indexed seller,
uint256 tokenAmount,
uint256 ethValueAtCreation,
uint256 discountBps,
uint256 expiresAt
);
event CovenantAbsorbed(uint256 indexed id, address indexed buyer, uint256 tokenAmount, uint256 ethPaid);
event CovenantFullyAbsorbed(uint256 indexed id);
event CovenantExpired(uint256 indexed id, uint256 tokenAmount, uint256 ethPaired, uint8 destination);
  • CovenantCreated — a sell created a covenant. Carries the frozen discount and expiry.
  • CovenantAbsorbed — a buy filled part (or all) of a covenant.
  • CovenantFullyAbsorbed — a covenant reached zero remaining debt.
  • CovenantExpired — a matured covenant was settled. destination is 0 (locked LP) or 1 (protocol reserve).

Hook events

Emitted by CovenantHook:

event CovenantPoolBound(bytes32 indexed poolId, address indexed token);
event LiquiditySeeded(address indexed seeder, uint256 ethAmount, uint256 tokenAmount);
event TaxCollected(address indexed payer, bool isBuy, uint256 ethAmount);
event ReserveUpdated(uint256 covenantReserveTokens, uint256 covenantReserveETH, uint256 totalActiveCovenants);
event CreatorTaxFlushed(address indexed creator, uint256 ethAmount); // additive (not part of the frozen set)

Custom errors

Each contract reverts with typed errors rather than strings.

CovenantHook

error ExactOutputNotSupported(); error PoolAlreadyBound(); error PoolNotBound();
error UnknownPool(); error ZeroAmount(); error ExternalLiquidityBlocked();
error Unauthorized(); error AlreadySeeded(); error InvalidPoolKey();
error EthTransferFailed(); error TokenTransferFailed();

CovenantQueueUnauthorized, InvalidCovenant, AlreadyInitialized, NotMature.

CovenantVaultUnauthorized, AlreadyInitialized.

CovenantRouterNotPoolManager, Slippage, ZeroAmount, Reentrancy, EthTransferFailed, TokenTransferFailed.

CovenantTokenZeroAddress, InsufficientBalance, InsufficientAllowance.

CovenantMathInvalidBps, EmptyReserves.

Exact-output is unsupported

ExactOutputNotSupported means the hook only serves exact-input swaps. Integrators must build exact-input trades.