You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current settings:
typechain@8.0.0
hardhat@2.9.3
@typechain/ethers-v5@10.0.0
@typechain/hardhat@6.0.0
Hello,
Thank you for making such a great tool its extremely helpful. I just have one concern:
Initially I was using typechain to generate my typescript bindings like so : typechain --target ethers-v5 'myabidirectory/mycontractabi.abi'
This worked fine,
and then I tried out the hardhat plugin and generated similar but slightly different bindings.
The biggest difference is that the hardhat-typechain-plugin bindings included a 'deploy()' function that binded to the contract constructor. The 'typechain' tool does not include such a function. The standard typechain ethers-v5 bindings only includes a 'deployed()' function which does not bind to the contract constructor.
I'm unable to do something like typechain --target hardhat 'myabidirectory/mycontractabi.abi'
because this results in the error : Error occured: HH5: HardhatContext is not created
My question is, is it possible to use the typechain command to generate the same bindings that the hardhat-typechain-plugin is generating and if so how?
The 'deploy' function that hardhat-typechain bindings generate is extremely useful, I dont see any bindings in ethers-v5 target that supports the contract constructor.
Any help is greatly appreciated :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Current settings:
typechain@8.0.0
hardhat@2.9.3
@typechain/ethers-v5@10.0.0
@typechain/hardhat@6.0.0
Hello,
Thank you for making such a great tool its extremely helpful. I just have one concern:
Initially I was using typechain to generate my typescript bindings like so :
typechain --target ethers-v5 'myabidirectory/mycontractabi.abi'
This worked fine,
and then I tried out the hardhat plugin and generated similar but slightly different bindings.
The biggest difference is that the hardhat-typechain-plugin bindings included a 'deploy()' function that binded to the contract constructor. The 'typechain' tool does not include such a function. The standard typechain ethers-v5 bindings only includes a 'deployed()' function which does not bind to the contract constructor.
I'm unable to do something like
typechain --target hardhat 'myabidirectory/mycontractabi.abi'
because this results in the error :
Error occured: HH5: HardhatContext is not created
My question is, is it possible to use the typechain command to generate the same bindings that the hardhat-typechain-plugin is generating and if so how?
The 'deploy' function that hardhat-typechain bindings generate is extremely useful, I dont see any bindings in ethers-v5 target that supports the contract constructor.
Any help is greatly appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions