When I run code from the official repo I got the next error:
Error executing ExecutionError: ExecutionError { inner:
ExecutionErrorInner { kind: SuiMoveVerificationError, source:
Some("0000000000000000000000000000000000000000::exp01::init at
offset 9. Cannot call a module's 'init' function from another
Move function") } }
Yes, they need to fix the repo as changes with 0.16.0 removed ability to call
init
from test modules.The workaround is to factor out the steps in the current
init
to one or more helper functions. That way, atest_init
function can mirror whatinit
does and you can call thetest_init
from test modules.Before
After