Skip to content

Commit

Permalink
update hardhat instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelle committed Nov 17, 2023
1 parent c7c8d36 commit 017ae81
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/content/docs/en/developers/verifying-smart-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ Most smart contract tooling has plugins for verifying your contracts easily on E
| Scrollscan | https://api.scrollscan.com/api | https://api-sepolia.scrollscan.com/api |
| Blockscout | https://blockscout.scroll.io/api | https://sepolia-blockscout.scroll.io/api |

<Aside type="tip" title="Using the Scrollscan API">
When using Scrollscan, you will need to [register an account](https://scrollscan.com/register) and create an API key. The same key can be used for both Scroll Sepolia and mainnet. After creating your API key, please wait a few minutes before it comes into effect.
</Aside>

### Hardhat

First, modify `hardhat.config.ts` to point to Scroll's RPC and `sepolia-blockscout.scroll.io/api`. A dummy `apiKey` value is required, but anything works for its value.
Modify `hardhat.config.ts` to point to Scroll's RPC and block explorer API. For Blockscout, a dummy `apiKey` value is required, but anything works for its value. For Scrollscan, use your own API key.

For example, if you are using Scroll Sepolia on Blockscout, your config will look like this:
```javascript
...

Expand Down Expand Up @@ -95,8 +100,6 @@ Refer to the [Foundry documentation](https://book.getfoundry.sh/reference/forge/

#### Scrollscan

You will need to [register an account](https://scrollscan.com/register) to create an API key. The same key can be used for both Scroll Sepolia and mainnet. After creating your API key, please wait a few minutes before it comes into effect.

```bash
forge verify-contract <contract address> <contract name> \
--verifier-url https://api-sepolia.scrollscan.com/api \
Expand Down

0 comments on commit 017ae81

Please sign in to comment.