Skip to content

Commit

Permalink
[STABLE-5750] Add support for Sepolia (#27)
Browse files Browse the repository at this point in the history
## Summary
Update project configuration to use Sepolia addresses, links, etc.
  • Loading branch information
clapacik-circle authored Feb 13, 2024
1 parent 292fcbc commit c94ee70
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CCTP Sample App

A sample app used to demonstrate CCTP step by step capabilities on testnet. The app currently supports Ethereum Goerli, Avalanche Fuji C-Chain, and Arbitrum Goerli testnets.
A sample app used to demonstrate CCTP step by step capabilities on testnet. The app currently supports Ethereum Sepolia, Avalanche Fuji C-Chain, and Arbitrum Sepolia testnets.

![](./docs/screenshot.png)

Expand Down
12 changes: 6 additions & 6 deletions src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ import { SupportedChainId } from 'constants/chains'
* Map of supported chains to USDC contract addresses
*/
export const CHAIN_IDS_TO_USDC_ADDRESSES = {
[SupportedChainId.ETH_GOERLI]: '0x07865c6E87B9F70255377e024ace6630C1Eaa37F',
[SupportedChainId.ETH_SEPOLIA]: '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238',

[SupportedChainId.AVAX_FUJI]: '0x5425890298aed601595a70AB815c96711a31Bc65',

[SupportedChainId.ARB_GOERLI]: '0xfd064a18f3bf249cf1f87fc203e90d8f650f2d63',
[SupportedChainId.ARB_SEPOLIA]: '0x75faf114eafb1bdbe2f0316df893fd58ce46aa4d',
}

/**
* Map of supported chains to Token Messenger contract addresses
*/
export const CHAIN_IDS_TO_TOKEN_MESSENGER_ADDRESSES = {
[SupportedChainId.ETH_GOERLI]: '0xd0c3da58f55358142b8d3e06c1c30c5c6114efe8',
[SupportedChainId.ETH_SEPOLIA]: '0x9f3b8679c73c2fef8b59b4f3444d4e156fb70aa5',

[SupportedChainId.AVAX_FUJI]: '0xeb08f243e5d3fcff26a9e38ae5520a669f4019d0',

[SupportedChainId.ARB_GOERLI]: '0x12dcfd3fe2e9eac2859fd1ed86d2ab8c5a2f9352',
[SupportedChainId.ARB_SEPOLIA]: '0x9f3b8679c73c2fef8b59b4f3444d4e156fb70aa5',
}

/**
* Map of supported chains to Message Transmitter contract addresses
*/
export const CHAIN_IDS_TO_MESSAGE_TRANSMITTER_ADDRESSES = {
[SupportedChainId.ETH_GOERLI]: '0x26413e8157cd32011e726065a5462e97dd4d03d9',
[SupportedChainId.ETH_SEPOLIA]: '0x7865fafc2db2093669d92c0f33aeef291086befd',

[SupportedChainId.AVAX_FUJI]: '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79',

[SupportedChainId.ARB_GOERLI]: '0x109bc137cb64eab7c0b1dddd1edf341467dc2d35',
[SupportedChainId.ARB_SEPOLIA]: '0xacf1ceef35caac005e15888ddb8a3515c41b4872',
}
42 changes: 21 additions & 21 deletions src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ export enum Chain {
* List of all the chain/network IDs supported
*/
export enum SupportedChainId {
ETH_GOERLI = 5,
ETH_SEPOLIA = 11155111,
AVAX_FUJI = 43113,
ARB_GOERLI = 421613,
ARB_SEPOLIA = 421614,
}

/**
* List of all the chain/network IDs supported in hexadecimals
* TODO: Infer from SupportedChainId
*/
export const SupportedChainIdHex = {
ETH_GOERLI: '0x5',
ETH_SEPOLIA: '0xaa36a7',
AVAX_FUJI: '0xa869',
ARB_GOERLI: '0x66eed',
ARB_SEPOLIA: '0x66eee',
}

interface ChainToChainIdMap {
Expand All @@ -35,9 +35,9 @@ interface ChainToChainIdMap {
*/

export const CHAIN_TO_CHAIN_ID: ChainToChainIdMap = {
[Chain.ETH]: SupportedChainId.ETH_GOERLI,
[Chain.ETH]: SupportedChainId.ETH_SEPOLIA,
[Chain.AVAX]: SupportedChainId.AVAX_FUJI,
[Chain.ARB]: SupportedChainId.ARB_GOERLI,
[Chain.ARB]: SupportedChainId.ARB_SEPOLIA,
}

interface ChainToChainNameMap {
Expand Down Expand Up @@ -83,20 +83,20 @@ interface AddEthereumChainParameter {
rpcUrls?: string[]
}

const ETH_GOERLI: AddEthereumChainParameter = {
chainId: '0x5',
blockExplorerUrls: ['https://goerli.etherscan.io'],
chainName: 'Goerli Test Network',
const ETH_SEPOLIA: AddEthereumChainParameter = {
chainId: SupportedChainIdHex.ETH_SEPOLIA,
blockExplorerUrls: ['https://sepolia.etherscan.io'],
chainName: 'Sepolia Test Network',
nativeCurrency: {
name: 'Goerli ETH',
symbol: 'gorETH',
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
},
rpcUrls: ['https://goerli.infura.io/v3/'],
rpcUrls: ['https://sepolia.infura.io/v3/'],
}

const AVAX_FUJI: AddEthereumChainParameter = {
chainId: '0xa869',
chainId: SupportedChainIdHex.AVAX_FUJI,
blockExplorerUrls: ['https://testnet.snowtrace.io/'],
chainName: 'Avalanche FUJI C-Chain',
nativeCurrency: {
Expand All @@ -107,24 +107,24 @@ const AVAX_FUJI: AddEthereumChainParameter = {
rpcUrls: ['https://api.avax-test.network/ext/bc/C/rpc'],
}

const ARB_GOERLI: AddEthereumChainParameter = {
chainId: SupportedChainIdHex.ARB_GOERLI,
blockExplorerUrls: ['https://goerli.arbiscan.io/'],
chainName: 'Arbitrum Goerli Testnet',
const ARB_SEPOLIA: AddEthereumChainParameter = {
chainId: SupportedChainIdHex.ARB_SEPOLIA,
blockExplorerUrls: ['https://sepolia.arbiscan.io/'],
chainName: 'Arbitrum Sepolia Testnet',
nativeCurrency: {
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
},
rpcUrls: ['https://arb-goerli.g.alchemy.com/v2/demo'],
rpcUrls: ['https://arb-sepolia.g.alchemy.com/v2/demo'],
}

interface ChainIdToChainParameters {
[key: string]: AddEthereumChainParameter
}

export const CHAIN_ID_HEXES_TO_PARAMETERS: ChainIdToChainParameters = {
[SupportedChainIdHex.ETH_GOERLI]: ETH_GOERLI,
[SupportedChainIdHex.ETH_SEPOLIA]: ETH_SEPOLIA,
[SupportedChainIdHex.AVAX_FUJI]: AVAX_FUJI,
[SupportedChainIdHex.ARB_GOERLI]: ARB_GOERLI,
[SupportedChainIdHex.ARB_SEPOLIA]: ARB_SEPOLIA,
}

0 comments on commit c94ee70

Please sign in to comment.