Skip to content

Commit d72e459

Browse files
bobRafatbabaksyraxkrzkaczor
authored
Add support for SEPOLIA network (#117)
* Add support for SEPOLIA network * Create mighty-forks-talk.md --------- Co-authored-by: Babak Rafat <babak@syrax.au> Co-authored-by: Kris Kaczor <chris@kaczor.io>
1 parent 9c27c00 commit d72e459

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

.changeset/mighty-forks-talk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@dethcrypto/eth-sdk": patch
3+
---
4+
5+
Add support for SEPOLIA network

packages/eth-sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Predefined network identifiers are:
167167
"bscTestnet" "heco" "hecoTestnet"
168168
"opera" "ftmTestnet" "optimism"
169169
"optimismKovan" "polygon" "polygonMumbai"
170-
"arbitrumOne" "arbitrumTestnet"
170+
"arbitrumOne" "arbitrumTestnet" "sepolia"
171171
```
172172

173173
You can use other networks, but you will need to configure Etherscan URLs for them in [`etherscanURLs`](#etherscanurls)

packages/eth-sdk/src/abi-management/etherscan/explorerEndpoints.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export const predefinedExplorerEndpoints: PredefinedExplorerEndpoints = {
3131
url: 'https://api-goerli.etherscan.io/api',
3232
apiKey: ETHERSCAN_KEY,
3333
},
34+
sepolia: {
35+
url: 'https://api-sepolia.etherscan.io/api',
36+
apiKey: ETHERSCAN_KEY,
37+
},
3438
kovan: {
3539
url: 'https://api-kovan.etherscan.io/api',
3640
apiKey: ETHERSCAN_KEY,

packages/eth-sdk/src/abi-management/getRpcProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const rpcProviders: RpcURLs = {
1111
rinkeby: `https://rinkeby.infura.io/v3/${INFURA_PROJECT_URL}`,
1212
ropsten: `https://ropsten.infura.io/v3/${INFURA_PROJECT_URL}`,
1313
goerli: `https://goerli.infura.io/v3/${INFURA_PROJECT_URL}`,
14+
sepolia: `https://sepolia.infura.io/v3/${INFURA_PROJECT_URL}`,
1415
}
1516

1617
export function getRpcProvider(config: EthSdkConfig, network: NetworkSymbol): RpcProvider | null {

packages/eth-sdk/src/abi-management/networks.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export enum NetworkID {
88
RINKEBY = 4,
99
GOERLI = 5,
1010
KOVAN = 42,
11+
SEPOLIA = 11155111,
1112
// Binance Smart Chain
1213
BSC = 56,
1314
BSC_TESTNET = 97,
@@ -36,6 +37,7 @@ export const networkIDtoSymbol = {
3637
[NetworkID.ROPSTEN]: 'ropsten',
3738
[NetworkID.RINKEBY]: 'rinkeby',
3839
[NetworkID.GOERLI]: 'goerli',
40+
[NetworkID.SEPOLIA]: 'sepolia',
3941
[NetworkID.KOVAN]: 'kovan',
4042
[NetworkID.BSC]: 'bsc',
4143
[NetworkID.BSC_TESTNET]: 'bscTestnet',

0 commit comments

Comments
 (0)