Skip to content

Commit

Permalink
feat: Add Klaytn testnet and mainnet config (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
arddluma authored Nov 17, 2023
1 parent cd2504f commit df26ec5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [1.3.12] - 2023-11-17
### New
- Added Klaytn mainnet and Testnet (Baobab)

## [1.3.11] - 2023-11-08
### Breaking Changes
- Removed api_key from estimate function on the sdk and added the same on the queryString, please refer examples/13-paymaster.ts for more info
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.3.11",
"version": "1.3.12",
"description": "Etherspot Prime (Account Abstraction) SDK",
"keywords": [
"ether",
Expand Down
32 changes: 31 additions & 1 deletion src/sdk/network/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ export enum NetworkNames {
Flare = 'flare',
ScrollSepolia = 'scrollSepolia',
Scroll = 'scroll',
Klaytn = 'klaytn',
KlaytnTestnet = 'klaytnTestnet',
}

export const SupportedNetworks =
[1, 5, 10, 14, 31, 56, 97, 100, 114, 122, 123, 137, 420, 2357, 5000, 5001, 8453, 10200, 20197, 42161, 43113, 43114, 59140, 59144, 80001, 84531, 421613, 534351, 534352, 11155111]
[1, 5, 10, 14, 31, 56, 97, 100, 114, 122, 123, 137, 420, 1001, 2357, 5000, 5001, 8217, 8453, 10200, 20197, 42161, 43113, 43114, 59140, 59144, 80001, 84531, 421613, 534351, 534352, 11155111]

export const NETWORK_NAME_TO_CHAIN_ID: {
[key: string]: number;
Expand Down Expand Up @@ -69,6 +71,8 @@ export const NETWORK_NAME_TO_CHAIN_ID: {
[NetworkNames.Flare]: 14,
[NetworkNames.ScrollSepolia]: 534351,
[NetworkNames.Scroll]: 534352,
[NetworkNames.Klaytn]: 8217,
[NetworkNames.KlaytnTestnet]: 1001,
};

export const onRamperAllNetworks = ['OPTIMISM', 'POLYGON', 'ARBITRUM', 'FUSE', 'GNOSIS', 'ETHEREUM']
Expand All @@ -89,6 +93,19 @@ export const Networks: {
},
graphqlEndpoint: 'qa-etherspot.pillarproject.io',
},
[1001]: {
chainId: 1001,
bundler: 'https://klaytntestnet-bundler.etherspot.io',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: {
etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E',
zeroDev: '',
simpleAccount: '',
}
},
graphqlEndpoint: 'qa-etherspot.pillarproject.io',
},
[80001]: {
chainId: 80001,
bundler: 'https://mumbai-bundler.etherspot.io',
Expand Down Expand Up @@ -167,6 +184,19 @@ export const Networks: {
},
graphqlEndpoint: 'etherspot.pillarproject.io',
},
[8217]: {
chainId: 8217,
bundler: 'https://klaytn-bundler.etherspot.io',
contracts: {
entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
walletFactory: {
etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E',
zeroDev: '',
simpleAccount: '',
}
},
graphqlEndpoint: 'etherspot.pillarproject.io',
},
[1]: {
chainId: 1,
bundler: 'https://ethereum-bundler.etherspot.io/',
Expand Down

0 comments on commit df26ec5

Please sign in to comment.