Skip to content

Commit

Permalink
Added chain parameters for Arbitrum and Optimism (#3811).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 23, 2023
1 parent 5a3c10a commit 77a7323
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src.ts/providers/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ type Options = {
ensNetwork?: number;
priorityFee?: number
altNames?: Array<string>;
etherscan?: { url: string, apiKey: string };
etherscan?: { url: string };
};

// See: https://chainlist.org
Expand Down Expand Up @@ -291,33 +291,49 @@ function injectCommonNetworks(): void {

registerEth("xdai", 100, { ensNetwork: 1 });

registerEth("optimism", 10, {
ensNetwork: 1,
etherscan: { url: "https:/\/api-optimistic.etherscan.io/" }
});
registerEth("optimism-goerli", 420, {
etherscan: { url: "https:/\/api-goerli-optimistic.etherscan.io/" }
});

registerEth("arbitrum", 42161, {
ensNetwork: 1,
etherscan: { url: "https:/\/api.arbiscan.io/" }
});
registerEth("arbitrum-goerli", 421613, {
etherscan: { url: "https:/\/api-goerli.arbiscan.io/" }
});

// Polygon has a 35 gwei maxPriorityFee requirement
registerEth("matic", 137, {
ensNetwork: 1,
// priorityFee: 35000000000,
etherscan: {
apiKey: "W6T8DJW654GNTQ34EFEYYP3EZD9DD27CT7",
// apiKey: "W6T8DJW654GNTQ34EFEYYP3EZD9DD27CT7",
url: "https:/\/api.polygonscan.com/"
}
});
registerEth("maticMumbai", 80001, {
// priorityFee: 35000000000,
etherscan: {
apiKey: "W6T8DJW654GNTQ34EFEYYP3EZD9DD27CT7",
// apiKey: "W6T8DJW654GNTQ34EFEYYP3EZD9DD27CT7",
url: "https:/\/api-testnet.polygonscan.com/"
}
});

registerEth("bnb", 56, {
ensNetwork: 1,
etherscan: {
apiKey: "EVTS3CU31AATZV72YQ55TPGXGMVIFUQ9M9",
// apiKey: "EVTS3CU31AATZV72YQ55TPGXGMVIFUQ9M9",
url: "http:/\/api.bscscan.com"
}
});
registerEth("bnbt", 97, {
etherscan: {
apiKey: "EVTS3CU31AATZV72YQ55TPGXGMVIFUQ9M9",
// apiKey: "EVTS3CU31AATZV72YQ55TPGXGMVIFUQ9M9",
url: "http:/\/api-testnet.bscscan.com"
}
});
Expand Down

0 comments on commit 77a7323

Please sign in to comment.