I would like to have 100% code coverage but one function is giving trouble ...
(bool sent, bytes memory data) = _to.call{value: msg.value}("");
require(sent, "Failed to send Ether");
How to force the boolean 'sent' to false ?
Stack : hardhat, solidity, ethers.js, chai.js
I tried to modify the balance of the address which must pay :
await network.provider.send("hardhat_setBalance", [
"...address...",
"0x1000"
]);
But i don't go to the require, i've got this error :
sender doesn't have enough funds to send tx
Any idea please ?