hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

hardhat-vyper plugin generates incompatible ABIs with typechain/ethers

Open avele opened this issue 4 years ago • 3 comments

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-vyper
  • npm i @typechain/hardhat
  • set up hardhat.config.ts and 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 image

avele avatar Jul 20 '21 14:07 avele

Hey @avele,

Shouldn't this be reported to typechain? Or is the gas property normally a string?

alcuadrado avatar Jul 22 '21 13:07 alcuadrado

@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.

avele avatar Sep 16 '21 11:09 avele

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

penandlim avatar Apr 22 '22 03:04 penandlim

This can be closed now

frontier159 avatar Aug 19 '22 20:08 frontier159

Thank you for the reminder @frontier159!

fvictorio avatar Oct 03 '22 10:10 fvictorio