erc7579

Config for a ERC7579 modular smart wallet.

This configuration is in BETA, expect breaking changes.

Example

import { sepolia } from "thirdweb/chains";
import { smartWallet, Config } from "thirdweb/wallets/smart";
const modularSmartWallet = smartWallet(
Config.erc7579({
chain: sepolia,
sponsorGas: true,
factoryAddress: "0x...", // the 7579 factory address
validatorAddress: "0x...", // the default validator module address
}),
});
function erc7579(options: ERC7579Config): SmartWalletOptions;

Parameters

Optional overrides for the smart wallet.

Type

let options: SmartWalletOptions & {
factoryAddress: string;
validatorAddress: string;
};

Returns

let returnType: Prettify<
{
chain: Chain;
factoryAddress?: string;
overrides?: {
accountAddress?: string;
accountSalt?: string;
bundlerUrl?: string;
createAccount?: (
factoryContract: ThirdwebContract,
admin: string,
entrypointAddress?: string;
execute?: (
accountContract: ThirdwebContract,
transaction: SendTransactionOption,
executeBatch?: (
accountContract: ThirdwebContract,
transactions: Array<SendTransactionOption>,
getAccountNonce?: (
accountContract: ThirdwebContract,
) => Promise<bigint>;
paymaster?: (
userOp: UserOperationV06 | UserOperationV07,
) => Promise<PaymasterResult>;
predictAddress?: (
factoryContract: ThirdwebContract,
admin: string,
) => Promise<string>;
signMessage?: (options: {
accountContract: ThirdwebContract;
adminAccount: Account;
factoryContract: ThirdwebContract;
message: SignableMessage;
}) => Promise<Hex>;
signTypedData?: (options: {
accountContract: ThirdwebContract;
adminAccount: Account;
factoryContract: ThirdwebContract;
typedData: ox__TypedData.Definition<typedData, primaryType>;
}) => Promise<Hex>;
tokenPaymaster?: TokenPaymasterConfig;
};
sessionKey?: { address: string; permissions: AccountPermissions };
} & ({ gasless: boolean } | { sponsorGas: boolean })
>;

The smart wallet options.