I need to call some other module functions (Those already published modules in aptos blockchain) in my move module.
- How can I import those module functions in my module?
- How to add that module as a dependency in my Move.toml file?
I need to call some other module functions (Those already published modules in aptos blockchain) in my move module.
Copyright © 2021 Jogjafile Inc.
The dependencies section of your Move.toml allows you to specify packages, such as the Sui package, which needs a pointer to the correct github repository and branch:
And then you would import that package and module into your module like so:
Where
suiis the imported package, object is the importedmodule,ID, andUIDare structs in the module, andSelfallows you to reference the module functions (e.g.object::new())