Skip to content
Merged
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 .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Steps to reproduce the behavior:
<!-- Please fill the following information. -->

- OS: [e.g. Ubuntu 20.04]
- cctp-bridge version: [e.g. 0.1.0]
- cctp-client version: [e.g. 0.1.0]

## Additional context

Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<!--
Please, make sure:
- you have read the contributing guidelines:
https://github.com/CarteraMesh/cctp-bridge/blob/main/docs/CONTRIBUTING.md
https://github.com/CarteraMesh/cctp-client/blob/main/docs/CONTRIBUTING.md
- you have formatted the code using rustfmt:
https://github.com/rust-lang/rustfmt
- you have checked that all tests pass, by running `cargo test --workspace`
- you have updated the changelog (if needed):
https://github.com/CarteraMesh/cctp-bridge/blob/main/CHANGELOG.md
https://github.com/CarteraMesh/cctp-client/blob/main/CHANGELOG.md
-->
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
- name: Run examples
env:
RUST_BACKTRACE: 1
RUST_LOG: info,cctp_bridge=debug
RUST_LOG: info,cctp_client=debug
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
EVM_SECRET_KEY: ${{ secrets.EVM_SECRET_KEY }}
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
name: ubuntu / stable / coverage / ${{ matrix.features }}
env:
RUST_BACKTRACE: 1
RUST_LOG: info,cctp_bridge=debug
RUST_LOG: info,cctp_client=debug
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
EVM_SECRET_KEY: ${{ secrets.EVM_SECRET_KEY }}
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contribution guidelines

First off, thank you for considering contributing to cctp-bridge.
First off, thank you for considering contributing to cctp-client.

If your contribution is not straightforward, please first discuss the change you
wish to make by creating a new issue before making the change.

## Reporting issues

