Overview
Function-level imports are unable to use top-level package imports. I have created this package showcasing this issue.
Here is the relevant code.
module module_aliases::module_aliases;
use sui::package;
public struct MODULE_ALIASES() has drop;
fun init(otw: MODULE_ALIASES, ctx: &mut TxContext) {
use package::claim_and_keep;
claim_and_keep(otw, ctx);
}
In this example, you would expect the init function to be able to import the claim_and_keep function using the top-level sui::package import of the package module. The code, however, does not compile.