encodeHookData()
function encodeHookData(type, conf): `0x${string}`
Encodes the parameters for a given hook type.
Parameters
Parameter | Type | Description |
---|---|---|
type | HookType | HookType The type of the hook. |
conf | HookConf <HookParam > | \< HookParam\> An object containing the hook address and its parameters. |
Returns
`0x${string}`
A hash representing the encoded ABI parameters.
Example
const params = {
type: 'launchTime',
param: 10,
}
const res = encodeHookData(params)
console.log(res)