Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight need for Etherscan api keys in README and config examples #241

Merged
merged 2 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading