🏦Smart Wallet (Vault)
The Vault is a modular smart contract wallet designed to securely hold and manage assets, execute deferred tasks, and interact with DeFi protocols.
Ditto offers the enhancement of the ERC4337 with 7579 support via Automate7579 to enable programmable smart account for deferred execution. Our SDK covers the creation of the standardized Smart Wallets with the Ditto Automation Module installed or porting already existing smart accounts to make them programmable.
Methods
getNextVaultId
Retrieves the next available Vault ID for the specified blockchain network. This method is useful for generating a new Vault without conflicts.
chainId
: The ID of the blockchain network.
getVaultAddress
Predicts the address of the Vault based on the specified chain ID and Vault ID. This method is useful for knowing the Vault address before actually deploying it.
chainId
: The ID of the blockchain network.vaultId
: The ID of the Vault.
createVault
Creates a new smart wallet (Vault) on the specified blockchain network. This method deploys the Vault contract and returns the deployed Vault instance.
chainId
: The ID of the blockchain network.vaultId
: The ID for the new Vault.
getDefaultOrCreate
Retrieves the default Vault for the specified chain ID and account address. If no default Vault exists, it creates a new one.
chainId
: The ID of the blockchain network.accountAddress
: The account address for which the default Vault is retrieved or created.
Last updated