4

I tried both signer.sendTransaction({ to, value }); and provider.send("eth_sendTransaction", [{ from, to, value }]);, and neither worked for me.

Would be great if your answer could also include an account impersonation example, as that's exactly why I need to send ETH. Impersonated accounts would most likely have 0 ETH, and so would need to have some ETH sent over before being used to initiate any TX.

1 Answer 1

3

Here is how I am getting the accounts

    const [owner,  feeCollector, operator] = await ethers.getSigners();
    await owner.sendTransaction({
      to: operator.address,
      value: ethers.utils.parseEther("1.0"), // Sends exactly 1.0 ether
    });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.