Build next-gen applications
Create the next revolutionary app powered by digital currency and secure Web3 wallets.
Build
Scale seamlessly with USDC and Web3 tools
Get started with USDC
USDC is an open-source digital dollar that transcends borders and bank accounts and is available natively on the top blockchains. Developers use USDC to programmatically transfer, validate, and store digital currency faster and more cost-efficiently than traditional payment systems.
*Circle is also the sole issuer of EURC, a fully backed euro stablecoin that is open and available for developers to build on today.
Extend your app with CCTP
Reach more users by enabling cross-chain payments, swaps, and deposits with Cross-Chain Transfer Protocol (CCTP), a permissionless on-chain utility that facilitates USDC transfers between supported blockchains via native burning and minting.
Access tools to build in Web3
Discover an easier, faster way to create production-ready Web3 applications. Embed and transact with MPC wallets using REST APIs and SDKs, and support your wallets' on-chain interactions by deploying and interacting with smart contracts. With robust tools and built-in node infrastructure, you can build secure Web3 apps quickly – all while abstracting complexity away from end users.
async function main() {
const decimals = await contract.methods.decimals().call();
const balance = await
contract.methods.balanceOf(fromAddress).call();
console.log('USDC balance:', balance / (10 ** decimals));
let value = amount * (10 ** decimals);
let data = contract.methods.transfer(toAddress, value).encodeABI();
const transaction = {
'to': tokenAddress,
'gas': Web3.utils.toHex(100000),
'data': data
};
const signedTx = await
web3.eth.accounts.signTransaction(transaction, privatekey);
return web3.eth.sendSignedTransaction(signedTx.rawTransaction,
function (error, hash) {
if (!error) {
console.log("Tx Hash: ", hash);
} else {
console.log("Error sending Tx:", error)
}
});
}
main().then(receipt => console.log("Tx Receipt:", receipt));
// Facilitate a burn of the specified amount of USDC on the source chain
const burnTx = await ethTokenMessengerContract.methods.depositForBurn(amount, AVAX_DESTINATION_DOMAIN, destinationAddressInBytes32,
USDC_ETH_CONTRACT_ADDRESS).send();
// Hashes burn event transaction log
const transactionReceipt = await
web3.eth.getTransactionReceipt(burnTx.transactionHash);
const eventTopic = web3.utils.keccak256('MessageSent(bytes)');
const log = transactionReceipt.logs.find((l) => l.topics[0] === eventTopic);
const messageBytes = web3.eth.abi.decodeParameters(['bytes'], log.data)[0];
const messageHash = web3.utils.keccak256(messageBytes);
// Request the attestation of the burn event from Circle
let attestationResponse = { status: 'pending' };
while (attestationResponse.status !== 'complete') {
const response = await
fetch(`https://iris-api-sandbox.circle.com/attestations/${messageHash}`);
attestationResponse = await response.json();
await new Promise(r => setTimeout(r, 2000));
}
// Enable USDC to be minted on the destination chain
const receiveTx = await
avaxMessageTransmitterContract.receiveMessage(receivingMessageBytes, signature);
import axios from 'axios';
const options = {
method: 'POST',
url: 'https://api.circle.com/v1/w3s/developer/transactions/contractExecution',
headers: {
Authorization: 'Bearer ${API_KEY}',
accept: 'application/json',
'content-type': 'application/json'
},
data: {
abiFunctionSignature: 'transfer(address,uint256)',
idempotencyKey: '23c4e3d8-62b1-4dca-a08a-b3f28f4a81bf',
contractAddress: '',
feeLevel: 'MEDIUM',
walletId: '${WALLET_ID}',
entitySecretCiphertext: '${ENTITY_SECRET_CIPHERTEXT}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Get started with USDC
USDC is an open-source digital dollar that transcends borders and bank accounts and is available natively on the top blockchains. Developers use USDC to programmatically transfer, validate, and store digital currency faster and more cost-efficiently than traditional payment systems.
*Circle is also the sole issuer of EURC, a fully backed euro stablecoin that is open and available for developers to build on today.
async function main() {
const decimals = await contract.methods.decimals().call();
const balance = await
contract.methods.balanceOf(fromAddress).call();
console.log('USDC balance:', balance / (10 ** decimals));
let value = amount * (10 ** decimals);
let data = contract.methods.transfer(toAddress, value).encodeABI();
const transaction = {
'to': tokenAddress,
'gas': Web3.utils.toHex(100000),
'data': data
};
const signedTx = await
web3.eth.accounts.signTransaction(transaction, privatekey);
return web3.eth.sendSignedTransaction(signedTx.rawTransaction,
function (error, hash) {
if (!error) {
console.log("Tx Hash: ", hash);
} else {
console.log("Error sending Tx:", error)
}
});
}
main().then(receipt => console.log("Tx Receipt:", receipt));
Extend your app with CCTP
Reach more users by enabling cross-chain payments, swaps, and deposits with Cross-Chain Transfer Protocol (CCTP), a permissionless on-chain utility that facilitates USDC transfers between supported blockchains via native burning and minting.
// Facilitate a burn of the specified amount of USDC on the source chain
const burnTx = await ethTokenMessengerContract.methods.depositForBurn(amount, AVAX_DESTINATION_DOMAIN, destinationAddressInBytes32,
USDC_ETH_CONTRACT_ADDRESS).send();
// Hashes burn event transaction log
const transactionReceipt = await
web3.eth.getTransactionReceipt(burnTx.transactionHash);
const eventTopic = web3.utils.keccak256('MessageSent(bytes)');
const log = transactionReceipt.logs.find((l) => l.topics[0] === eventTopic);
const messageBytes = web3.eth.abi.decodeParameters(['bytes'], log.data)[0];
const messageHash = web3.utils.keccak256(messageBytes);
// Request the attestation of the burn event from Circle
let attestationResponse = { status: 'pending' };
while (attestationResponse.status !== 'complete') {
const response = await
fetch(`https://iris-api-sandbox.circle.com/attestations/${messageHash}`);
attestationResponse = await response.json();
await new Promise(r => setTimeout(r, 2000));
}
// Enable USDC to be minted on the destination chain
const receiveTx = await
avaxMessageTransmitterContract.receiveMessage(receivingMessageBytes, signature);
Access tools to build in Web3
Discover an easier, faster way to create production-ready Web3 applications. Embed and transact with MPC wallets using REST APIs and SDKs, and support your wallets' on-chain interactions by deploying and interacting with smart contracts. With robust tools and built-in node infrastructure, you can build secure Web3 apps quickly – all while abstracting complexity away from end users.
import axios from 'axios';
const options = {
method: 'POST',
url: 'https://api.circle.com/v1/w3s/developer/transactions/contractExecution',
headers: {
Authorization: 'Bearer ${API_KEY}',
accept: 'application/json',
'content-type': 'application/json'
},
data: {
abiFunctionSignature: 'transfer(address,uint256)',
idempotencyKey: '23c4e3d8-62b1-4dca-a08a-b3f28f4a81bf',
contractAddress: '',
feeLevel: 'MEDIUM',
walletId: '${WALLET_ID}',
entitySecretCiphertext: '${ENTITY_SECRET_CIPHERTEXT}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Learn
Discover why developers are choosing USDC
Developers are deploying Web3 apps leveraging USDC across lending, e-commerce, gaming, and payments. Check out our Builder Series for interviews with global builders and use our guides to learn how to seamlessly integrate USDC and blockchain-based solutions to scale your use case.
CornerMarket: Empowering Small Businesses with USDC
Learn how CornerMarket, a Web3 shopping and payments ecosystem, is reshaping the way small businesses transact using cryptocurrency.
Gelato: Gasless and Automated CCTP
See how Gelato’s Web3 infrastructure platform is empowering developers to create automated gasless and off-chain aware layer two solutions and smart contracts.
Creating a Decentralized Social Economy
Hear Bhushit Agarwal, Senior Software Engineer at Circle, discuss how he has developed a Programmable Wallets integration with Mastodon to unlock a decentralized social economy.
Access USDC Directly
Mint and deposit USDC at scale
Eligible enterprise developers can leverage Circle Mint and corresponding APIs to mint and redeem USDC at scale, 24/7, directly from your business bank account. Circle also provides APIs for making crypto deposits and payouts to and from your Circle Mint account, including USDC across supported blockchains.
- Mint and redeem via API or Web UI
- Webhook notifications to be notified automatically when a transaction occurs
- SDKs to quickly get your codebase up and running
- APIs for programmable on chain transactions
Connect
Join the Circle developer community
Catch us live at industry events and chat with us on Discord 24 hours a day, Monday-Friday. Our dedicated team is here to answer questions, collect product feedback, and provide outlets to engage with fellow blockchain developers.
USDC Token Contract: A Deep Dive into the Features and Functions
Circle Developer Relations Manager Corey Cooper shares a deep dive of the USDC token contract features and functionality. This video includes a step-by-step demonstration on how to transfer USDC using its smart contract functions.
Interactive Quickstart for Programmable Wallets
In just 15 minutes, learn how to build a developer-controlled wallet. Whether you're a seasoned blockchain enthusiast or stepping into the decentralized sphere for the first time, this step-by-step walkthrough will help you get started.
Build an iOS App that Generates Web3 Wallets
Watch how to build an iOS app that generates user-controlled Programmable Wallets using SDKs, REST APIs, and Circle’s sample application. Embed Web3 wallets across multiple blockchains with a seamless UX, including a familiar social sign-in flow, authentication, account recovery, and gas abstraction.
Resources for Developers
Upcoming support for Polygon PoS Amoy testnet
Learn about expanded support for Polygon PoS Amoy testnet to better serve developers building with Circle. We encourage developers to migrate to Amoy at your earliest convenience.
Leveraging Smart Contracts to Manage Loyalty Points
Leveraging smart contracts for blockchain loyalty programs can help foster innovative experiences and enable brands to expand their reach. Learn more.