is there a way to set overrides like chainId, maxFeePerGas, and maxPriorityFeePerGas explicitly when using hardhat & ethers?

i thought about using hardhat's generated contract classes in production code because they are typed so nicely. however, hardhat defines the type of the overrides as follows for some reason:

Overrides & { from?: PromiseOrValue }

there seem to be no runtime restrictions, so passing something like

{
maxFeePerGas: 6e9,
maxPriorityFeePerGas: 1e9,
} as any

does actually work. However, this can't be the way to go. Also: setting the chain ID like that does not work

Is there a different way to set these overrides?

Jul 27, 2022, 6:42 PM

© 2024 Draquery.com All rights reserved.