HolderWallet

Contract used as escrow for original tokens wrapped by protocol

VALID_1271_SIGNATURE

bytes4 VALID_1271_SIGNATURE

Constant returned when passed signature in ERC-1271 compatible method is valid

INVALID_1271_SIGNATURE

bytes4 INVALID_1271_SIGNATURE

Constant returned when passed signature in ERC-1271 compatible method is invalid

_operator

address _operator

Address of operator

_user

address _user

Address of account wallet is associated to

onlyOperator

modifier onlyOperator()

initialize

function initialize(address operator, address user) external

Initializer for the wallet

Parameters

Name
Type
Description

operator

address

Wallet owner address

user

address

Address of account wallet is associated to

isValidSignature

function isValidSignature(bytes32 hash, bytes signature) external view returns (bytes4)

Should return whether the signature provided is valid for the provided data

Parameters

Name
Type
Description

hash

bytes32

Hash of the data to be signed

signature

bytes

Signature byte array associated with _data

execute

function execute(address to, bytes data) external payable returns (bytes)

Executes call defined by passed parameters

Parameters

Name
Type
Description

to

address

Target smart contract

data

bytes

Calldata send via call (function + data)

Return Values

Name
Type
Description

[0]

bytes

Data returned as result of contact call

getUser

function getUser() external view returns (address)

Retrieves user associated to HolderWallet contract

Return Values

Name
Type
Description

[0]

address

Address of user

getOperator

function getOperator() external view returns (address)

Retrieves operator associated to HolderWallet contract

Return Values

Name
Type
Description

[0]

address

Address of operator

_setOperator

function _setOperator(address operator) private

Sets operator address

Parameters

Name
Type
Description

operator

address

New operator address

_setUser

function _setUser(address user) private

Sets address of user associated to wallet

Parameters

Name
Type
Description

user

address

New user address

Last updated