-
Hi. I am able to use typechain types to generate types for use when doing testing However, is it possible to use the types generated on my front end? I tried to do below by adding a type :Demo to my greeterContract but I get a ts error "Type 'Contract' is missing the following properties from type 'Demo': contractName, addBalance, addCar, addMember, and 34 more"
Thanks
|
Beta Was this translation helpful? Give feedback.
Answered by
aalmada
May 10, 2022
Replies: 1 comment 3 replies
-
Hi! const web3Provider = provider as Web3Provider;
const greeterContract = Demo__factory.connect(
Greeter.address,
web3Provider ? web3Provider.getSigner() : provider,
); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
myhendry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I use the Typechain types on my front end. You just have to use the factory to connect to the contract. Something like this: