Skip to content
Discussion options

You must be logged in to vote

init_module is like a constructor. It only runs once (when your package is deployed). You can't invoke it via the API (you can only do this with functions marked with the public entry visibility). Here's the documentation.

You can test it however by running unit tests in your Move module. Here's a basic example. View this after to see the assert statements.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gregnazario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant