Skip to main content
Pre-Release Documentation

This describes a pre-release version of LBAMM. Interfaces and behavior may change.

Verify the exact repository commit before building production integrations.

Using LBAMM with Foundry

This guide shows how to install and import LBAMM repositories in a Foundry project.

You can install:

  • lbamm-core (interfaces and core logic)
  • lbamm-hooks-and-handlers (standard hook registry and transfer handlers)
  • One or more pool-type repositories:
    • lbamm-pool-type-fixed
    • lbamm-pool-type-single-provider
    • amm-pool-type-dynamic

Install exactly the repositories your project needs.


Installing repositories​

Core only​

If you only need core interfaces or shared types:

forge install limitbreakinc/lbamm-core

Hooks and handlers​

If you need the Creator Hook Settings Registry, AMM standard hook, or transfer handlers:

forge install limitbreakinc/lbamm-hooks-and-handlers

Note: lbamm-hooks-and-handlers repository includes lbamm-core as a submodule.


Pool types​

If you are building against a specific pool implementation:

forge install limitbreakinc/lbamm-pool-type-fixed

or

forge install limitbreakinc/lbamm-pool-type-single-provider

or

forge install limitbreakinc/amm-pool-type-dynamic

Note: Pool type repositories include lbamm-hooks-and-handlers as a submodule.


Remappings​

You must configure remappings so that @limitbreak/* imports resolve correctly.

There are two valid patterns depending on how you installed dependencies.


Pattern A — Using nested dependencies from a pool-type repo​

If you only installed a pool-type repository and want to use its nested hooks-and-handlers and lbamm-core, point remappings at the nested paths.

Example for lbamm-pool-type-fixed:

@limitbreak/lbamm-pool-type-fixed/=lib/lbamm-pool-type-fixed/
@limitbreak/lbamm-hooks-and-handlers/=lib/lbamm-pool-type-fixed/lib/lbamm-hooks-and-handlers/
@limitbreak/lbamm-core/=lib/lbamm-pool-type-fixed/lib/lbamm-hooks-and-handlers/lib/lbamm-core/

If using a different pool type, replace the top-level directory accordingly.


Pattern B — Installing repos directly at the top level​

If you installed lbamm-core and/or lbamm-hooks-and-handlers directly into lib/, use shallow remappings:

@limitbreak/lbamm-core/=lib/lbamm-core/
@limitbreak/lbamm-hooks-and-handlers/=lib/lbamm-hooks-and-handlers/
@limitbreak/lbamm-pool-type-fixed/=lib/lbamm-pool-type-fixed/
@limitbreak/lbamm-pool-type-single-provider/=lib/lbamm-pool-type-single-provider/
@limitbreak/amm-pool-type-dynamic/=lib/amm-pool-type-dynamic/

Only include the entries for the repositories you installed.


Example imports​

Once remappings are configured, imports use stable namespace paths.

Import a core hook interface​

import { ILimitBreakAMMTokenHook }
from "@limitbreak/lbamm-core/src/interfaces/hooks/ILimitBreakAMMTokenHook.sol";

Import a transfer handler​

import { PermitTransferHandler }
from "@limitbreak/lbamm-hooks-and-handlers/src/handlers/permit/PermitTransferHandler.sol";

Version pinning​

For reproducible builds, install a specific tag or commit:

forge install limitbreakinc/lbamm-pool-type-fixed@<tag-or-commit>

Limit Break

TwitterLimitBreak.comMedium

© 2026 Limit Break International, Inc. All rights reserved.

Privacy PolicyTerms of ServiceCookie PolicyDo Not Sell My Info