IWalletManager

Interface for creating and managing wallet

setWalletFactory

function setWalletFactory(address walletFactory_) external

Sets new walletFactory address

Parameters

Name
Type
Description

walletFactory_

address

New walletFactory address

createWallet

function createWallet(address user) external returns (address)

Creates new holderWallet for user

Parameters

Name
Type
Description

user

address

User address

Return Values

Name
Type
Description

[0]

address

Address of newly created wallet

getWallet

function getWallet(address user) external view returns (address)

Retrieves wallet address for user

Parameters

Name
Type
Description

user

address

User address

Return Values

Name
Type
Description

[0]

address

Wallet address

getOrCreateWallet

function getOrCreateWallet(address user) external returns (address)

Retrieves wallet address if already exists. Otherwise, creates new one

Parameters

Name
Type
Description

user

address

Address of account wallet is associated to

Return Values

Name
Type
Description

[0]

address

Wallet address

collectRewards

function collectRewards(address[] rewardContracts, uint256[] tokenIds) external

Collects rewards from given wallet

Parameters

Name
Type
Description

rewardContracts

address[]

Array of smart contract addresses (tokens) rewards has been send to wallet

tokenIds

uint256[]

Array of token identifiers

transferToken

function transferToken(address oContract, address wallet, address to, uint256 tokenId) external

Transfer token with tokenId from wallet to to

Parameters

Name
Type
Description

oContract

address

Contract address

wallet

address

Wallet address holding token

to

address

Token receiver

tokenId

uint256

Token identifier

executeCall

function executeCall(address wallet, address oContract, bytes data) external payable

Executes custom call via wallet on oContract with data

Parameters

Name
Type
Description

wallet

address

Wallet address

oContract

address

Contract address

data

bytes

Calldata passed via call

WalletFactoryChanged

event WalletFactoryChanged(address newWalletFactory)

Emitted when walletFactory address changed

Parameters

Name
Type
Description

newWalletFactory

address

New walletFactory address

WalletExists

error WalletExists(address user)

Triggered when wallet already exists for user

Parameters

Name
Type
Description

user

address

User address

WalletNotExist

error WalletNotExist(address user)

Triggred when wallet does not exist for user

Parameters

Name
Type
Description

user

address

User address

SenderNotRenfter

error SenderNotRenfter(address sender)

Triggered when transaction sender is not renfter contract

Parameters

Name
Type
Description

sender

address

Transaction sender

WrappedTokenCannotBeReward

error WrappedTokenCannotBeReward()

Triggered when transfer of wrapped token as reward is attempted

ArraysNotSameSize

error ArraysNotSameSize()

Triggered when passed arrays not of the same size

Last updated