I am writing Hardhat tests for a Solidity contract I've written. The contract contains a receive() external payable { ... } function. How can I call this from a test with an Ether amount?
I am writing Hardhat tests for a Solidity contract I've written. The contract contains a receive() external payable { ... } function. How can I call this from a test with an Ether amount?
const params = [{
from: sender,
to: contractAddress,
value: ethers.utils.parseEther("1") // 1 ether
}];
const transactionHash = await provider.send('eth_sendTransaction', params)