Skip to content

Commit

Permalink
Updated freeport-sc-sdk package (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
mazhutoanton authored Jul 1, 2024
1 parent b593be3 commit 762f8bd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

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

24 changes: 24 additions & 0 deletions packages/communication/src/getChainConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ const presets = {
ticker: 'MATIC',
tickerName: 'Matic',
},
baseSepolia: {
chainId: '84532',
rpcTarget: 'https://sepolia.base.org',
displayName: 'Base Sepolia Testnet',
blockExplorer: 'https://sepolia-explorer.base.org',
ticker: 'ETH',
tickerName: 'ETH',
},
base: {
chainId: '8453',
rpcTarget: 'https://mainnet.base.org',
displayName: 'Base Mainnet',
blockExplorer: 'https://base.blockscout.com/',
ticker: 'ETH',
tickerName: 'ETH',
},
};

const isConfigReady = (config: Partial<ChainConfig>): config is ChainConfig =>
Expand Down Expand Up @@ -50,6 +66,14 @@ export const getChainConfig = (network: NetworkConfig): ChainConfig => {
chainConfig = createChainConfig(network, 'amoy');
}

if (network.chainId === 8453 || network.host === 'base') {
chainConfig = createChainConfig(network, 'base');
}

if (network.chainId === 84532 || network.host === 'baseSepolia') {
chainConfig = createChainConfig(network, 'baseSepolia');
}

if (!isConfigReady(chainConfig)) {
throw new Error('Incorrect network configuration');
}
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@biconomy/mexa": "^3.0.6",
"@cere/freeport-sc-sdk": "0.23.0",
"@cere/freeport-sc-sdk": "0.26.0",
"@polkadot/api": "^10.2.1",
"@polkadot/keyring": "^11.1.2",
"@polkadot/types": "^10.2.1",
Expand Down

0 comments on commit 762f8bd

Please sign in to comment.