feat: Deploy on mainnet

Also update executors.json with uniswap v2 address on mainnet

--- don't change below this line ---
ENG-4101 Took 22 minutes


Took 7 seconds
This commit is contained in:
Diana Carvalho
2025-02-24 17:45:25 +00:00
parent 02a9da183e
commit 34563c3eb7
7 changed files with 39 additions and 34 deletions

View File

@@ -1,6 +1,7 @@
# How to deploy
- Install dependencies `npm install`
- `cd foundry`
## Deploy on a Tenderly fork
@@ -8,24 +9,38 @@
2. Set the following environment variables:
```
export TENDERLY_RPC_URL=<fork-rpc-from-tenderly>
export RPC_URL=<fork-rpc-from-tenderly>
export DEPLOY_WALLET=<wallet-address>
export PRIVATE_KEY=<private-key>
```
3. Fund wallet: `npx hardhat run scripts/fund-wallet-tenderly-fork.js --network tenderly`
### Deploy Tycho Router
## Deploy on mainnet
1. Deploy router: `npx hardhat run scripts/deploy-router.js --network tenderly`
1. Set the following environment variables:
```
export RPC_URL=<mainnet-rpc-url>
export DEPLOY_WALLET=<wallet-address>
export PRIVATE_KEY=<private-key>
```
Make sure to run `unset HISTFILE` in your terminal before setting the private key. This will prevent the private key
from being stored in the shell history.
## Deploy Tycho Router
1. Deploy router: `npx hardhat run scripts/deploy-router.js --network tenderly/mainnet`
2. Define the accounts to grant roles to in `scripts/roles.json`
3. Export the router address to the environment variable `export ROUTER=<router-address>`
4. Grant roles: `npx hardhat run scripts/set-roles.js --network tenderly`
5. Set executors: `npx hardhat run scripts/set-executors.js --network tenderly`. Make sure you change the DEPLOY_WALLET
4. Grant roles: `npx hardhat run scripts/set-roles.js --network tenderly/mainnet`
5. Set executors: `npx hardhat run scripts/set-executors.js --network tenderly/mainnet`. Make sure you change the
DEPLOY_WALLET
to the executor deployer wallet. If you need to deploy executors, follow the instructions below.
### Deploy executors
1. In `scripts/deploy-executors.js` define the executors to be deployed
2. Deploy executors: `npx hardhat run scripts/deploy-executors.js --network tenderly`
2. Deploy executors: `npx hardhat run scripts/deploy-executors.js --network tenderly/mainnet`
3. Fill in the executor addresses in `scripts/executors.json`