Hello everyone, I’m just starting to learn Sui Network. There are a few things I don’t quite understand. I want to create a transaction to send USDC to another wallet using moveCall. In the documentation, there is an example with NFTs (target: ‘0x2::nft::mint_many’). How can I find out the methods of the USDC contract, and where can I find them?
Hello and welcome to the Sui Network!
If you’re just getting started, it’s important to focus on the basics. Whether you’re working with USDC or any other token, the core concepts stay the same, so don’t worry too much about the specific coin.
Steps to get started:
- Learn the basics
Start by going through the Sui documentation to understand how transactions and moveCall work. You can find helpful resources here: Sui Docs and Developer Guides
- Understand object transfers:
On Sui, everything is treated as an object, and coins are no exception. To transfer any fungible token (like USDC), the process is similar to transferring SUI. Check out the Sui framework’s transfer module 0x2::transfer::public_transfer
. This is a great place to start practicing object and coin transfers.
- Explore the code:
Dive into the Sui Framework Move modules on GitHub. The code includes documentation that helps you understand Move, function calls, and transaction structures. This will be key to understand smart contract interactions.
GitHub: Sui Move Framework
- Check for Contract Methods:
For interacting with a specific contract (like USDC), look into the contract’s module to see available functions such as minting and transferring. You can use on-chain resources like Github or an explorer for this.
Object transfer example:
Instead of focusing on USDC specific details, try practicing with the standard transfer function for any object, like this:
moveCall({
target: '0x2::transfer::public_transfer',
arguments: [/*Object ID */, /* Recipient Address */]
});