Skip to content

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 08 Apr 17:47
· 593 commits to main since this release
7a84310

Major Changes

  • 2137cc9: ## Summary
    Using script to automate balancer address and ABI updates as new deployments roll out

    Breaking Changes

    • Contract addresses are now exported through balancerV2Contracts and balancerV3Contracts objects instead of individual exports
    • Contract ABIs follow consistent nameing pattern of contractNameAbi_ProtocolVersion

    How Consumers Should Update

    Address Imports

    Previously you would import addresses like this:

    import {
      BALANCER_BATCH_ROUTER,
      BALANCER_COMPOSITE_LIQUIDITY_ROUTER_BOOSTED,
      BALANCER_ROUTER,
      PERMIT2,
      VAULT_ADMIN,
      VAULT_V3,
    } from "@balancer/sdk";
    
    const routerAddress = BALANCER_ROUTER[chainId];

    Now you should import and use addresses like this:

    import { balancerV2Contracts } from "@balancer/sdk";
    import { balancerV3Contracts } from "@balancer/sdk";
    
    const routerAddressV2 = balancerV2Contracts.Router[chainId];
    const routerAddressV3 = balancerV3Contracts.Router[chainId];

    ABI Imports

    For ABI imports related to balancer V2 and V3 contracts. We have standardized the naming by appending _V2 and _V3 to contractNameAbi

    Example

    import { vaultAbi_V2, vaultAbi_V3 } from "@balancer/sdk";

Patch Changes

  • f0a0416: Only mapPoolType for V2. V3 can use string as given.