Skip to content

Commit

Permalink
Merge pull request #11 from etherspot/Supported_Network_Updates
Browse files Browse the repository at this point in the history
Added Supported Networks
  • Loading branch information
vignesha22 authored Jul 7, 2023
2 parents 8252663 + 871f7dc commit 45e0009
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.0.2] - 2023-07-07
### New
- Added all supported networks ArbitrumGoerli, Chiado, Fuse, FuseSparknet, Gnosis, KromaTestnet, Mainnet, OptimismGoerli, RSKTestnet, VerseTestnet 🚀

## [1.0.1] - 2023-06-22
### New
- Added all supported networks Goerli, BaseGoerli, Sepolia, Optimism, Polygon and Arbitrum 🚀
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@etherspot/prime-sdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "Etherspot Prime (Account Abstraction) SDK",
"keywords": [
"ether",
Expand Down
149 changes: 141 additions & 8 deletions src/sdk/network/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@ export enum NetworkNames {
Optimism = 'optimism',
Polygon = 'polygon',
Arbitrum = 'arbitrum',
ArbitrumGoerli = 'arbitrumGoerli',
Chiado = 'chiado',
Fuse = 'fuse',
FuseSparknet = 'fuseSparknet',
Gnosis = 'gnosis',
KromaTestnet = 'kromaTestnet',
Mainnet = 'mainnet',
OptimismGoerli = 'optimismGoerli',
RSKTestnet = 'RSKTestnet',
VerseTestnet = 'verseTestnet',
}

export const SupportedNetworks = [5, 80001, 84531, 11155111, 10, 137, 42161 ]
export const SupportedNetworks = [5, 80001, 84531, 11155111, 10, 137, 42161, 421613, 10200, 122, 123, 100, 2357, 1, 420, 31, 20197 ]

export const NETWORK_NAME_TO_CHAIN_ID: {
[key: string]: number;
Expand All @@ -22,6 +32,16 @@ export const NETWORK_NAME_TO_CHAIN_ID: {
[NetworkNames.Optimism]: 10,
[NetworkNames.Polygon]: 137,
[NetworkNames.Arbitrum]: 42161,
[NetworkNames.ArbitrumGoerli]: 421613,
[NetworkNames.Chiado]: 10200,
[NetworkNames.Fuse]: 122,
[NetworkNames.FuseSparknet]: 123,
[NetworkNames.Gnosis]: 100,
[NetworkNames.KromaTestnet]: 2357,
[NetworkNames.Mainnet]: 1,
[NetworkNames.OptimismGoerli]: 420,
[NetworkNames.RSKTestnet]: 31,
[NetworkNames.VerseTestnet]: 20197,
};

export const Networks: {
Expand All @@ -33,7 +53,6 @@ export const Networks: {
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
uniswapV3SwapRouter: '0xE592427A0AEce92De3Edee1F18E0157C05861564',
},
paymaster: {
use: false,
Expand All @@ -46,7 +65,6 @@ export const Networks: {
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
uniswapV3SwapRouter: '0xE592427A0AEce92De3Edee1F18E0157C05861564',
},
paymaster: {
use: false,
Expand All @@ -59,7 +77,6 @@ export const Networks: {
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
uniswapV3SwapRouter: '0xE592427A0AEce92De3Edee1F18E0157C05861564',
},
paymaster: {
use: false,
Expand All @@ -72,7 +89,6 @@ export const Networks: {
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
uniswapV3SwapRouter: '0xE592427A0AEce92De3Edee1F18E0157C05861564',
},
paymaster: {
use: false,
Expand All @@ -85,7 +101,6 @@ export const Networks: {
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
uniswapV3SwapRouter: '0xE592427A0AEce92De3Edee1F18E0157C05861564',
},
paymaster: {
use: false,
Expand All @@ -98,7 +113,6 @@ export const Networks: {
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
uniswapV3SwapRouter: '0xE592427A0AEce92De3Edee1F18E0157C05861564',
},
paymaster: {
use: false,
Expand All @@ -111,7 +125,126 @@ export const Networks: {
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
uniswapV3SwapRouter: '0xE592427A0AEce92De3Edee1F18E0157C05861564',
},
paymaster: {
use: false,
url: '',
},
},
[1]: {
chainId: 1,
bundler: 'https://ethereum-bundler.etherspot.io/',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[421613]: {
chainId: 421613,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[10200]: {
chainId: 10200,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[122]: {
chainId: 122,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[123]: {
chainId: 123,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[100]: {
chainId: 100,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[2357]: {
chainId: 2357,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[420]: {
chainId: 420,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[31]: {
chainId: 31,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
url: '',
},
},
[20197]: {
chainId: 20197,
bundler: '',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: '0x2f771DCa6Ffa3879e48355E8A4aF5b81d82A6164',
},
paymaster: {
use: false,
Expand Down
1 change: 0 additions & 1 deletion src/sdk/network/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface NetworkConfig {
contracts: {
entryPoint: string;
walletFactory: string;
uniswapV3SwapRouter: string;
};
paymaster: {
use: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/sdk/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class PrimeSdk {
if (!optionsLike.bundlerRpcUrl) {
const networkConfig = getNetworkConfig(chainId);
optionsLike.bundlerRpcUrl = networkConfig.bundler;
if (optionsLike.bundlerRpcUrl == '') throw new Exception('No bundler Rpc provided');
}


Expand Down

0 comments on commit 45e0009

Please sign in to comment.