Options for creating a gas estimator instance.

interface CreateGasEstimatorOptions {
    chain?: {
        chainId: number;
        eip1559: boolean;
        entryPoints?: {
            v060?: { address: string };
            v070?: {
                address: string;
                state?: { deposits: Record<string, { stateKey: string }> };
            };
        };
        isTestnet: boolean;
        name: string;
        nativeCurrency?: string;
        paymasters: {
            v060?: Record<string, { dummyPaymasterAndData: string; type: string }>;
            v070?: Record<
                string,
                { dummyPaymasterData: string; postOpGasLimit: bigint; type: string },
            >;
        };
        simulation?: {
            callGasLimit: bigint;
            preVerificationGas: bigint;
            verificationGasLimit: bigint;
        };
        smartAccountSupport: { nexus: boolean; smartAccountsV2: boolean };
        stack: ChainStack;
        stateOverrideSupport: {
            balance: boolean;
            bytecode: boolean;
            stateDiff: boolean;
        };
    };
    chainId: number;
    rpc: string
    | GasEstimatorRpcClient;
}

Properties

Properties

chain?: {
    chainId: number;
    eip1559: boolean;
    entryPoints?: {
        v060?: { address: string };
        v070?: {
            address: string;
            state?: { deposits: Record<string, { stateKey: string }> };
        };
    };
    isTestnet: boolean;
    name: string;
    nativeCurrency?: string;
    paymasters: {
        v060?: Record<string, { dummyPaymasterAndData: string; type: string }>;
        v070?: Record<
            string,
            { dummyPaymasterData: string; postOpGasLimit: bigint; type: string },
        >;
    };
    simulation?: {
        callGasLimit: bigint;
        preVerificationGas: bigint;
        verificationGasLimit: bigint;
    };
    smartAccountSupport: { nexus: boolean; smartAccountsV2: boolean };
    stack: ChainStack;
    stateOverrideSupport: {
        balance: boolean;
        bytecode: boolean;
        stateDiff: boolean;
    };
}

Optional chain configuration to override defaults

chainId: number

Chain ID of the target network

rpc: string | GasEstimatorRpcClient

RPC endpoint URL or client instance