This repository contains a deployment script for the orbit protocol, providing functionalities for initializing, deploying, and managing various contract operations. The main entry point for the functionality is the deploy script, which guides the user through various actions using a command-line interface (CLI).
The script uses a configuration file to manage network-specific settings and credentials. Ensure that you create a <selected network>.contracts.json
file with the following content:
{
"contracts": {
"backstop": "address",
"poolFactory": "address",
"treasury": "address",
"pegkeeper": "address",
"bridgeOracle": "address",
"router": "address"
},
"tokens": {}
}
npm run build
node lib/deploy/deploy.js
- Initialize Orbit: Initializes the orbit with the given oracle address.
- Parameters:
oracle_address
- Parameters:
- Deploy Token: Deploys a new token contract.
- Parameters:
token_name
- Parameters:
- Deploy Pool: Deploys a new pool with the specified parameters.
- Parameters:
pool_name
,backstop_take_rate
,max_positions
- Parameters:
- Pool Options: Manage pool-specific operations such as setting reserves, emissions, and statuses.
- Sub-options:
Set reserve
,Set emissions
,Add to backstop
,Set status
,Add to Reward Zone
,Set Admin
- Sub-options:
- Treasury Options: Manage treasury-specific operations like adding stablecoins, increasing supply, setting pegkeeper, and setting admin.
- Sub-options:
Add Stablecoin
,Increase Supply
,Set Pegkeeper
,Set Treasury Admin
- Sub-options:
- Bridge Oracle Options: Manage bridge oracle-specific operations like adding assets, getting the last price, and setting the oracle.
- Sub-options:
Add Bridge Oracle Asset
,Get Last Price
,Set Oracle
- Sub-options:
- Set reserve: Set the reserve configuration for a pool.
- Parameters:
token
,reserve_config
- Parameters:
- Set emissions: Set the emissions configuration for a pool.
- Parameters:
poolEmissionMetadata
- Parameters:
- Add to backstop: Add funds to the backstop for a pool.
- Parameters:
backstop_amount
- Parameters:
- Set status: Set the status of a pool.
- Parameters:
status
- Parameters:
- Add to Reward Zone: Add a pool to the reward zone.
- Parameters:
pool_name
,pool_to_remove
- Parameters:
- Set Admin: Set the admin for a pool.
- Parameters:
new_admin
- Parameters:
- Add Stablecoin: Add a new stablecoin to the treasury.
- Parameters:
stablecoin_name
,blend_pool
,asset
- Parameters:
- Increase Supply: Increase the supply of a specified token.
- Parameters:
increase_token_name
,amount
- Parameters:
- Set Pegkeeper: Set the pegkeeper for the treasury.
- Parameters:
pegkeeper
- Parameters:
- Set Treasury Admin: Set the admin for the treasury.
- Parameters:
new_admin
- Parameters:
- Add Bridge Oracle Asset: Add a new asset to the bridge oracle.
- Parameters:
from_asset
,to_asset
- Parameters:
- Get Last Price: Retrieve the last price for an asset from the bridge oracle.
- Parameters:
asset_for_price
- Parameters:
- Set Oracle: Set the oracle address.
- Parameters:
oracle_address
- Parameters: