Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Add polygon zkevm deploy script #165

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 5 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ const config: HardhatUserConfig = {
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
polygonzkevm: {
url: "https://rpc.public.zkevm-test.net",
accounts:
process.env.DEPLOY_KEY !== undefined ? [process.env.DEPLOY_KEY] : [],
},
// Used for testing
hardhat: {
chainId:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"chain:b": "IS_DESTINATION=true yarn hardhat node --port 8546",
"deploy:b": "npx hardhat run --network b scripts/deploy.ts",
"deploy-and-start": "yarn deploy:a && yarn deploy:b && yarn start",
"deploy:scroll": "npx hardhat run --network scroll scripts/deploy.ts"
"deploy:scroll": "npx hardhat run --network scroll scripts/deploy.ts",
"deploy:poly": "npx hardhat run --network polygonzkevm scripts/deploy.ts"
},
"packageManager": "[email protected]",
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ export interface ChainData {
export type ChainID = bigint;

export const chains: ChainData[] = [
{
name: "Polygon zkEVM Testnet",
symbol: "polyETH",
url: "https://rpc.public.zkevm-test.net",
chainID: 1442n,
exchangeRate: 1,
explorer: "",
},
{
url: "http://localhost:8545",
chainID: 31337n,
Expand Down