Skip to content

Commit

Permalink
common: Arbitrum One support (#2426)
Browse files Browse the repository at this point in the history
* Add `ArbitrumOne` to `enums.ts`

* Add `ArbitrumOne` check to `static custom` method of `Common` class
  • Loading branch information
Cussone authored Nov 18, 2022
1 parent a00251d commit 161a402
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/common/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ export class Common extends EventEmitter {
opts
)
}
if (chainParamsOrName === CustomChain.ArbitrumOne) {
return Common.custom(
{
name: CustomChain.ArbitrumOne,
chainId: 42161,
networkId: 42161,
},
opts
)
}
if (chainParamsOrName === CustomChain.xDaiChain) {
return Common.custom(
{
Expand Down
7 changes: 7 additions & 0 deletions packages/common/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ export enum CustomChain {
*/
ArbitrumRinkebyTestnet = 'arbitrum-rinkeby-testnet',

/**
* Arbitrum One - mainnet for Arbitrum roll-up
*
* - [Documentation](https://developer.offchainlabs.com/public-chains)
*/
ArbitrumOne = 'arbitrum-one',

/**
* xDai EVM sidechain with a native stable token
*
Expand Down

0 comments on commit 161a402

Please sign in to comment.