HardHat: Cannot read property "send" of undefined

Hi, I am trying to use truffle & web3 on hardhat with @openzeppelin/truffle-upgrades helpers. The problem i’m experiencing is the image below. Any idea how I can solve this issue?

1 Like

Hi @lucusra,

Welcome to the community :wave:

It looks like you are testing with Hardhat when you have Truffle migrations, is that correct?

Hi @abcoathup,

Thank you :slight_smile:

Yes, I am using Truffle migrations. I’m trying to move a project from Ganache to Hardhat for the accelerated production benefits. Unfortunately, the deployProxy seems to be hindering my progress :confused:

Let me know if there is anything I can provide to help clear things up!

I’m open to a private chat also if you’d prefer that.

1 Like

Hi @lucusra,

@openzeppelin/truffle-upgrades is built to work with Truffle, and does not work with Hardhat’s compatibility layer. This is something we could fix eventually but at the moment you need to use Hardhat with @openzeppelin/hardhat-upgrades, which works with hardhat-ethers.

2 Likes

Hi @frangio,

Thank you for the quick response. I’ll look into moving to ethers now, thank you :slight_smile:

2 Likes