Deploy a Well
Well Deployer CLI Tool
Step by step guide to deploy a new Well
1. Obtain the addresses of the components to be used in the new Well.
2. Encode the calldata
async function encodeInitFunctionCall(wellImplementationAbi, wellName, wellSymbol) {
const wellInterface = new hre.ethers.Interface(wellImplementationAbi)
// function name, symbol
return wellInterface.encodeFunctionData('init', [wellName, wellSymbol]);
}
// Example usage
const wellImplementationAbi = "<ABI-FROM-ETHERSCAN>";
const wellName = "wETH:wBTC Constant Product 2 well";
const wellSymbol = "wETHwBTCCP2w";
const initFunctionCall = await encodeInitFunctionCall(wellImplementationAbi, wellName, wellSymbol);3. Choose a salt for deterministic address generation.
4. Call the boreWell function on the Aquifer contract with the encoded data as parameters.
Last updated