{"id":21850504,"url":"https://github.com/circlefin/cctp-sample-app","last_synced_at":"2025-09-05T20:32:14.703Z","repository":{"id":176992712,"uuid":"647431204","full_name":"circlefin/cctp-sample-app","owner":"circlefin","description":"Sample app to demonstrate capabilities of Cross-Chain Transfer Protocol (CCTP)","archived":false,"fork":false,"pushed_at":"2024-07-02T20:54:26.000Z","size":2930,"stargazers_count":64,"open_issues_count":13,"forks_count":63,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-25T07:06:10.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/circlefin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-30T19:13:00.000Z","updated_at":"2024-12-08T19:31:03.000Z","dependencies_parsed_at":"2024-01-23T00:58:22.479Z","dependency_job_id":null,"html_url":"https://github.com/circlefin/cctp-sample-app","commit_stats":null,"previous_names":["circlefin/cctp-sample-app"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcctp-sample-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcctp-sample-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcctp-sample-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circlefin%2Fcctp-sample-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circlefin","download_url":"https://codeload.github.com/circlefin/cctp-sample-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232059297,"owners_count":18466736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T00:17:50.802Z","updated_at":"2025-09-05T20:32:14.679Z","avatar_url":"https://github.com/circlefin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [DEPRECATED] CCTP Sample App\n\n**This project is no longer actively maintained or supported by [Circle].**\n\nThis repository is kept for historical and archival purposes only. No further updates, bug fixes, or new features will be implemented by the original maintainers.\n\n**Reason for Deprecation:** The sample code shared in the repository is outdated. Our focus has shifted to providing the latest and greatest of the CCTP experience through our [developer documentation portal](https://developers.circle.com/cctp/).\n\n**Recommended Alternative:** If you are looking for similar functionality, please consider using the [CCTP QuickStart](https://developers.circle.com/cctp/transfer-usdc-on-testnet-from-ethereum-to-avalanche).\n\n# Summary\n\nA 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.\n\n![](./docs/screenshot.png)\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n# Setup\n\n## Install dependencies\n\nInstall NVM\n\n```\n# Install nvm using brew\nbrew install nvm\n# Or install it manually\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash\n```\n\nUse the correct node version (version found in .nvmrc)\n\n```\nnvm use\n```\n\nInstall npm dependencies\n\n```\nyarn install\n```\n\n## Running the app\n\nRun the sample app locally:\n\n```\nyarn start\n```\n\nThe sample app will now be running on: http://localhost:3000.\n\n## Testing\n\nLaunch the test runner in interactive watch mode\n\n```\nyarn test\n```\n\nRun tests with test coverage.\n\n```\nyarn test:unit:coverage\n```\n\n### Linting/Formatting/Type Checks\n\nWe use eslint, prettier and typescript to validate our code. In combination with husky and lint-staged, we run a check on every precommit on staged changes.\n\nYou can also use `yarn check-all` or `yarn fix-all` to validate or fix all lint/format/typing issues. See [package.json](./package.json) for more details.\n\n### Continuous Integration using Github Actions\n\nWe use Github actions to run linter and all the tests. The workflow configuration can be found in [github/workflows/ci.yml](./.github/workflows/ci.yml)\n\n### Build and deploy\n\nBuild the app into static bundle\n\n```\nyarn build\n```\n\nTo deploy, install and run `serve`\n\n```\nyarn global add serve\nserve -s build\n```\n\nSee [deployment docs](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n# Instructions\n\n## Adding a new chain\n\nWe have two config files which will be need to be updated to add a new chain support.\n\n1. Add the chain enum and definitions\n\n- In `./src/constants/chains.ts`, we need to add some enums and details for the chain to support. Add the new chain details to `Chain`, `SupportedChainId`, `SupportedChainIdHex`, `CHAIN_TO_CHAIN_ID`, `CHAIN_TO_CHAIN_NAME`, `DestinationDomain` and `CHAIN_ID_HEXES_TO_PARAMETERS`.\n\n2. Add the addresses for the new chain\n\n- In `./src/constants/addresses.ts`, we need to add the contract addresses for the new chain to support. For `CHAIN_IDS_TO_USDC_ADDRESSES`, `CHAIN_IDS_TO_TOKEN_MESSENGER_ADDRESSES` and `CHAIN_IDS_TO_MESSAGE_TRANSMITTER_ADDRESSES`, add the corresponding addresses for the new chain. This will allow the hooks to interact with the relevant addresses\n\n3. Add the logo for the new chain\n\n- We will also need to upload a svg image for the UI to display the chain logo. In `./src/assets/chains/`, add a svg logo for the new chain and then in `index.ts`, add the new icon to the `CHAIN_ICONS` map.\n\n4. Add the new chain to the form dropdown selector\n\n- In `./components/Send/SendForm.tsx`, Add the new chain to `CHAIN_SELECT_ITEMS` and this should automatically update the UI dropdown.\n\n## Configuration for Mainnet\n\nThis sample app is development for testnet use, but if we want to update this for mainnet, these are the steps needed.\n\n1. Update the chain definitions to mainnet\n\n- In `./src/constants/chains.ts`, update the `SupportedChainId`, `SupportedChainIdHex` and `ChainParameter` objects with mainnet values. We may want to rename the enums as well.\n\n2. Update the addresses to mainnet\n\n- In `./src/constants/addresses.ts`, update the addresses with mainnet addresses. The mainnet address values can be found on https://developers.circle.com/stablecoin/docs.cctp-protocol-contract.\n\n3. Update the attestation API URL\n\n- In `./src/constants/index.ts`, update `IRIS_ATTESTATION_API_URL` with the mainnet value. The mainnet API url can be found on https://developers.circle.com/stablecoin/docs/cctp-getting-started#attestation-service-api.\n\n## Setup Typechain\n\nWe use Typechain in this sample app to easily integrate smart contract with generated Typescript bindings. If we want to add some functionality and update the abis, we can update the abis as necessary in `./src/abis` and then run the following command to update the generated files.\n\n```\ntypechain --target=ethers-v5 --out-dir src/typechain src/abis/*.json\n```\n\nThis generates `typechain` folder under `src` containing contract types to be used by our hooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fcctp-sample-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirclefin%2Fcctp-sample-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirclefin%2Fcctp-sample-app/lists"}