Open
Description
Workaround: (maintainer edit for visibility)
As of 0.8.12, viem should work with coverage if you set an environment variable before the command as below:
SOLIDITY_COVERAGE=true npx hardhat coverage
----- Original Issue -----
Using hardhat viem:
const token = await hre.viem.getContractAt(
'MyContract',
contractAddress,
{
walletClient,
}
);
Overriding the wallet client to test calling a contract from a different EOA doesn't seem to work properly (only when using solidity coverage)
await token.write.mint(); // does not call with the context of the `walletClient`