Tooling
Module SDK
Modules
getHookMultiPlexer

⚠️ Deprecation Notice

ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.

Rhinestone SDK Documentation (opens in a new tab)

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 (function selector) being called on the account.

targetHooks

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

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

Returns

module

The module object representing the hook multiplexer.