Skip to content

Commit

Permalink
Add support for SEPOLIA network (#117)
Browse files Browse the repository at this point in the history
* Add support for SEPOLIA network

* Create mighty-forks-talk.md

---------

Co-authored-by: Babak Rafat <[email protected]>
Co-authored-by: Kris Kaczor <[email protected]>
  • Loading branch information
3 people authored May 14, 2023
1 parent 9c27c00 commit d72e459
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/mighty-forks-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@dethcrypto/eth-sdk": patch
---

Add support for SEPOLIA network
2 changes: 1 addition & 1 deletion packages/eth-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Predefined network identifiers are:
"bscTestnet" "heco" "hecoTestnet"
"opera" "ftmTestnet" "optimism"
"optimismKovan" "polygon" "polygonMumbai"
"arbitrumOne" "arbitrumTestnet"
"arbitrumOne" "arbitrumTestnet" "sepolia"
```

You can use other networks, but you will need to configure Etherscan URLs for them in [`etherscanURLs`](#etherscanurls)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export const predefinedExplorerEndpoints: PredefinedExplorerEndpoints = {
url: 'https://api-goerli.etherscan.io/api',
apiKey: ETHERSCAN_KEY,
},
sepolia: {
url: 'https://api-sepolia.etherscan.io/api',
apiKey: ETHERSCAN_KEY,
},
kovan: {
url: 'https://api-kovan.etherscan.io/api',
apiKey: ETHERSCAN_KEY,
Expand Down
1 change: 1 addition & 0 deletions packages/eth-sdk/src/abi-management/getRpcProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const rpcProviders: RpcURLs = {
rinkeby: `https://rinkeby.infura.io/v3/${INFURA_PROJECT_URL}`,
ropsten: `https://ropsten.infura.io/v3/${INFURA_PROJECT_URL}`,
goerli: `https://goerli.infura.io/v3/${INFURA_PROJECT_URL}`,
sepolia: `https://sepolia.infura.io/v3/${INFURA_PROJECT_URL}`,
}

export function getRpcProvider(config: EthSdkConfig, network: NetworkSymbol): RpcProvider | null {
Expand Down
2 changes: 2 additions & 0 deletions packages/eth-sdk/src/abi-management/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum NetworkID {
RINKEBY = 4,
GOERLI = 5,
KOVAN = 42,
SEPOLIA = 11155111,
// Binance Smart Chain
BSC = 56,
BSC_TESTNET = 97,
Expand Down Expand Up @@ -36,6 +37,7 @@ export const networkIDtoSymbol = {
[NetworkID.ROPSTEN]: 'ropsten',
[NetworkID.RINKEBY]: 'rinkeby',
[NetworkID.GOERLI]: 'goerli',
[NetworkID.SEPOLIA]: 'sepolia',
[NetworkID.KOVAN]: 'kovan',
[NetworkID.BSC]: 'bsc',
[NetworkID.BSC_TESTNET]: 'bscTestnet',
Expand Down

0 comments on commit d72e459

Please sign in to comment.