hardhat-ignition
hardhat-ignition copied to clipboard
Add config field to enable legacy gas fields to network config
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