All chains
    Preparing search index...

    Type Alias eth_estimate_gas

    eth_estimate_gas: RuntimeDescriptor<
        [
            tx: {
                access_list?: { address: SizedHex<20>; storage_keys: SizedHex<32>[] }[];
                authorization_list: {
                    address: SizedHex<20>;
                    chain_id: FixedSizeArray<4, bigint>;
                    nonce: FixedSizeArray<4, bigint>;
                    r: FixedSizeArray<4, bigint>;
                    s: FixedSizeArray<4, bigint>;
                    y_parity: FixedSizeArray<4, bigint>;
                }[];
                blob_versioned_hashes: SizedHex<32>[];
                blobs: Uint8Array[];
                chain_id?: FixedSizeArray<4, bigint>;
                from?: SizedHex<20>;
                gas?: FixedSizeArray<4, bigint>;
                gas_price?: FixedSizeArray<4, bigint>;
                input: { data?: Uint8Array; input?: Uint8Array };
                max_fee_per_blob_gas?: FixedSizeArray<4, bigint>;
                max_fee_per_gas?: FixedSizeArray<4, bigint>;
                max_priority_fee_per_gas?: FixedSizeArray<4, bigint>;
                nonce?: FixedSizeArray<4, bigint>;
                "r#type"?: number;
                to?: SizedHex<20>;
                value?: FixedSizeArray<4, bigint>;
            },
            config: {
                perform_balance_checks?: boolean;
                state_overrides?: [
                    SizedHex<20>,
                    {
                        balance?: ...;
                        code?: ...;
                        move_precompile_to_address?: ...;
                        nonce?: ...;
                        storage?: ...;
                    },
                ][];
                timestamp_override?: bigint;
            },
        ],
        ResultPayload<
            FixedSizeArray<4, bigint>,
            Enum<{ Data: Uint8Array; Message: string }>,
        >,
    >

    Estimates the amount of gas that a transactions requires.

    This function estimates the gas of the transaction according to the same binary search algorithm that's implemented in Geth. It stops when with an acceptable error ratio of 1.5% so that the algorithm terminates early.