MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / ethSendTransaction

Function ethSendTransaction

packages/example-project/scripts/ledger.ts:32–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30// await ethSignTypedDataV4();
31
32async function ethSendTransaction() {
33 const txParams = {
34 // Shared properties
35 to: hardhatAddress,
36 value: 10000000n,
37 gasLimit: 310000n,
38
39 // Enable the properties that you need for a specific transaction type
40 // and comment out the ones that you don't need
41
42 // eip1559
43 maxFeePerGas: 1000000000n,
44 maxPriorityFeePerGas: 1000000000n,
45
46 // eip2930
47 //gasPrice: 999999345n,
48 //accessList: [],
49
50 // legacy
51 // gasPrice: 999999345n,
52 };
53
54 await ledgerSigner.sendTransaction(txParams);
55}
56
57async function ethSign() {
58 const msg = ethers.toUtf8Bytes("Hello eth_sign");

Callers 1

ledger.tsFile · 0.85

Calls 1

sendTransactionMethod · 0.45

Tested by

no test coverage detected