hardhat
hardhat copied to clipboard
hardhat-vyper plugin generates incompatible ABIs with typechain/ethers
Gas property in ABIs generated by the vyper compiler is number but typechain requires it to be string.
Reproduction steps:
- basic hardhat setup
npm i @nomiclabs/hardhat-vypernpm i @typechain/hardhat- set up
hardhat.config.tsand import install plugins - create some vyper contract in your project
- create a script that imports generated types of vyper contract
- try to run the script
- should result in type error

Hey @avele,
Shouldn't this be reported to typechain? Or is the gas property normally a string?
@alcuadrado yeah, gas property is a string usually. Also in my experience gas property is rarely included in ABI, so as another solution you could provide an option to opt out adding it.
Also encountering this issue with the latest typechain and vyper plugins for hardhat. I've created a ticket for typechain as well https://github.com/dethcrypto/TypeChain/issues/677
This can be closed now
Thank you for the reminder @frontier159!