For the complete documentation index, see llms.txt. This page is also available as Markdown.

IAuthority

IAuthority

PermissionAdded

event PermissionAdded(address from, address target, uint8 permissionType)

Adds a permission for a role.

Possible roles are Role.ADAPTER, Role.FACTORY, Role.WHITELISTER

Parameters

Name
Type
Description

from

address

Address of the method caller.

target

address

Address of the approved wallet.

permissionType

uint8

Enum type of permission.

PermissionRemoved

event PermissionRemoved(address from, address target, uint8 permissionType)

Removes a permission for a role.

Possible roles are Role.ADAPTER, Role.FACTORY, Role.WHITELISTER

Parameters

Name
Type
Description

from

address

Address of the method caller.

target

address

Address of the approved wallet.

permissionType

uint8

Enum type of permission.

RemovedMethod

Removes an approved method.

Removes a mapping of method selector to adapter according to eip1967.

Parameters

Name
Type
Description

from

address

Address of the method caller.

adapter

address

Address of the adapter.

selector

bytes4

Bytes4 of the method signature.

WhitelistedMethod

Approves a new method.

Adds a mapping of method selector to adapter according to eip1967.

Parameters

Name
Type
Description

from

address

Address of the method caller.

adapter

address

Address of the adapter.

selector

bytes4

Bytes4 of the method signature.

Role

Permission

Mapping of permission type to bool.

Parameters

Name

Type

Description

addMethod

Allows a whitelister to whitelist a method. We do not save list of approved as better queried by events.

Parameters

Name
Type
Description

selector

bytes4

Bytes4 hex of the method selector.

adapter

address

Address of the adapter implementing the method.

removeMethod

Allows a whitelister to remove a method.

Parameters

Name
Type
Description

selector

bytes4

Bytes4 hex of the method selector.

adapter

address

Address of the adapter implementing the method.

setAdapter

Allows owner to set extension adapter address.

Parameters

Name
Type
Description

adapter

address

Address of the target adapter.

isWhitelisted

bool

Bool whitelisted.

setFactory

Allows an admin to set factory permission.

Parameters

Name
Type
Description

factory

address

Address of the target factory.

isWhitelisted

bool

Bool whitelisted.

setWhitelister

Allows the owner to set whitelister permission. Whitelister permission is required to approve methods in extensions adapter.

Parameters

Name
Type
Description

whitelister

address

Address of the whitelister.

isWhitelisted

bool

Bool whitelisted.

getApplicationAdapter

Returns the address of the adapter associated to the signature.

Parameters

Name
Type
Description

selector

bytes4

Hex of the method signature.

Return Values

Name
Type
Description

[0]

address

Address of the adapter.

isWhitelistedFactory

Provides whether a factory is whitelisted.

Parameters

Name
Type
Description

target

address

Address of the target factory.

Return Values

Name
Type
Description

[0]

bool

Bool is whitelisted.

isWhitelister

Provides whether an address is whitelister.

Parameters

Name
Type
Description

target

address

Address of the target whitelister.

Return Values

Name
Type
Description

[0]

bool

Bool is whitelisted.

Last updated