Skip to content

Commit

Permalink
feat(opt-base-sepolia): adding support for sepolia networks on opt an… (
Browse files Browse the repository at this point in the history
#394)

* feat(opt-base-sepolia): adding support for sepolia networks on opt and base

* add changelog
  • Loading branch information
rambhask authored Nov 30, 2023
1 parent 793db75 commit 410b268
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

### Major Changes

## 3.1.0

### Major Changes

- Added support for Optimism Sepolia and Base Sepolia via the `Network.OPT_SEPOLIA` and `Network.BASE_SEPOLIA` enums.

### Minor Changes

## 3.0.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ The SDK currently supports the following chains:

- **Ethereum**: Mainnet, Goerli, Sepolia
- **Polygon**: Mainnet, Mumbai
- **Optimism**: Mainnet, Goerli, Kovan
- **Optimism**: Mainnet, Goerli, Kovan, Sepolia
- **Arbitrum**: Mainnet, Goerli, Rinkeby, Sepolia
- **Astar**: Mainnet
- **PolygonZKEVM**: Mainnet, Testnet
- **Base**: Mainnet, Goerli
- **Base**: Mainnet, Goerli, Sepolia

You can find per-method documentation of the Alchemy SDK endpoints at the [Alchemy Docs linked in the sidebar](https://docs.alchemy.com/reference/alchemy-sdk-quickstart).

Expand Down
4 changes: 2 additions & 2 deletions docs-md/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ The SDK currently supports the following chains:

- **Ethereum**: Mainnet, Goerli, Sepolia
- **Polygon**: Mainnet, Mumbai
- **Optimism**: Mainnet, Goerli, Kovan
- **Optimism**: Mainnet, Goerli, Kovan, Sepolia
- **Arbitrum**: Mainnet, Goerli, Rinkeby, Sepolia
- **Astar**: Mainnet
- **PolygonZKEVM**: Mainnet, Testnet
- **Base**: Mainnet, Goerli
- **Base**: Mainnet, Goerli, Sepolia

You can find per-method documentation of the Alchemy SDK endpoints at the [Alchemy Docs linked in the sidebar](https://docs.alchemy.com/reference/alchemy-sdk-quickstart).

Expand Down
4 changes: 3 additions & 1 deletion src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export enum Network {
ETH_SEPOLIA = 'eth-sepolia',
OPT_MAINNET = 'opt-mainnet',
OPT_GOERLI = 'opt-goerli',
OPT_SEPOLIA = 'opt-sepolia',
ARB_MAINNET = 'arb-mainnet',
ARB_GOERLI = 'arb-goerli',
ARB_SEPOLIA = 'arb-sepolia',
Expand All @@ -93,7 +94,8 @@ export enum Network {
POLYGONZKEVM_MAINNET = 'polygonzkevm-mainnet',
POLYGONZKEVM_TESTNET = 'polygonzkevm-testnet',
BASE_MAINNET = 'base-mainnet',
BASE_GOERLI = 'base-goerli'
BASE_GOERLI = 'base-goerli',
BASE_SEPOLIA = 'base-sepolia'
}

/** Token Types for the `getTokenBalances()` endpoint. */
Expand Down
12 changes: 11 additions & 1 deletion src/util/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const EthersNetwork = {
[Network.ETH_SEPOLIA]: 'sepolia',
[Network.OPT_MAINNET]: 'optimism',
[Network.OPT_GOERLI]: 'optimism-goerli',
[Network.OPT_SEPOLIA]: 'optimism-sepolia',
[Network.ARB_MAINNET]: 'arbitrum',
[Network.ARB_GOERLI]: 'arbitrum-goerli',
[Network.ARB_SEPOLIA]: 'arbitrum-sepolia',
Expand All @@ -54,7 +55,8 @@ export const EthersNetwork = {
[Network.POLYGONZKEVM_MAINNET]: 'polygonzkevm-mainnet',
[Network.POLYGONZKEVM_TESTNET]: 'polygonzkevm-testnet',
[Network.BASE_MAINNET]: 'base-mainnet',
[Network.BASE_GOERLI]: 'base-goerli'
[Network.BASE_GOERLI]: 'base-goerli',
[Network.BASE_SEPOLIA]: 'base-sepolia'
};

/**
Expand All @@ -79,6 +81,10 @@ export const CustomNetworks: { [key: string]: NetworkFromEthers } = {
chainId: 11155111,
name: 'sepolia'
},
'optimism-sepolia': {
chainId: 11155420,
name: 'optimism-sepolia'
},
'polygonzkevm-mainnet': {
chainId: 1101,
name: 'polygonzkevm-mainnet'
Expand All @@ -94,6 +100,10 @@ export const CustomNetworks: { [key: string]: NetworkFromEthers } = {
'base-goerli': {
chainId: 84531,
name: 'base-goerli'
},
'base-sepolia': {
chainId: 84532,
name: 'base-sepolia'
}
};

Expand Down

0 comments on commit 410b268

Please sign in to comment.