Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

ethers.getContract is not a function #114

Closed
technophile-04 opened this issue Aug 25, 2022 · 8 comments
Closed

ethers.getContract is not a function #114

technophile-04 opened this issue Aug 25, 2022 · 8 comments

Comments

@technophile-04
Copy link
Contributor

Describe the bug
I was trying to deploy a contract with hardhat-deploy and got this error ethers.getContract is not a function. Although we wrapped hardhat-deploy-ethers in package.json still its giving me this error.

Screenshots
Screenshot 2022-08-25 at 3 40 15 PM

@technophile-04
Copy link
Contributor Author

@ShravanSunder could you please help me with this...I tried yarn add @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers again inside packages/hardhat-ts and also made sure import '@nomiclabs/hardhat-ethers' is present in
hardhat.config.ts also this solution/references I tired :

@paOol
Copy link

paOol commented Sep 6, 2022

+1,

ran into this issue a bunch of times as well.

@ShravanSunder
Copy link
Member

@technophile-04 are you using the base release branch without any changes?

@technophile-04
Copy link
Contributor Author

Yes using the release branch

@ShravanSunder
Copy link
Member

@technophile-04 did you run yarn compile first?

I'm also releasing a larger next branch change into release soon so that might help as well.

@technophile-04
Copy link
Contributor Author

Eagerly Waiting for new changes @ShravanSunder 🤩!.... Yes first I ran yarn contracts:build and then yarn deploy but not working. I tried tinkering to get it worked by migrating to hardhat-toolbox instead. But don't know if I migrated it correctly :(.

Thanks so much for maintaining this repo 🙏.

@ShravanSunder
Copy link
Member

ShravanSunder commented Sep 14, 2022

@technophile-04 i just merged the new version, it has a CLI and is slightly different. Checkout the readme for more info.

It should be updated to hardhat-toolbox as well. Here's a video overview: https://www.youtube.com/watch?v=bEd6wV2H28g

@technophile-04
Copy link
Contributor Author

Just tried it out and it's fixed now 🤩... Thanks so much @ShravanSunder !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants