https://github.com/circlefin/aptos-cctp
Official repository for Aptos smart contracts used by the Cross-Chain Transfer Protocol
https://github.com/circlefin/aptos-cctp
Last synced: about 1 year ago
JSON representation
Official repository for Aptos smart contracts used by the Cross-Chain Transfer Protocol
- Host: GitHub
- URL: https://github.com/circlefin/aptos-cctp
- Owner: circlefin
- Created: 2024-11-18T23:44:46.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-26T21:18:17.000Z (over 1 year ago)
- Last Synced: 2025-03-26T22:26:12.674Z (over 1 year ago)
- Language: Move
- Homepage:
- Size: 322 KB
- Stars: 5
- Watchers: 6
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# aptos-cctp-private
Official repository for Aptos smart contracts used by the Cross-Chain Transfer Protocol.
---
## Getting Started
### Prerequisites
Before you can start working with the contracts in this repository, make sure you have the following prerequisites installed:
1. Run `make setup` to install required dependencies (Aptos CLI, Import Git submodules).
2. [IntelliJ](https://www.jetbrains.com/idea/download/?section=mac) is recommended for developing Move contracts. Install the [Move Intellij IDE Plugin](https://pontem.network/move-intellij-ide-plugin).
---
## Testing
### Run Aptos and EVM Local Network
```sh
./docker-start-containers.sh
```
### Run Unit Tests for All Package Modules
```sh
make test
```
### Running E2E Tests
```sh
# Install Dependencies
yarn install
```
```sh
# Run e2e tests
yarn test:e2e
```
### Running Example Scripts on Testnet
1. Rename .env.example to .env and fill in the required environment variables.
2. Run the example script for Base/EVM -> Aptos
```sh
yarn receive-message-example
```
3. Run the example script for Aptos -> Base/EVM
```sh
yarn deposit-for-burn-example
```
## Deployment
1. Create a deployer keypair and fund it with APT
2. Deploy MessageTransmitter and TokenMessengerMinter package
```sh
yarn deploy --privateKey= --rpc= --aptosExtensionsPackageId= --stablecoinPackageId=
```
3. Verify source bytecode
```sh
# Message Transmitter
yarn verify-pkg --packageName=message_transmitter --rpc= --packageId= --namedDeps aptos_extensions=,deployer=
# TokenMessengerMinter
yarn verify-pkg --packageName=token_messenger_minter --rpc= --packageId= --namedDeps aptos_extensions=,deployer=,message_transmitter=,stablecoin=
```
## Upgrading
1. Build payload for publishing
```sh
# Message Transmitter
aptos move build-publish-payload --package-dir packages/message_transmitter --named-addresses deployer=,aptos_extensions=,message_transmitter= --json-output-file upgrade.json
# Token Messenger Minter
aptos move build-publish-payload --package-dir packages/token_messenger_minter --named-addresses deployer=,aptos_extensions=,message_transmitter=,stablecoin=,token_messenger_minter= --json-output-file upgrade.json
```
2. Execute Tx for upgrading
```sh
yarn upgrade-pkg --privateKey= --rpc= --payloadFilePath=upgrade.json --aptosExtensionsPackageId= --packageId=
```