Please refer to https://github.com/MetisProtocol/metis-hardhat-template for the complete template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node --experimental-json-modules read.mjs | |
// node 17 only | |
import { ethers } from "ethers"; | |
import { readFile } from "fs/promises"; | |
import ERC20ABI from "./ERC20.json" assert { type: "json" }; | |
const privateKey = await readFile("key.txt", { encoding: "utf-8" }); | |
const rpcclient = new ethers.providers.WebSocketProvider( | |
"wss://stardust-ws.metis.io/" |
Deploy
$ npx hardhat run --network metisGoerli scripts/deploy.ts
No need to generate any newer typings.
upgradeable contract deployed to address: 0xa15f9245d1E8c25598dE2605871A2b5854371cF2
Verify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"BondManager": "0x93f766F5a8641123EA79E2298fB0DfDBA92ED152", | |
"CanonicalTransactionChain": "0xCBc9fc3Ac4878925f7f63b0FA2681Bb0769DDFbb", | |
"ChainStorageContainer-CTC-batches": "0x23ac2fEd119dAD4fcE4A7a439440627d31e10F9E", | |
"ChainStorageContainer-CTC-queue": "0x01Af3B22741408d8fEfEFD82ba80472442975fD8", | |
"ChainStorageContainer-SCC-batches": "0x25B0ec6eF307272bd197E5b2743B142A3293ef2C", | |
"L1StandardBridge_for_verification_only": "0x18EBB7f9bfDe9C119A7dddAEAE3a86d9e20d0412", | |
"AddressManager": "0x45c2a2A7a3070Aea165c79342e6A8Ac74445e559", | |
"MVM_CanonicalTransaction_for_verification_only": "0x909bB9Aa5BBdE51766ec7c5cFdf28a058Fd69268", | |
"MVM_DiscountOracle": "0x185514cCBb65a4a1d98779D42a80A80fA696f7e6", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ethers } from "ethers"; | |
import { readFile } from "fs/promises"; | |
import IL2StandardBridge from "./IL2StandardBridge.json" assert { type: "json" }; | |
import OVM_GasPriceOracle from "./OVM_GasPriceOracle.json" assert { type: "json" }; | |
import IERC20 from "./IERC20.json.json" assert { type: "json" }; | |
const privateKey = await readFile("key.txt", { encoding: "utf-8" }); | |
const rpcClient = new ethers.JsonRpcProvider( | |
"https://andromeda.metis.io" |