WalletManager

Logic for creating and managing smart contract wallets

renfter

contract IRenfter renfter

Renfter contract address

walletFactory

contract IWalletFactory walletFactory

WalletFactory contract address

holderWallets

mapping(address => address) holderWallets

User address to HolderWallet contract address

onlyRenfter

modifier onlyRenfter()

initialize

function initialize(address renfter_, address walletFactory_) external

Initializer function

Parameters

Name
Type
Description

renfter_

address

Renter contract address

walletFactory_

address

WalletFactory contract address

setWalletFactory

function setWalletFactory(address walletFactory_) external

Sets new walletFactory address

Parameters

Name
Type
Description

walletFactory_

address

New walletFactory address

_setWalletFactory

function _setWalletFactory(address walletFactory_) private

Sets WalletFactory contract address

Parameters

Name
Type
Description

walletFactory_

address

New WalletFactory contract address

createWallet

function createWallet(address user) public returns (address wallet)

Creates new holderWallet for user

Parameters

Name
Type
Description

user

address

User address

Return Values

Name
Type
Description

wallet

address

Address of newly created wallet

getWallet

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

Retrieves wallet address for user

Parameters

Name
Type
Description

user

address

User address

Return Values

Name
Type
Description

wallet

address

Wallet address

getOrCreateWallet

function getOrCreateWallet(address user) external returns (address wallet)

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

wallet

address

Wallet address

collectRewards

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

Collects rewards from given wallet

Parameters

Name
Type
Description

contracts

address[]

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

Last updated