Move.

帖子

分享您的知识。

BigSneh.
Sep 06, 2025
专家问答

Calling Functions from Move Module: Methods and Best Practices

Hello, I am trying to call a function (make_sword) from Move module with the address 0x4c6cccd6bc62eac9a9d023b6fa671d8f8c7eaf8ae7e67fae89d26883360dd89d in MOVE. Is it possible to call functions from different Move modules, and if so, what methods or approaches can I use? Are there any concepts similar to interfaces in Solidity for achieving this?

  • Move CLI
  • Move
  • Smart Contract
0
1
分享
评论
.

答案

1
290697tz.
Sep 6 2025, 05:15

Yes, it is possible to call functions from Move module (s). There are a few methods you can use to achieve this:

moveCall Function: You can use the unsafe_moveCall function to call functions from other Move module (s). This method allows you to make direct calls to specific functions using curl. You can find more details in the documentation here. However, please be cautious while using this approach as it's labeled as "unsafe."

Sui CLI: Another option is to use the Sui CLI, where you can call functions from other modules using the sui client call [args + params] command. This provides a more structured and user-friendly way to interact with Move module (s).

When experimenting with these methods, ensure that you are working on the testnet or devnet, as making calls will require gas, even during testing. It's essential to be mindful of gas usage and adhere to best practices while making these calls. If you have further questions or need assistance with a different approach, feel free to ask them here;

1
最佳答案
评论
.

你知道答案吗?

请登录并分享。

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

270帖子616答案
Sui.X.Peera.

赚取你的 1000 Sui 份额

获取声誉积分,并因帮助 Sui 社区成长而获得奖励。