ModuleSDK
Modules
getHookMultiPlexer

getHookMultiPlexer

Get the hook multiplexer.

Usage

const hookMultiPlexer = getHookMultiPlexer({
  globalHooks: ['0x123...'],
  valueHooks: ['0x123...'],
  delegatecallHooks: ['0x123...'],
  sigHooks: [
    {
      sig: '0x123...',
      subHooks: ['0x123...'],
    },
  ],
  targetHooks: [
    {
      target: '0x123...',
      subHooks: ['0x123...'],
    },
  ],
})

Parameters

globalHooks

The global hooks to be installed. They get called on every execution.

valueHooks

The value hooks to be installed. They get called on every value transfer.

delegatecallHooks

The delegatecall hooks to be installed. They get called on every delegatecall.

sigHooks

  • Type: {sig: Hex, subHooks: Address[]}[]

The signature hooks to be installed. They get called on every function call with the specified signature being called on the account.

targetHooks

  • Type: {sig: Hex, subHooks: Address[]}[]

The signature hooks to be installed. They get called on every function call with the specified signature being called on the target of the execution.

Returns

module

The module object representing the hook multiplexer.