Before reporting an issue on the
[issue tracker](https://github.com/CarteraMesh/cctp-bridge/issues),
[issue tracker](https://github.com/CarteraMesh/cctp-client/issues),
please check that it has not already been reported by searching for some related
keywords.

Expand All @@ -19,7 +19,7 @@ Try to do one pull request per change.
### Updating the changelog

Update the changes you have made in
[CHANGELOG](https://github.com/CarteraMesh/cctp-bridge/blob/main/CHANGELOG.md)
[CHANGELOG](https://github.com/CarteraMesh/cctp-client/blob/main/CHANGELOG.md)
file under the **Unreleased** section.

Add the changes of your pull request to one of the following subsections,
Expand All @@ -42,8 +42,8 @@ If the required subsection does not exist yet under **Unreleased**, create it!
This is no different than other Rust projects.

```shell
git clone https://github.com/CarteraMesh/cctp-bridge
cd cctp-bridge
git clone https://github.com/CarteraMesh/cctp-client
cd cctp-client
cargo test
```

Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "cctp-bridge"
name = "cctp-client"
version = "0.1.0"
edition = "2024"
description = "Multi chain bridge for USDC"
repository = "https://github.com/CarteraMesh/cctp-bridge"
repository = "https://github.com/CarteraMesh/cctp-client"
authors = ["gh@cartera-mesh.com"]
documentation = "https://docs.rs/cctp-bridge"
homepage = "https://github.com/CarteraMesh/cctp-bridge"
documentation = "https://docs.rs/cctp-client"
homepage = "https://github.com/CarteraMesh/cctp-client"
categories = ["finance", "api-bindings"]
keywords = ["defi", "solana", "ethereum", "web3", "blockchain", "sdk"]
license = "Apache-2.0"
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# cctp-bridge
# cctp-client

[![Crates.io](https://img.shields.io/crates/v/cctp-bridge.svg)](https://crates.io/crates/cctp-bridge)
[![Docs.rs](https://docs.rs/cctp-bridge/badge.svg)](https://docs.rs/cctp-bridge)
[![CI](https://github.com/CarteraMesh/cctp-bridge/workflows/test/badge.svg)](https://github.com/CarteraMesh/cctp-bridge/actions)
[![Cov](https://codecov.io/github/CarteraMesh/cctp-bridge/graph/badge.svg?token=dILa1k9tlW)](https://codecov.io/github/CarteraMesh/cctp-bridge)
[![Crates.io](https://img.shields.io/crates/v/cctp-client.svg)](https://crates.io/crates/cctp-client)
[![Docs.rs](https://docs.rs/cctp-client/badge.svg)](https://docs.rs/cctp-client)
[![CI](https://github.com/CarteraMesh/cctp-client/workflows/test/badge.svg)](https://github.com/CarteraMesh/cctp-client/actions)
[![Cov](https://codecov.io/github/CarteraMesh/cctp-client/graph/badge.svg?token=dILa1k9tlW)](https://codecov.io/github/CarteraMesh/cctp-client)

## About

cctp-bridge is a Rust-based helper library for the Cross-Chain Token Protocol [CCTP](https://developers.circle.com/cctp). It facilitates the transfer of USDC between different blockchain networks.
cctp-client is a Rust-based helper library for the Cross-Chain Token Protocol [CCTP](https://developers.circle.com/cctp). It facilitates the transfer of USDC between different blockchain networks.
This crates provides flexible control over the transfer process, allowing users to customize various aspects of the transfer.

This project is a fork of the [cctp-rs](https://github.com/semiotic-ai/cctp-rs) [crate](https://crates.io/crates/cctp-rs)
Expand All @@ -21,7 +21,7 @@ mod common;
use {
alloy_chains::NamedChain,
alloy_provider::WalletProvider,
cctp_bridge::{Cctp, SolanSigners},
cctp_client::{Cctp, SolanSigners},
common::*,
solana_signer::Signer,
tracing::info,
Expand All @@ -40,15 +40,15 @@ async fn main() -> anyhow::Result<()> {
base_sepolia_wallet_provider.default_signer_address()
);

// Convenience wrapper for cctp_bridge::SolanaProvider trait
let rpc_wrapper: cctp_bridge::SolanaWrapper = rpc.into();
// Convenience wrapper for cctp_client::SolanaProvider trait
let rpc_wrapper: cctp_client::SolanaWrapper = rpc.into();
// Convenience wrapper for solana_signer::Signer for use of CCTP operations
let signers = SolanSigners::new(solana_keypair);

let bridge = Cctp::new_solana_evm(
rpc_wrapper,
base_sepolia_wallet_provider,
cctp_bridge::SOLANA_DEVNET, // source chain
cctp_client::SOLANA_DEVNET, // source chain
NamedChain::BaseSepolia, // destination chain
);
// 0.000010 USDC to base sepolia
Expand All @@ -75,8 +75,8 @@ async fn main() -> anyhow::Result<()> {

1. **Clone the repository**
```bash
git clone https://github.com/CarteraMesh/cctp-bridge.git
cd cctp-bridge
git clone https://github.com/CarteraMesh/cctp-client.git
cd cctp-client
```

2. **Build and test**
Expand Down
4 changes: 2 additions & 2 deletions examples/evm_sol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use {
alloy_chains::NamedChain,
alloy_primitives::U256,
alloy_provider::WalletProvider,
cctp_bridge::{Cctp, SolanaWrapper},
cctp_client::{Cctp, SolanaWrapper},
solana_signer::Signer,
tracing::info,
};
Expand All @@ -28,7 +28,7 @@ async fn main() -> anyhow::Result<()> {
rpc,
NamedChain::BaseSepolia,
owner.pubkey(),
cctp_bridge::SOLANA_DEVNET,
cctp_client::SOLANA_DEVNET,
);
let result = bridge
.bridge_evm_sol(&owner, U256::from(10), None, None, None)
Expand Down
4 changes: 2 additions & 2 deletions examples/reclaim.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod common;

use {
cctp_bridge::{Cctp, SolanaWrapper},
cctp_client::{Cctp, SolanaWrapper},
solana_signer::Signer,
tracing::info,
};
Expand All @@ -14,7 +14,7 @@ async fn main() -> anyhow::Result<()> {
info!("solana address {}", owner.pubkey(),);
let rpc: SolanaWrapper = rpc.into();

let bridge = Cctp::new_reclaim(rpc.clone(), rpc, cctp_bridge::SOLANA_DEVNET);
let bridge = Cctp::new_reclaim(rpc.clone(), rpc, cctp_client::SOLANA_DEVNET);
let result = bridge.reclaim(&owner).await?;
println!("reclaimed {} accounts", result.len());
for (sig, addr) in result {
Expand Down
4 changes: 2 additions & 2 deletions examples/recv_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod common;

use {
alloy_chains::NamedChain,
cctp_bridge::{Cctp, SolanaWrapper},
cctp_client::{Cctp, SolanaWrapper},
};

#[tokio::main]
Expand All @@ -15,7 +15,7 @@ async fn main() -> anyhow::Result<()> {
rpc.clone(),
rpc,
NamedChain::BaseSepolia,
cctp_bridge::SOLANA_DEVNET,
cctp_client::SOLANA_DEVNET,
);
let result = bridge
.recv_message_sol(
Expand Down
8 changes: 4 additions & 4 deletions examples/sol_evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod common;
use {
alloy_chains::NamedChain,
alloy_provider::WalletProvider,
cctp_bridge::{Cctp, SolanSigners},
cctp_client::{Cctp, SolanSigners},
common::*,
solana_signer::Signer,
tracing::info,
Expand All @@ -22,15 +22,15 @@ async fn main() -> anyhow::Result<()> {
base_sepolia_wallet_provider.default_signer_address()
);

// Convenience wrapper for cctp_bridge::SolanaProvider trait
let rpc_wrapper: cctp_bridge::SolanaWrapper = rpc.into();
// Convenience wrapper for cctp_client::SolanaProvider trait
let rpc_wrapper: cctp_client::SolanaWrapper = rpc.into();
// Convenience wrapper for solana_signer::Signer for use of CCTP operations
let signers = SolanSigners::new(solana_keypair);

let bridge = Cctp::new_solana_evm(
rpc_wrapper,
base_sepolia_wallet_provider,
cctp_bridge::SOLANA_DEVNET,
cctp_client::SOLANA_DEVNET,
NamedChain::BaseSepolia,
);
// 0.000010 USDC to base sepolia
Expand Down
2 changes: 1 addition & 1 deletion release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
enable-all-features = false

# Pre-release checks
pre-release-commit-message = "chore: release cctp_bridge v"
pre-release-commit-message = "chore: release cctp_client v"

# Tag settings
tag-message = "chore: release v"
Expand Down
10 changes: 5 additions & 5 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use {
alloy_provider::{Provider, ProviderBuilder, WalletProvider},
alloy_signer_local::PrivateKeySigner,
anyhow::Result,
cctp_bridge::{Cctp, SolanSigners, SolanaWrapper},
cctp_client::{Cctp, SolanSigners, SolanaWrapper},
solana_commitment_config::CommitmentConfig,
solana_keypair::Keypair,
solana_rpc_client::nonblocking::rpc_client::RpcClient,
Expand Down Expand Up @@ -77,7 +77,7 @@ async fn test_reclaim() -> Result<()> {
let (owner, rpc) = solana_setup()?;
let rpc: SolanaWrapper = rpc.into();

let bridge = Cctp::new_reclaim(rpc.clone(), rpc, cctp_bridge::SOLANA_DEVNET);
let bridge = Cctp::new_reclaim(rpc.clone(), rpc, cctp_client::SOLANA_DEVNET);
let result = bridge.reclaim(&owner).await?;
info!("reclaimed {} accounts", result.len());
for (sig, addr) in result {
Expand Down Expand Up @@ -105,7 +105,7 @@ async fn test_burn_too_much() -> Result<()> {
assert!(result.is_err(), "Should fail with insufficient balance");

let e = result.unwrap_err();
assert!(matches!(e, cctp_bridge::Error::InsufficientBalance(_, _)));
assert!(matches!(e, cctp_client::Error::InsufficientBalance(_, _)));
println!("error {e}");
Ok(())
}
Expand Down Expand Up @@ -155,7 +155,7 @@ async fn test_evm_sol() -> Result<()> {
rpc,
NamedChain::Sepolia,
owner.pubkey(),
cctp_bridge::SOLANA_DEVNET,
cctp_client::SOLANA_DEVNET,
);
let result = bridge
.bridge_evm_sol(&owner, U256::from(10), None, None, None)
Expand All @@ -174,7 +174,7 @@ async fn test_sol_evm() -> Result<()> {
let bridge = Cctp::new_solana_evm(
rpc,
base_provider,
cctp_bridge::SOLANA_DEVNET,
cctp_client::SOLANA_DEVNET,
NamedChain::BaseSepolia,
);
let result = bridge
Expand Down
Loading