From 903bbfedde6384179771dca0334d04f6141bc149 Mon Sep 17 00:00:00 2001 From: 0xDmitry Date: Thu, 8 Jun 2023 13:26:36 -0300 Subject: [PATCH] Fix Optimism transactions --- src/utils/gasUtils.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/utils/gasUtils.ts b/src/utils/gasUtils.ts index 882d0f39..4500a340 100644 --- a/src/utils/gasUtils.ts +++ b/src/utils/gasUtils.ts @@ -112,6 +112,21 @@ export const getGasPriceEIP1559 = (baseFeePerGas: BigNumber, appChainId: ChainsV maxPriorityFeePerGas: wei(2, 9), }, } + case Chains.optimism: + return { + low: { + maxFeePerGas: wei(baseFeePerGas, 9), + maxPriorityFeePerGas: wei(9, undefined, true), + }, + market: { + maxFeePerGas: wei(baseFeePerGas, 9).mul(wei(1.5, 9)), + maxPriorityFeePerGas: wei(14, undefined, true), + }, + aggressive: { + maxFeePerGas: wei(baseFeePerGas, 9).mul(wei(2, 9)), + maxPriorityFeePerGas: wei(18, undefined, true), + }, + } case Chains.polygon: return { low: {