hardhat-ignition icon indicating copy to clipboard operation
hardhat-ignition copied to clipboard

Add config field to enable legacy gas fields to network config

Open zoeyTM opened this issue 11 months ago • 0 comments

Rather than support and maintain a potentially indefinite list of networks who require legacy gas fields, we want to add a new field to HardhatNetworkUserConfig.ignition called useLegacyGasFields that will enable this functionality on a per-network basis.

Something like this:

export interface HardhatNetworkUserConfig {
    ignition?: {
      maxFeePerGasLimit?: bigint;
      maxPriorityFeePerGas?: bigint;
      gasPrice?: bigint;
      disableFeeBumping?: boolean;
      useLegacyGasFields?: boolean;
    };
  }

  export interface HardhatNetworkConfig {
    ignition: {
      maxFeePerGasLimit?: bigint;
      maxPriorityFeePerGas?: bigint;
      gasPrice?: bigint;
      disableFeeBumping?: boolean;
      useLegacyGasFields?: boolean;
    };
  }

  export interface HttpNetworkUserConfig {
    ignition?: {
      maxFeePerGasLimit?: bigint;
      maxPriorityFeePerGas?: bigint;
      gasPrice?: bigint;
      disableFeeBumping?: boolean;
      useLegacyGasFields?: boolean;
    };
  }

  export interface HttpNetworkConfig {
    ignition: {
      maxFeePerGasLimit?: bigint;
      maxPriorityFeePerGas?: bigint;
      gasPrice?: bigint;
      disableFeeBumping?: boolean;
      useLegacyGasFields?: boolean;
    };
  }

That would enable the logic here:

https://github.com/NomicFoundation/hardhat-ignition/blob/development/packages/core/src/internal/execution/jsonrpc-client.ts#L649-L652

zoeyTM avatar Nov 27 '24 06:11 zoeyTM