feat: add "[etherscan]" and "[rpc_endpoints]" configuration

docs: update deployment script usage in README
feat: add "INFURA_API_KEY", "ETHERSCAN_API_KEY"
refactor: replace "PRIVATE_KEY" with "MNEMONIC"
This commit is contained in:
Paul Razvan Berg 2023-01-08 22:15:38 +02:00
parent 3b962e32b8
commit 53d045743d
No known key found for this signature in database
GPG Key ID: BCC366159BD63828
3 changed files with 11 additions and 4 deletions

View File

@ -1,2 +1,4 @@
export ETH_RPC_URL="https://sepolia.infura.io/v3/INFURA_API_KEY"
export PRIVATE_KEY="YOUR_PRIVATE_KEY"
ETH_RPC_URL="https://goerli.infura.io/v3/INFURA_API_KEY"
ETHERSCAN_API_KEY="YOUR_ETHERSCAN_API_KEY"
INFURA_API_KEY="YOUR_INFURA_API_KEY"
MNEMONIC="YOUR_MNEMONIC"

View File

@ -139,8 +139,7 @@ $ forge coverage
Deploy to Anvil:
```sh
$ forge script script/Foo.s.sol:FooScript --fork-url http://localhost:8545 \
--broadcast --private-key $PRIVATE_KEY
$ forge script script/Foo.s.sol --broadcast --fork-url http://localhost:8545
```
For instructions on how to deploy to a testnet or mainnet, check out the

View File

@ -1,5 +1,8 @@
# Full reference https://github.com/foundry-rs/foundry/tree/master/config
[etherscan]
goerli = { key = "${ETHERSCAN_API_KEY}" }
[fmt]
bracket_spacing = true
int_types = "long"
@ -27,3 +30,6 @@ test = "test"
fuzz = { runs = 10_000 }
verbosity = 4
[rpc_endpoints]
localhost="http://localhost:8545"
goerli="https://goerli.infura.io/v3/${INFURA_API_KEY}"