https://github.com/climax-solution/hardhat-optimism
https://github.com/climax-solution/hardhat-optimism
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/climax-solution/hardhat-optimism
- Owner: climax-solution
- License: mit
- Created: 2022-10-12T15:22:38.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-25T13:21:17.000Z (over 2 years ago)
- Last Synced: 2024-03-25T10:46:36.856Z (over 2 years ago)
- Language: TypeScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hardhat-optimism
Hardhat plugin for Optimism Developers.
## Features
OptimismScan Contract Verification
## Prerequisites
Before the installation steps you need to have your hardhat project initialized using the command
```bash
npx hardhat init
```
Make sure to have dependencies installed!
## Installation
Use the following command to install
```bash
npm i hardhat-optimism --save-dev
```
Import the plugin in your `hardhat.config.js`:
```js
require("hardhat-optimism");
```
Or if you are using TypeScript, in your `hardhat.config.ts`:
```ts
import "hardhat-optimism";
```
Remove / Comment the import for `@nomicfoundation/hardhat-toolbox`
Add the following configuration to the `config` object in `hardhat.config.js`.
```js
networks: {
optimisticGoerli: {
// can be replaced with the RPC url of your choice.
url: "https://goerli.optimism.io",
accounts: [
""
],
},
optimisticEthereum: {
url: "https://mainnet.optimism.io",
accounts: [
""
],
}
},
etherscan: {
apiKey: {
optimisticGoerli: "",
optimisticEthereum: ""
},
},
```
Verify your contracts using the following command (Make sure your contracts are compiled before verification)
Optimism Goerli Testnet
```bash
npx hardhat verify --network optimisticGoerli
```
Optimism Mainnet
```bash
npx hardhat verify --network optimisticEthereum
```