Infernet
SDK
Reference
Payments
WalletFactory

WalletFactory

Git Source (opens in a new tab)

Responsible for creating and tracking Wallet(s)

State Variables

REGISTRY

Registry contract

Consumed as parameter during Wallet-creation

Registry private immutable REGISTRY;

wallets

address => is wallet created by factory?

View functionality exposed via isValidWallet()

mapping(address => bool) private wallets;

Functions

constructor

Initializes new WalletFactory

constructor(Registry registry);

Parameters

NameTypeDescription
registryRegistryregistry contract

createWallet

Creates new Wallet initially owned by owner

function createWallet(address initialOwner) external returns (address);

Parameters

NameTypeDescription
initialOwneraddressinitial owner

Returns

NameTypeDescription
<none>addressnewly-created Wallet address

isValidWallet

Checks if an address is a valid Wallet created by this WalletFactory

function isValidWallet(address wallet) external view returns (bool);

Parameters

NameTypeDescription
walletaddressaddress to check

Returns

NameTypeDescription
<none>booltrue if wallet is a valid Wallet, else false