signerToSafeSmartAccount
Creates a Safe smart account instance controlled by a SmartAccountSigner.
Usage
import { ENTRYPOINT_ADDRESS_V07 } from "permissionless"
import { signerToSafeSmartAccount } from "permissionless/accounts"
import { publicClient } from "./publicClient"
import { signer } from "./signer"
 
const safeAccount = await signerToSafeSmartAccount(publicClient, {
    signer,
    safeVersion: "1.4.1",
    entryPoint: ENTRYPOINT_ADDRESS_V07,
})Returns
- Type: SafeSmartAccount
The smart account instance.
Parameters
signer
- Type: SmartAccountSigner
The signer that will be used to sign messages and user operations.
safeVersion
- Type: 1.4.1
The version of the Safe contract that will be used.
entryPoint
- Type: Address
The address of the EntryPoint contract.
saltNonce (optional)
- Type: bigint
The salt nonce that will be used to deploy the smart account. If not provided, 0 will be used.
addModuleLibAddress (optional)
- Type: Address
The address of the AddModuleLib contract. If not provided, the default address for the Safe version will be used.
safe4337ModuleAddress (optional)
- Type: Address
The address of the Safe4337Module contract. If not provided, the default address for the Safe version will be used.
safeProxyFactoryAddress (optional)
- Type: Address
The address of the SafeProxyFactory contract. If not provided, the default address for the Safe version will be used.
safeSingletonAddress (optional)
- Type: Address
The address of the SafeSingleton contract. If not provided, the default address for the Safe version will be used.
multiSendAddress (optional)
- Type: Address
The address of the MultiSend contract. If not provided, the default address for the Safe version will be used.
multiSendCallOnlyAddress (optional)
- Type: Address
The address of the MultiSendCallOnly contract. If not provided, the default address for the Safe version will be used.
safeModules (optional)
- Type: Address[]
The addresses of the Safe modules that will be added during deployment.
setupTransactions (optional)
- Type: Call[]
An array of calls that will be executed during the deployment of the smart account (when the initCode is executed).
address (optional)
- Type: Address
The address of the smart account. If not provided, the determinstic smart account address will be used.