Configuration
Before running the scripts, ensure that the 2 environment variables are set for the target network in the.env file:
Deployment Scripts
Although all the scripts are part of the same super script contract, it contains different scripts for convenience. These scripts will be covered in the next section.Supported Solidity scripts
allowlistsDeployment
Deploys Y Token and Deployer AllowList contracts.
ALTBCFactoryDeployment
Deploys the ALTBC PoolFactory.
TokenDeployment
Deploys x and y tokens.
ALTBCPoolDeployment
Deploys and cofigures the whole suite of contracts starting from the ALTBC PoolFactory, going through x and y tokens, configuring the factory, and finally deploying a pool with this pair through the factory. Notice that the pool will be already initialized and ready for swaps.
ALTBCFactoryDeploymentConfig
Deploys the ALTBC PoolFactory with already deployed tokens and allowlists. It requires to set the corresponding variables in the .env file.
ALTBCPoolConfigDeployment
Creates pool with already deployed factory and tokens. It requires to set the corresponding variables in the .env file.
The following is an env example. Notice that this example is built for the case where both types of TBCs are going to be deployed. If only one type is desired, simply skip the variables that are not necessary for your case:
Running a script
The general format for running deployments is:deploy folder that can get you quickly started so long as you define the correct environment variables. Or you can run the ALTBCPoolDeployment script to deploy the whole suite of contracts and get started immediately.