Requirements
Before creating a pool, you’ll need the addresses of tokens you want to include in your pool and tokens to join the pool.Example: creating a weighted pool
In this example, we’ll create a 50/50 HONEY-WBTC weighted pool using Ethers.js. Following pool creation, the pool will be joined with 1 HONEY and 0.0001 WBTC.Step 1 - approve the PoolCreationHelper
The PoolCreationHelper must be approved as a relayer in the Vault contract:Step 2 - approve tokens
The Vault contract needs approval to spend your tokens:Step 3 - create and join pool
Finally, create and join the pool in a single transaction. We leverage the functioncreateAndJoinWeightedPool.