Smart Account
Hooks
The hooks offer tools for efficient smart account management:
useGetAccountAddress
: Retrieves the smart account's address linked to the wallet.useGetAccountVersion
: Retrieces the smart account's version even if the account is not deployed yetuseSmartAccountVersion
: Retrieves the smart account's version, but only if it is already deployed, and it will revert for v1 smart accounts (because function was not implemented in that smart contract)useSmartAccount
: Retrieves the the account of an owner, returning additional informationuseAccountImplementationAddress
: Returns the implementation address of a specific version; this hook is useful when upgrading the smart account of the useruseCurrentAccountImplementationVersion
: Returns the latest (and currently used) implementation version of the smart accounts used by the factoryuseUpgradeRequired
: Returns if a smart account needs an upgrade (even if it's not yet deployed)useUpgradeRequiredForAccount
: As above but only if the account is not yet deployeduseIsSmartAccountDeployed
: Verifies the deployment status of the smart account.useHasV1SmartAccount
: Checks for a legacy version's existence.useUpgradeSmartAccount
: Hook to create a transaction to upgrade the smart account to a specific version
Usage
Last updated
Was this helpful?