useGetModule
useGetModule
Use this hook to fetch a Move module, including the bytecode and ABI. The information if fetched from the deployedModules.ts
and externalModules.ts
.
Usage
const moveModule = useGetModule("onchain_bio");
Parameters
Parameter | Type | Description |
---|---|---|
moduleName | string | Name of the module |
Return Value
Returns an object of type GenericModule
:
bytecode
: The raw bytecode of the module.abi
: An object that contains the following:address
: The address where the module is deployed.name
: The name of the module.friends
: A list of module addresses that have access to private elements of the module.exposed_functions
: A list of functions that the module exposes, which include their name, visibility, parameters, and return types.structs
: A list of data structures defined in the module, including their fields and type information.