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.

Посты с вознаграждением