From 771709ff19801b1052e8c2ddb514a3409a12c85a Mon Sep 17 00:00:00 2001 From: wk0 <9341565+wk0@users.noreply.github.com> Date: Fri, 5 Aug 2022 19:46:38 -0400 Subject: [PATCH 1/2] Update makefile deploy-rinkeby In .env.example, variable for etherscan api key is ETHERSCAN_KEY, while in the makefile it is ETHERSCAN_API_KEY. Adjust makefile to use ETHERSCAN_KEY so script can run using the key specified in the .env file --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d927c4c..f543836 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ lint :; solhint src/**/*.sol && solhint src/*.sol anvil :; anvil -m 'test test test test test test test test test test test junk' # use the "@" to hide the command from your shell -deploy-rinkeby :; @forge script script/${contract}.s.sol:Deploy${contract} --rpc-url ${RINKEBY_RPC_URL} --private-key ${PRIVATE_KEY} --broadcast --verify --etherscan-api-key ${ETHERSCAN_API_KEY} -vvvv +deploy-rinkeby :; @forge script script/${contract}.s.sol:Deploy${contract} --rpc-url ${RINKEBY_RPC_URL} --private-key ${PRIVATE_KEY} --broadcast --verify --etherscan-api-key ${ETHERSCAN_KEY} -vvvv # This is the private key of account from the mnemonic from the "make anvil" command deploy-anvil :; @forge script script/${contract}.s.sol:Deploy${contract} --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast From dc0d2f88475c52a5547e3f2d750f6ec1aa682716 Mon Sep 17 00:00:00 2001 From: wk0 <9341565+wk0@users.noreply.github.com> Date: Fri, 5 Aug 2022 20:01:13 -0400 Subject: [PATCH 2/2] Rm --broadcast which impairs verification See this issue: https://github.com/foundry-rs/foundry/issues/2435 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f543836..a80c65f 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ lint :; solhint src/**/*.sol && solhint src/*.sol anvil :; anvil -m 'test test test test test test test test test test test junk' # use the "@" to hide the command from your shell -deploy-rinkeby :; @forge script script/${contract}.s.sol:Deploy${contract} --rpc-url ${RINKEBY_RPC_URL} --private-key ${PRIVATE_KEY} --broadcast --verify --etherscan-api-key ${ETHERSCAN_KEY} -vvvv +deploy-rinkeby :; @forge script script/${contract}.s.sol:Deploy${contract} --rpc-url ${RINKEBY_RPC_URL} --private-key ${PRIVATE_KEY} --verify --etherscan-api-key ${ETHERSCAN_KEY} -vvvv # This is the private key of account from the mnemonic from the "make anvil" command deploy-anvil :; @forge script script/${contract}.s.sol:Deploy${contract} --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast