7

I am trying those methods (both) and neither worked for me:

signer.sendTransaction({ to, value });

(and)

provider.send("eth_sendTransaction", [{ from, to, value }]);

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.

Gonzalo Cugiani
  • 384
  • 2
  • 14
Ahmed Ihsan Tawfeeq
  • 4,524
  • 2
  • 19
  • 47

1 Answers1

9

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
    });
GraphicalDot
  • 425
  • 4
  • 11