From 0fdb3d1d6a2dbac856215c5319eef9a59d241860 Mon Sep 17 00:00:00 2001 From: Fynn Date: Tue, 30 Jan 2024 18:40:43 -0300 Subject: [PATCH] Add instructions for deploying --- .env.dist | 2 +- README.md | 12 ++++++++++++ foundry.toml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.env.dist b/.env.dist index 45eac57..776a53d 100644 --- a/.env.dist +++ b/.env.dist @@ -1,4 +1,4 @@ PRIVATE_KEY= ETHERSCAN_API_KEY= DEFAULT_FEE=2800 -GOERLI_RPC_URL=https://ethereum-goerli.publicnode.com \ No newline at end of file +GOERLI_RPC_URL=https://ethereum-goerli.publicnode.com diff --git a/README.md b/README.md index 43dfbc5..c292eff 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,18 @@ the ownership on the transfer must confirm it with a transaction. - **defaultFeeNumerator**: Set upon deployment and modifiable by the contract owner. - **Eth Withdrawal**: Only the owner can withdraw Eth from the contract. +## Deploying + +Copy and populate `.env.dist` to `.env` in the root directory +To deploy to Goerli, run: + +``` +forge script ./script/FeeRewardsManager.s.sol --verify --broadcast --rpc-url goerli --private-key ${PRIVATE_KEY} +``` + +Switch to `--rpc-url mainnet` making sure the `mainnet` RPC endpoint exists in the `foundry.toml` file. +If deploying with a ledger, instead of `--private-key ${PRIVATE_KEY}`, use `--ledger`. + ## Walkthrough a normal execution Deploy `FeeRewardsManager` as `manager`, then we call diff --git a/foundry.toml b/foundry.toml index e964b4c..e12fb44 100644 --- a/foundry.toml +++ b/foundry.toml @@ -9,4 +9,4 @@ libs = ["lib"] goerli = "${GOERLI_RPC_URL}" [etherscan] -sepolia = { key = "${ETHERSCAN_API_KEY}" } \ No newline at end of file +sepolia = { key = "${ETHERSCAN_API_KEY}" }