Guides
Last updated
These guides show how to use the Mento SDK v3 for Mento V3: FPMM pools, oracles, route caching, liquidity, and CDP borrowing. The SDK is service-based: after Mento.create(ChainId.CELO) you use mento.tokens, mento.pools, mento.routes, mento.quotes, mento.swap, mento.trading, mento.liquidity, and mento.borrow.
Discover tokens, pools (with pricing, fees, rebalancing, limits), routes (cached or fresh), and trading status (circuit breaker, limits).
Get expected swap output with mento.quotes.getAmountOut (or amount in for exact out).
Build swap and approval transactions with mento.swap.buildSwapTransaction and send with a viem wallet.
Add/remove liquidity to FPMM pools; zap in (single token → LP) and zap out (LP → single token); get LP token balance.
Open, adjust, close troves; read trove data and system params; predict upfront fee before opening; build transactions for your viem wallet.
All guides assume you have created a client as in Installation. For runnable code, see mento-sdk-examples.
Last updated