IWalletFactory
Inherits: IFactory
Interface for WalletFactory diamond extending IFactory
Combines FactoryBase functionality with wallet-specific functions and unified access control
Functions
createWallet
Create a wallet with specified parameters
function createWallet(string memory walletType) external payable returns (address walletAddress);
Parameters
walletType
string
Type of wallet to create (string-based)
Returns
walletAddress
address
Address of the created wallet
createWalletWithTemplate
Create a wallet using a specific template
function createWalletWithTemplate(string memory templateName, string memory walletType)
external
payable
returns (address walletAddress);
Parameters
templateName
string
Name of the template to use
walletType
string
Type of wallet to create (string-based)
Returns
walletAddress
address
Address of the created wallet
createWalletWithCustomFacets
Create a wallet with custom facets
function createWalletWithCustomFacets(string[] memory facetNames, string memory walletType)
external
payable
returns (address walletAddress);
Parameters
facetNames
string[]
Array of facet names to include
walletType
string
Type of wallet to create (string-based)
Returns
walletAddress
address
Address of the created wallet
createIndividualWallet
Create an individual wallet (convenience function)
function createIndividualWallet() external payable returns (address walletAddress);
Returns
walletAddress
address
Address of the created wallet
createEntityWallet
Create an entity wallet (convenience function)
function createEntityWallet() external payable returns (address walletAddress);
Returns
walletAddress
address
Address of the created wallet
createJointWallet
Create a joint wallet (convenience function)
function createJointWallet() external payable returns (address walletAddress);
Returns
walletAddress
address
Address of the created wallet
getTotalWalletCount
Get total number of wallets created
function getTotalWalletCount() external view returns (uint256);
Returns
<none>
uint256
Total wallet count
getUserWallets
Get wallet addresses for a specific user
function getUserWallets(address user) external view returns (address[] memory);
Parameters
user
address
User address
Returns
<none>
address[]
Array of wallet addresses
getUserWallets
Get caller's wallet addresses
function getUserWallets() external view returns (address[] memory);
Returns
<none>
address[]
Array of wallet addresses
getWalletInfo
Get wallet information by index
function getWalletInfo(uint256 index)
external
view
returns (address walletAddress, address owner, uint256 createdAt, string memory name, string memory walletType);
Parameters
index
uint256
Wallet index
Returns
walletAddress
address
The address of the wallet
owner
address
The owner of the wallet
createdAt
uint256
The timestamp when the wallet was created
name
string
The name of the wallet
walletType
string
The type of the wallet
isWalletFromFactory
Check if address is a wallet from this factory
function isWalletFromFactory(address wallet) external view returns (bool);
Parameters
wallet
address
Address to check
Returns
<none>
bool
True if wallet is from this factory
isWallet
Check if an address is a deployed wallet
function isWallet(address walletAddress) external view returns (bool);
Parameters
walletAddress
address
Address to check
Returns
<none>
bool
True if address is a deployed wallet
Events
WalletCreated
event WalletCreated(address indexed walletAddress, address indexed owner, string walletType);
Last updated
Was this helpful?