Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 Goerli, Avalanche Fuji C-Chain, Arbitrum Goerli testnet, and Optimism Goerli testnet.

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

Expand Down
21 changes: 21 additions & 0 deletions src/assets/chains/OP.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/assets/chains/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import ARB from 'assets/chains/ARB.svg'
import AVAX from 'assets/chains/AVAX.svg'
import ETH from 'assets/chains/ETH.svg'
import OP from 'assets/chains/OP.svg'

export const CHAIN_ICONS = {
ETH,
AVAX,
ARB,
OP,
}
5 changes: 5 additions & 0 deletions src/components/Send/SendForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ const CHAIN_SELECT_ITEMS: SelectItem[] = [
label: CHAIN_TO_CHAIN_NAME[Chain.ARB],
icon: CHAIN_ICONS[Chain.ARB],
},
{
value: Chain.OP,
label: CHAIN_TO_CHAIN_NAME[Chain.OP],
icon: CHAIN_ICONS[Chain.OP],
},
]

export const DEFAULT_FORM_INPUTS: TransactionInputs = {
Expand Down
6 changes: 6 additions & 0 deletions src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const CHAIN_IDS_TO_USDC_ADDRESSES = {
[SupportedChainId.AVAX_FUJI]: '0x5425890298aed601595a70AB815c96711a31Bc65',

[SupportedChainId.ARB_GOERLI]: '0xfd064a18f3bf249cf1f87fc203e90d8f650f2d63',

[SupportedChainId.OP_GOERLI]: '0xe05606174bac4A6364B31bd0eCA4bf4dD368f8C6',
}

/**
Expand All @@ -20,6 +22,8 @@ export const CHAIN_IDS_TO_TOKEN_MESSENGER_ADDRESSES = {
[SupportedChainId.AVAX_FUJI]: '0xeb08f243e5d3fcff26a9e38ae5520a669f4019d0',

[SupportedChainId.ARB_GOERLI]: '0x12dcfd3fe2e9eac2859fd1ed86d2ab8c5a2f9352',

[SupportedChainId.OP_GOERLI]: '0x23a04d5935ed8bc8e3eb78db3541f0abfb001c6e',
}

/**
Expand All @@ -31,4 +35,6 @@ export const CHAIN_IDS_TO_MESSAGE_TRANSMITTER_ADDRESSES = {
[SupportedChainId.AVAX_FUJI]: '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79',

[SupportedChainId.ARB_GOERLI]: '0x109bc137cb64eab7c0b1dddd1edf341467dc2d35',

[SupportedChainId.OP_GOERLI]: '0x9ff9a4da6f2157a9c82ce756f8fd7e0d75be8895',
}
20 changes: 20 additions & 0 deletions src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export enum Chain {
ETH = 'ETH',
AVAX = 'AVAX',
ARB = 'ARB',
OP = 'OP',
}

/**
Expand All @@ -14,6 +15,7 @@ export enum SupportedChainId {
ETH_GOERLI = 5,
AVAX_FUJI = 43113,
ARB_GOERLI = 421613,
OP_GOERLI = 420,
}

/**
Expand All @@ -24,6 +26,7 @@ export const SupportedChainIdHex = {
ETH_GOERLI: '0x5',
AVAX_FUJI: '0xa869',
ARB_GOERLI: '0x66eed',
OP_GOERLI: '0x1a4',
}

interface ChainToChainIdMap {
Expand All @@ -38,6 +41,7 @@ export const CHAIN_TO_CHAIN_ID: ChainToChainIdMap = {
[Chain.ETH]: SupportedChainId.ETH_GOERLI,
[Chain.AVAX]: SupportedChainId.AVAX_FUJI,
[Chain.ARB]: SupportedChainId.ARB_GOERLI,
[Chain.OP]: SupportedChainId.OP_GOERLI,
}

interface ChainToChainNameMap {
Expand All @@ -51,6 +55,7 @@ export const CHAIN_TO_CHAIN_NAME: ChainToChainNameMap = {
ETH: 'Ethereum',
AVAX: 'Avalanche',
ARB: 'Arbitrum',
OP: 'Optimism',
}

/**
Expand All @@ -62,10 +67,12 @@ export const ALL_SUPPORTED_CHAIN_IDS: SupportedChainId[] = Object.values(

/**
* List of Circle-defined IDs referring to specific domains
* https://developers.circle.com/stablecoins/docs/cctp-technical-reference#domain
*/
export enum DestinationDomain {
ETH = 0,
AVAX = 1,
OP = 2,
ARB = 3,
}

Expand Down Expand Up @@ -119,6 +126,18 @@ const ARB_GOERLI: AddEthereumChainParameter = {
rpcUrls: ['https://arb-goerli.g.alchemy.com/v2/demo'],
}

const OP_GOERLI: AddEthereumChainParameter = {
chainId: SupportedChainIdHex.OP_GOERLI,
blockExplorerUrls: ['https://optimism-goerli.blockscout.com'],
chainName: 'Optimism Goerli Testnet',
nativeCurrency: {
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
},
rpcUrls: ['https://endpoints.omniatech.io/v1/op/goerli/public'],
}

interface ChainIdToChainParameters {
[key: string]: AddEthereumChainParameter
}
Expand All @@ -127,4 +146,5 @@ export const CHAIN_ID_HEXES_TO_PARAMETERS: ChainIdToChainParameters = {
[SupportedChainIdHex.ETH_GOERLI]: ETH_GOERLI,
[SupportedChainIdHex.AVAX_FUJI]: AVAX_FUJI,
[SupportedChainIdHex.ARB_GOERLI]: ARB_GOERLI,
[SupportedChainIdHex.OP_GOERLI]: OP_GOERLI,
}