title: Flushing pending ethereum transactions with ethers
body: <p>I'm trying to work out how to clear a pending transaction with the ethers library.</p>
  <p>It's ERC20 transfer function that's been called, several times, and quite a few stuck pending.</p>
  <p>So, I thought I'd just be able to use ethers library to sendTransaction with the same nonce to flush the transactions.</p>
  <p>What I've tried, assuming 100gwei;</p>
  <pre class="lang-js prettyprint-override"><code>const tx = {
    gasPrice: ethers.BigNumber.from(100000000000),
    nonce: 1,
  }
  
  wallet.sendTransaction(tx)
  </code></pre>
  <p>Which results in <code>&quot;err: max fee per gas less than block base fee: address xxx, maxFeePerGas: 100000000000 baseFee: 110470877095 (supplied gas 10440696)&quot;}}'</code>.</p>
  <p>Uncertain if I'm supposed to have a <code>to</code> in the transaction, and also... supplied gas, should I be adding a <code>gasLimit</code> to the transaction? Uncertain if <code>data</code> or <code>value</code> should contain anything, as cancelling a transaction is done with a 0 value right?</p>
  <hr />
  <p>I accidentally cancelled the two first transactions instead by removing the gasPrice and just including the nonce. Damnit, now I have to figure out if I have to cancel all those after or if I can send in transactions with the same nonce.</p>