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
Name | Type | Description |
---|---|---|
registry | Registry | registry contract |
createWallet
Creates new Wallet
initially owned by owner
function createWallet(address initialOwner) external returns (address);
Parameters
Name | Type | Description |
---|---|---|
initialOwner | address | initial owner |
Returns
Name | Type | Description |
---|---|---|
<none> | address | newly-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
Name | Type | Description |
---|---|---|
wallet | address | address to check |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | true if wallet is a valid Wallet , else false |