Closed wei3erHase closed 2 years ago
When using ETH-SDK, for example, the exported ABIs come with a gas parameter into the ABI, for example:
gas
{ "stateMutability":"view", "type":"function", "name":"balanceOf", "inputs":[ { "name":"arg0", "type":"address" } ], "outputs":[ { "name":"", "type":"uint256" } ], "gas":3533 }
When creating a Fake out of the exported ABIs, the typings of the fake warns the error
import ExportedABI from '../../eth-sdk/abis/mainnet/exported.json'; async()=>{ await smock.fake(ExportedABI);
Typing Error: Types of property 'gas' are incompatible.
Expected behaviour would be to ignore the property.
I believe this should be easily solvable with some Typescript adjustments maybe using Pick or Omit in order to grab only the necessary parameters.
id go for Pick, since you never really know what the devs are going to import to the ABIs
When using ETH-SDK, for example, the exported ABIs come with a
gas
parameter into the ABI, for example:When creating a Fake out of the exported ABIs, the typings of the fake warns the error
Typing Error: Types of property 'gas' are incompatible.
Expected behaviour would be to ignore the property.