Skip to content

Possible to use types generated on front end? #687

Answered by aalmada
myhendry asked this question in Q&A
Discussion options

You must be logged in to vote

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:

const web3Provider = provider as Web3Provider;
const greeterContract = Demo__factory.connect(
      Greeter.address,
      web3Provider ? web3Provider.getSigner() : provider,
    );

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@myhendry
Comment options

@aalmada
Comment options

@krzkaczor
Comment options

Answer selected by myhendry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants