Skip to main content

RouterImmutable

thirdweb.com

Methods

_getPluginForFunction

function _getPluginForFunction(bytes4 _selector) external view returns (address)

View address of the plugged-in functionality contract for a given function signature.

Parameters

NameTypeDescription
_selectorbytes4undefined

Returns

NameTypeDescription
_0addressundefined

addPlugin

function addPlugin(IPluginMap.Plugin _plugin) external nonpayable

Parameters

NameTypeDescription
_pluginIPluginMap.Pluginundefined

getAllFunctionsOfPlugin

function getAllFunctionsOfPlugin(address _pluginAddress) external view returns (bytes4[] registered)

View all funtionality as list of function signatures.

Parameters

NameTypeDescription
_pluginAddressaddressundefined

Returns

NameTypeDescription
registeredbytes4[]undefined

getAllPlugins

function getAllPlugins() external view returns (struct IPluginMap.Plugin[] registered)

View all funtionality existing on the contract.

Returns

NameTypeDescription
registeredIPluginMap.Plugin[]undefined

getPluginForFunction

function getPluginForFunction(bytes4 _selector) external view returns (address)

View address of the plugged-in functionality contract for a given function signature.

Parameters

NameTypeDescription
_selectorbytes4undefined

Returns

NameTypeDescription
_0addressundefined

multicall

function multicall(bytes[] data) external nonpayable returns (bytes[] results)

Receives and executes a batch of function calls on this contract.

Receives and executes a batch of function calls on this contract.

Parameters

NameTypeDescription
databytes[]The bytes data that makes up the batch of function calls to execute.

Returns

NameTypeDescription
resultsbytes[]The bytes data that makes up the result of the batch of function calls executed.

pluginMap

function pluginMap() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

removePlugin

function removePlugin(bytes4 _selector) external nonpayable

Remove existing functionality from the contract.

Parameters

NameTypeDescription
_selectorbytes4undefined

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

updatePlugin

function updatePlugin(IPluginMap.Plugin _plugin) external nonpayable

Parameters

NameTypeDescription
_pluginIPluginMap.Pluginundefined

Events

PluginAdded

event PluginAdded(bytes4 indexed functionSelector, address indexed pluginAddress)

Parameters

NameTypeDescription
functionSelector indexedbytes4undefined
pluginAddress indexedaddressundefined

PluginRemoved

event PluginRemoved(bytes4 indexed functionSelector, address indexed pluginAddress)

Parameters

NameTypeDescription
functionSelector indexedbytes4undefined
pluginAddress indexedaddressundefined

PluginSet

event PluginSet(bytes4 indexed functionSelector, string indexed functionSignature, address indexed pluginAddress)

Parameters

NameTypeDescription
functionSelector indexedbytes4undefined
functionSignature indexedstringundefined
pluginAddress indexedaddressundefined

PluginUpdated

event PluginUpdated(bytes4 indexed functionSelector, address indexed oldPluginAddress, address indexed newPluginAddress)

Parameters

NameTypeDescription
functionSelector indexedbytes4undefined
oldPluginAddress indexedaddressundefined
newPluginAddress indexedaddressundefined