We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I love MockContract, but it can't be used when the mocked contract is used as an argument to a contract interface.
MockContract
Foo myFoo = Foo(fooAddress);
When fooAddress is an instance of MockContract, my test fails with the following error:
fooAddress
Error: Transaction reverted: function call to a non-contract account
How can we use MockContract in this scenario?
The text was updated successfully, but these errors were encountered:
Hi, I was able to bypass this issue by configuring my environment like this:
const { ethers, waffle } = require('hardhat'); const provider = waffle.provider;
Use it as the following for getting the wallets: const [owner, notOwner] = provider.getWallets();
On my project I have the same exact use case as you, ie: C3ProjectToken token = C3ProjectToken(tokenAddress);
and it works fine :)
Sorry, something went wrong.
No branches or pull requests
I love
MockContract
, but it can't be used when the mocked contract is used as an argument to a contract interface.When
fooAddress
is an instance ofMockContract
, my test fails with the following error:How can we use
MockContract
in this scenario?The text was updated successfully, but these errors were encountered: