The purpose of this repo is automate the setup of a local testnet to run the elf-contracts.
npm install
npm run load-contractsnpm run buildThe following actions which will be repeated regularly have custom npm scripts. To prepare to deploy you need to load your private key and alchemy api key into env variables, the linux and mac run the following:
export ALCHEMY_KEY=\YOUR_API_KEY_HERE
export DEPLOYER_PRIVATE_KEY=\YOUR_PRIVATE_KEY_HERETo deploy a new tranche run:
npm run deployTranche -- --network mainnetTo deploy new AMM pools for a tranche run
npm run deployPool -- --network mainnetTo init your pools and set first prices run the following command. We advise that you fund any new pools without many assets and conservative slippage limits to prevent amm sniping bots and other front running attacks that look for new pools in the mempool.
npm run fundPtPool -- --network mainnet
npm run fundYtPool -- --network mainnetTo generate json file for the frontend to process:
sh scripts/postProcess.sh mainnetWhen prompted for the version, enter something like:
Release Version (e.g. vX.X.X:X): v1.0.0-a.1:2The format for the release version is: vMAJOR.MINOR.PATCH:TERMNUM. Where:
vMAJOR.MINOR.PATCHis the corresponding tagged release in the smart contract repoTERMNUMis incremented by 1 each time a new term is released under a tagged release in the smart contract repo.
To run any of these commands on the goerli testnet replace --network mainnet with --network goerli