Move.

Post

Share your knowledge.

yhant3.
Jan 04, 2025
Expert Q&A

How to get the amount of SUI coins using Move language?

I'm working with the Move language and I want to create a function that retrieves the amount of SUI coins held by a specific address. Is there an existing module or function in Move that can help me achieve this?

  • Move CLI
0
1
Share
Comments
.

Answers

1
elfDani.
Jan 4 2025, 19:27

You cannot do this directly from Move because smart contracts on Sui don't have access to global storage, unlike in Solidity/EVM. To find out the coin balance for an address, you would need to externally query a full node via RPC/GraphQL or use an SDK client.

1
Best Answer
Comments
.

Do you know the answer?

Please log in and share it.

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148Posts231Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

Reward CampaignJune
We use cookies to ensure you get the best experience on our website.
More info