Post
Share your knowledge.
Any tips for keeping this straight when debugging?
I tried using sui client call to interact with a published module, but I kept mixing up package ID and module ID. Any tips for keeping this straight when debugging?
- Sui
- Transaction Processing
- NFT Ecosystem
- Move
Answers
1When you’re debugging with sui client call, the biggest thing to remember is that the package ID points to the published Move package on-chain, while the module name is just the logical module inside that package. You always pass the package ID (like 0x123...abc) in your transaction, and then reference the module and function in the format <packageID>::<module>::<function>. A common mistake is trying to use the module ID directly as if it were an object, but modules don’t exist on-chain as first-class objects—only packages do. To keep it straight, I recommend keeping a cheatsheet where you log the package IDs each time you publish and naming your modules consistently so you don’t forget what belongs where. You can also use sui client package <packageID> to inspect what modules and functions live under a package before calling them. Here’s an example call:
sui client call \
--package 0x123abc456def \
--module vault \
--function withdraw \
--args 0xvault_obj_id 1000 \
--gas-budget 10000000
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- How to Maximize Profit Holding SUI: Sui Staking vs Liquid Staking616
- Why does BCS require exact field order for deserialization when Move structs have named fields?65
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution55
- Sui Move Error - Unable to process transaction No valid gas coins found for the transaction419
- Sui Transaction Failing: Objects Reserved for Another Transaction410