Guys, I connect my metamask to local hardhat network and try to send some eth from hardhat console to metamask address, but don't get any..

in console firstly I get a signer:

[acc] = await ethers.getSigners();

then I just send transaction from acc to metamask account address like that

acc.sendTransaction({to: '0xC785e52F385562FEF59d274e2Fbd99F3DBD2F866', value: 100})

what I do wrong?

Mar 31, 2022, 8:06 PM
You didn't write who is the signer, is th signer your metamask account or the accounts that hardhat node provide ?
Apr 2, 2022, 8:54 AM
Metamask account. Also I've tried to import hatdhat account to metamask and then seen a transaction but it always fail with gas limit error, despite which gas limit I set
Apr 2, 2022, 9:23 AM
I don't get import hardhat account to metamask in what way ?
Apr 3, 2022, 6:41 AM

© 2024 Draquery.com All rights reserved.