Created
October 9, 2021 18:28
-
-
Save hellwolf/759eb27c2b1d4959a1b13fed5c474e22 to your computer and use it in GitHub Desktop.
send-1559tx.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function() { | |
const provider = new ethers.providers.JsonRpcProvider(PROVIDER_URL); | |
let wallet = new ethers.Wallet(PRIVATE_KEY); | |
wallet = wallet.connect(provider); | |
const tx = await wallet.sendTransaction({ | |
to: "0x07B02d301DE53eb9D1A6B7485Ac2065c53071645", | |
value: 1e15, | |
// maxPriorityFeePerGas + baseFeePerGas < maxFeePerGas | |
maxPriorityFeePerGas: 100e9, | |
maxFeePerGas: 200e9, | |
nonce: 25, | |
}); | |
console.log("tx", tx); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment