| Crates.io | circles-transfers |
| lib.rs | circles-transfers |
| version | 0.1.0 |
| created_at | 2025-12-05 12:32:11.786076+00 |
| updated_at | 2025-12-05 12:32:11.786076+00 |
| description | Transfer transaction builder for Circles protocol |
| homepage | https://circles-rs-book.vercel.app/ |
| repository | https://github.com/deluXtreme/circles-rs |
| max_upload_size | |
| id | 1968103 |
| size | 145,544 |
Builder for Circles transfer transactions (port of TS @aboutcircles/sdk-transfers). Produces the ordered tx list; execution is up to your runner.
operateFlowMatrix → inflationary re-wrap leftovers.staticAttoCircles from circles_getTokenBalances.use circles_transfers::TransferBuilder;
use circles_types::{CirclesConfig, Address};
use alloy_primitives::U256;
# async fn demo() -> Result<(), Box<dyn std::error::Error>> {
let cfg = CirclesConfig {
circles_rpc_url: "https://rpc.aboutcircles.com/".into(),
pathfinder_url: "".into(),
profile_service_url: "".into(),
v1_hub_address: Address::ZERO,
v2_hub_address: Address::ZERO,
name_registry_address: Address::ZERO,
base_group_mint_policy: Address::ZERO,
standard_treasury: Address::ZERO,
core_members_group_deployer: Address::ZERO,
base_group_factory_address: Address::ZERO,
lift_erc20_address: Address::ZERO,
invitation_escrow_address: Address::ZERO,
invitation_farm_address: Address::ZERO,
referrals_module_address: Address::ZERO,
};
let builder = TransferBuilder::new(cfg)?;
let from: Address = "0xde374ece6fa50e781e81aac78e811b33d16912c7".parse()?;
let to: Address = "0x123400000000000000000000000000000000abcd".parse()?;
let amount = U256::from(1_000_000_000_000_000_000u64); // 1 CRC
let txs = builder
.construct_advanced_transfer(from, to, amount, None)
.await?;
for tx in txs {
println!("send to: {:?}, data: 0x{}", tx.to, hex::encode(tx.data));
}
# Ok(())
# }
setApprovalForAll.ContractRunner in the SDK to send them.