Skip to content

Commit

Permalink
use pre 1559 gas price
Browse files Browse the repository at this point in the history
  • Loading branch information
zajck committed Oct 3, 2023
1 parent 09f6a21 commit 764e4c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/util/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ function readContracts(chainId, network, env) {
async function getFees() {
// const { baseFeePerGas } = await provider.getBlock();

const {maxPriorityFeePerGas, maxFeePerGas} = await provider.getFeeData();
let {gasPrice} = await provider.getFeeData();

gasPrice = gasPrice * 12n/10n;

// Set maxFeePerGas so it's likely to be accepted by the network
// maxFeePerGas = maxPriorityFeePerGas + 2 * lastBaseFeePerGas
return { maxPriorityFeePerGas, maxFeePerGas };

// return { maxPriorityFeePerGas, maxFeePerGas };
return { gasPrice };
// return { maxPriorityFeePerGas, maxFeePerGas: maxPriorityFeePerGas + BigInt(baseFeePerGas) * 2n };
}

Expand Down

0 comments on commit 764e4c0

Please sign in to comment.