TWAccountRouter
Methods
DEFAULT_ADMIN_ROLE
Returns
_0
bytes32
undefined
EXTENSION_ADMIN_ROLE
Returns
_0
bytes32
undefined
SIGNER_ROLE
Returns
_0
bytes32
undefined
addDeposit
Deposit funds for this account in Entrypoint.
addExtension
Parameters
_extension
IExtension.Extension
undefined
contractURI
Returns the contract metadata URI.
Returns
_0
string
undefined
entryPoint
Returns the EIP 4337 entrypoint contract.
Returns
_0
contract IEntryPoint
undefined
execute
Executes a transaction (called directly from an admin, or by entryPoint)
Parameters
_target
address
undefined
_value
uint256
undefined
_calldata
bytes
undefined
executeBatch
Executes a sequence transaction (called directly from an admin, or by entryPoint)
Parameters
_target
address[]
undefined
_value
uint256[]
undefined
_calldata
bytes[]
undefined
getAllExtensions
Returns all extensions stored. Override default lugins stored in router are given precedence over default extensions in DefaultExtensionSet.
Returns
allExtensions
IExtension.Extension[]
undefined
getAllFunctionsOfExtension
Returns all functions that belong to the given extension contract.
Parameters
_extensionName
string
undefined
Returns
_0
IExtension.ExtensionFunction[]
undefined
getDeposit
Returns the balance of the account in Entrypoint.
Returns
_0
uint256
undefined
getExtension
Returns the extension metadata and functions for a given extension.
Parameters
_extensionName
string
undefined
Returns
_0
IExtension.Extension
undefined
getExtensionForFunction
Returns the extension metadata for a given function.
Parameters
_functionSelector
bytes4
undefined
Returns
_0
IExtension.ExtensionMetadata
undefined
getExtensionImplementation
Returns the extension's implementation smart contract address.
Parameters
_extensionName
string
undefined
Returns
_0
address
undefined
getImplementationForFunction
Returns the extension implementation address stored in router, for the given function.
Parameters
_functionSelector
bytes4
undefined
Returns
extensionAddress
address
undefined
getRoleAdmin
Returns the admin role that controls the specified role.
See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
Returns
_0
bytes32
undefined
getRoleMember
Returns the role-member from a list of members for a role, at a given index.
Returns member
who has role
, at index
of role-members list. See struct {RoleMembers}, and mapping {roleMembers}
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
index
uint256
Index in list of current members for the role.
Returns
member
address
Address of account that has role
getRoleMemberCount
Returns total number of accounts that have a role.
Returns count
of accounts that have role
. See struct {RoleMembers}, and mapping {roleMembers}
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
Returns
count
uint256
Total number of accounts that have role
grantRole
Grants a role to an account, if not previously granted.
Caller must have admin role for the role
. Emits {RoleGranted Event}.
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
account
address
Address of the account to which the role is being granted.
hasRole
Checks whether an account has a particular role.
Returns true
if account
has been granted role
.
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
account
address
Address of the account for which the role is being checked.
Returns
_0
bool
undefined
hasRoleWithSwitch
Checks whether an account has a particular role; role restrictions can be swtiched on and off.
Returns true
if account
has been granted role
. Role restrictions can be swtiched on and off: - If address(0) has ROLE, then the ROLE restrictions don't apply. - If address(0) does not have ROLE, then the ROLE restrictions will apply.
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
account
address
Address of the account for which the role is being checked.
Returns
_0
bool
undefined
initialize
Parameters
_defaultAdmin
address
undefined
_contractURI
string
undefined
isValidSigner
Returns whether a signer is authorized to perform transactions using the wallet.
Parameters
_signer
address
undefined
Returns
_0
bool
undefined
multicall
Receives and executes a batch of function calls on this contract.
Receives and executes a batch of function calls on this contract.
Parameters
data
bytes[]
The bytes data that makes up the batch of function calls to execute.
Returns
results
bytes[]
The bytes data that makes up the result of the batch of function calls executed.
nonce
Returns the nonce of the account.
Returns
_0
uint256
undefined
onERC1155BatchReceived
Parameters
_0
address
undefined
_1
address
undefined
_2
uint256[]
undefined
_3
uint256[]
undefined
_4
bytes
undefined
Returns
_0
bytes4
undefined
onERC1155Received
Parameters
_0
address
undefined
_1
address
undefined
_2
uint256
undefined
_3
uint256
undefined
_4
bytes
undefined
Returns
_0
bytes4
undefined
onERC721Received
See {IERC721Receiver-onERC721Received}. Always returns IERC721Receiver.onERC721Received.selector
.
Parameters
_0
address
undefined
_1
address
undefined
_2
uint256
undefined
_3
bytes
undefined
Returns
_0
bytes4
undefined
removeExtension
Removes an existing extension from the router.
Parameters
_extensionName
string
undefined
renounceRole
Revokes role from the account.
Caller must have the role
, with caller being the same as account
. Emits {RoleRevoked Event}.
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
account
address
Address of the account from which the role is being revoked.
revokeRole
Revokes role from an account.
Caller must have admin role for the role
. Emits {RoleRevoked Event}.
Parameters
role
bytes32
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
account
address
Address of the account from which the role is being revoked.
setContractURI
Lets a contract admin set the URI for contract-level metadata.
Caller should be authorized to setup contractURI, e.g. contract admin. See {_canSetContractURI}. Emits {ContractURIUpdated Event}.
Parameters
_uri
string
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
supportsInterface
See {IERC165-supportsInterface}.
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
updateExtension
Parameters
_extension
IExtension.Extension
undefined
validateUserOp
Parameters
userOp
UserOperation
undefined
userOpHash
bytes32
undefined
missingAccountFunds
uint256
undefined
Returns
validationData
uint256
undefined
withdrawDepositTo
Withdraw funds for this account from Entrypoint.
Parameters
withdrawAddress
address payable
undefined
amount
uint256
undefined
Events
ContractURIUpdated
Parameters
prevURI
string
undefined
newURI
string
undefined
ExtensionAdded
Parameters
extensionAddress indexed
address
undefined
functionSelector indexed
bytes4
undefined
functionSignature
string
undefined
ExtensionRemoved
Parameters
extensionAddress indexed
address
undefined
functionSelector indexed
bytes4
undefined
functionSignature
string
undefined
ExtensionUpdated
Parameters
oldExtensionAddress indexed
address
undefined
newExtensionAddress indexed
address
undefined
functionSelector indexed
bytes4
undefined
functionSignature
string
undefined
Initialized
Parameters
version
uint8
undefined
RoleAdminChanged
Parameters
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
RoleGranted
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
RoleRevoked
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
Last updated