Skip to content

Commit

Permalink
Highlight need for Etherscan api keys in README and config examples (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cgewecke committed Aug 17, 2024
1 parent 23c65c2 commit 9db2e71
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const config: HardhatUserConfig = {

+ Option setups for common and advanced use cases can be seen in the [Config Examples][2] docs.
+ Get a [free tier Coinmarketcap API key][3] if you want price data
+ (Also) get [free tier Etherscan API keys](#supported-networks) if you want price data for Ethereum mainnet or an L2 network.

| Options | Type | Default | Description |
| :------------------------------ | :--------: | :--------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Expand Down Expand Up @@ -140,11 +141,13 @@ npx hardhat hhgas:merge "gasReporterOutput-*.json"

API keys for the networks this plugin auto-configures via the `L1` and `L2` options are available from the links below. In many cases these aren't equired - you'll only need to set them if you start seeing rate-limit warnings.

:warning: **UPDATE:** Etherscan now requires api keys to fetch both L1 (Ethereum Mainnet) **and** L2 gas price data. (An example config [can be found here][2])

**L2**

+ [arbitrum][113] (live `baseFeePerByte` prices require an API key)
+ [base][110] (live `blobBaseFee` prices require an API key)
+ [optimism][109] (live `blobBaseFee` prices require an API key)
+ [arbitrum][113] (live `baseFeePerByte` prices require an L2 API key )
+ [base][110] (live `blobBaseFee` prices require an L2 API key)
+ [optimism][109] (live `blobBaseFee` prices require an L2 API key)

**L1**

Expand Down
14 changes: 13 additions & 1 deletion docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@

Some example gas reporter option settings for different use-cases

### Ethereum Mainnet

*...with live market pricing*
```ts
const config: HardhatUserConfig = {
gasReporter: {
L1Etherscan: "ABC...", // Etherscan api key
coinmarketcap: "abc...", // Coinmarketcap api key
}
}
```

### L1 Network

*...on a non-ethereum network with very low costs*
Expand All @@ -33,7 +45,7 @@ const config: HardhatUserConfig = {
const config: HardhatUserConfig = {
gasReporter: {
L2: "optimism",
L1Etherscan: "ABC...",
L1Etherscan: "ABC...", // Requires api keys for both Ethereum Mainnet and Optimism
L2Etherscan: "ABC...",
currency: "EUR",
coinmarketcap: "abc...",
Expand Down

0 comments on commit 9db2e71

Please sign in to comment.