BaseRouter

Methods

addExtension

function addExtension(IExtension.Extension _extension) external nonpayable

Parameters

Name
Type
Description

_extension

IExtension.Extension

undefined

getAllExtensions

function getAllExtensions() external view returns (struct IExtension.Extension[] allExtensions)

Returns all extensions stored. Override default lugins stored in router are given precedence over default extensions in DefaultExtensionSet.

Returns

Name
Type
Description

allExtensions

IExtension.Extension[]

undefined

getAllFunctionsOfExtension

function getAllFunctionsOfExtension(string _extensionName) external view returns (struct IExtension.ExtensionFunction[])

Returns all functions that belong to the given extension contract.

Parameters

Name
Type
Description

_extensionName

string

undefined

Returns

Name
Type
Description

_0

IExtension.ExtensionFunction[]

undefined

getExtension

function getExtension(string _extensionName) external view returns (struct IExtension.Extension)

Returns the extension metadata and functions for a given extension.

Parameters

Name
Type
Description

_extensionName

string

undefined

Returns

Name
Type
Description

_0

IExtension.Extension

undefined

getExtensionForFunction

function getExtensionForFunction(bytes4 _functionSelector) external view returns (struct IExtension.ExtensionMetadata)

Returns the extension metadata for a given function.

Parameters

Name
Type
Description

_functionSelector

bytes4

undefined

Returns

Name
Type
Description

_0

IExtension.ExtensionMetadata

undefined

getExtensionImplementation

function getExtensionImplementation(string _extensionName) external view returns (address)

Returns the extension's implementation smart contract address.

Parameters

Name
Type
Description

_extensionName

string

undefined

Returns

Name
Type
Description

_0

address

undefined

getImplementationForFunction

function getImplementationForFunction(bytes4 _functionSelector) external view returns (address extensionAddress)

Returns the extension implementation address stored in router, for the given function.

Parameters

Name
Type
Description

_functionSelector

bytes4

undefined

Returns

Name
Type
Description

extensionAddress

address

undefined

removeExtension

function removeExtension(string _extensionName) external nonpayable

Removes an existing extension from the router.

Parameters

Name
Type
Description

_extensionName

string

undefined

supportsInterface

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

See {IERC165-supportsInterface}.

Parameters

Name
Type
Description

interfaceId

bytes4

undefined

Returns

Name
Type
Description

_0

bool

undefined

updateExtension

function updateExtension(IExtension.Extension _extension) external nonpayable

Parameters

Name
Type
Description

_extension

IExtension.Extension

undefined

Events

ExtensionAdded

event ExtensionAdded(address indexed extensionAddress, bytes4 indexed functionSelector, string functionSignature)

Parameters

Name
Type
Description

extensionAddress indexed

address

undefined

functionSelector indexed

bytes4

undefined

functionSignature

string

undefined

ExtensionRemoved

event ExtensionRemoved(address indexed extensionAddress, bytes4 indexed functionSelector, string functionSignature)

Parameters

Name
Type
Description

extensionAddress indexed

address

undefined

functionSelector indexed

bytes4

undefined

functionSignature

string

undefined

ExtensionUpdated

event ExtensionUpdated(address indexed oldExtensionAddress, address indexed newExtensionAddress, bytes4 indexed functionSelector, string functionSignature)

Parameters

Name
Type
Description

oldExtensionAddress indexed

address

undefined

newExtensionAddress indexed

address

undefined

functionSelector indexed

bytes4

undefined

functionSignature

string

undefined

Last updated