Balancer V2 Deployments
This package contains the addresses and ABIs of all Balancer V2 deployed contracts, for Ethereum, Polygon and Arbitrum mainnet, as well as various test networks. Each deployment consists of a deployment script (called 'task'), inputs (script configuration, such as dependencies), outputs (typically contract addresses), and ABIs of related contracts.
Addresses and ABIs can be used consumed from the package in JavaScript environments, or manually retrieved from the GitHub repository.
Note that some protocol contracts are created dynamically: for example, WeightedPool
contracts are deployed by the canonical WeightedPoolFactory
. While the ABIs of these contracts are stored in the abi
directory of each deployment, their addresses are not. Those can be retrieved by querying the on-chain state or processing emitted events.
Overview
Installation
$ npm install @balancer-labs/v2-deployments
Usage
Import @balancer-labs/v2-deployments
to access the different ABIs and deployed addresses. To see all Task IDs and their associated contracts, head to Past Deployments.
- async function getBalancerContract(taskID, contract, network)
Returns an Ethers contract object for a canonical deployment (e.g. the Vault, or a Pool factory).
Note: requires using Hardhat with the hardhat-ethers
plugin.
- async function getBalancerContractAt(taskID, contract, address)
Returns an Ethers contract object for a contract dynamically created at a known address (e.g. a Pool created from a factory).
Note: requires using Hardhat with the hardhat-ethers
plugin.
- async function getBalancerContractAbi(taskID, contract)
Returns a contract's ABI.
- async function getBalancerContractAddress(taskID, contract, network)
Returns the address of a contract's canonical deployment.
- async function getBalancerDeployment(taskID, network)
Returns an object with all contracts from a deployment and their addresses.
Past Deployments