Move.

Post

Share your knowledge.

yhant3.
Jan 04, 2025
Discussion

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.

0
Comments
.

Do you know the answer?

Please log in and share it.

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