Skip to content

balancer/balancer-v3-sdk-examples

Repository files navigation

Balancer v3 SDK Examples

A collection of example scripts that illustrate how to use the Balancer SDK to create pools, swap tokens, add liquidity, and remove liquidity. Everything is configured to run on a local fork of Ethereum mainnet and use the Balancer Aave Lido wETH-wstETH pool

Getting Started

  1. Clone this repo & install dependencies
git clone https://github.com/balancer/balancer-v3-sdk-examples
cd balancer-v3-sdk-examples
pnpm install
  1. Add a MAINNET_RPC_URL to a .env file
MAINNET_RPC_URL=
  1. Run an example script
npx hardhat run scripts/add-liquidity/addLiquidityProportional.ts

Example Scripts

Create Pool

Swap Tokens

Add Liquidity

Remove Liquidity

About

Use the balancer sdk to perform pool operations using typescript

Resources

Stars

Watchers

Forks

Releases

No releases published