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
- Clone this repo & install dependencies
git clone https://github.com/balancer/pool-operation-examples-v3.git
cd pool-operation-examples-v3
pnpm install
- Add a
MAINNET_RPC_URL
to a.env
file
MAINNET_RPC_URL=
- Run an example script
npx hardhat run scripts/hardhat/add-liquidity/addLiquidityProportional.ts