From 2d1cc158dfdf7b7896f348f9a842de313250a81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pr=C3=A9vost?= <998369+prevostc@users.noreply.github.com> Date: Mon, 27 May 2024 14:54:28 +0200 Subject: [PATCH] Fix mode --- src/lib/config.ts | 2 +- src/lib/rpc-actions/aggressivelyWriteContract.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/config.ts b/src/lib/config.ts index 61b18ae..e4e0665 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -536,7 +536,7 @@ export const RPC_CONFIG: Record = { url: RPC_FORCE_URL || process.env.MODE_RPC_URL || 'https://mainnet.mode.network', transaction: { ...defaultTransactionConfig, - type: 'eip1559', + type: 'legacy', maxNativePerTransactionWei: bigintMultiplyFloat(ONE_ETHER, 0.01), }, harvest: { diff --git a/src/lib/rpc-actions/aggressivelyWriteContract.ts b/src/lib/rpc-actions/aggressivelyWriteContract.ts index 65500db..c4f5111 100644 --- a/src/lib/rpc-actions/aggressivelyWriteContract.ts +++ b/src/lib/rpc-actions/aggressivelyWriteContract.ts @@ -151,13 +151,9 @@ export async function aggressivelyWriteContract< }); logger.debug({ msg: 'Got nonce', data: { chain, address: args.address, nonce } }); - let gasParams = await publicClient.estimateFeesPerGas({ + const gasParams = await publicClient.estimateFeesPerGas({ type: rpcConfig.transaction.type, }); - if (chain === 'mode') { - // @ts-ignore - gasParams = {}; - } logger.debug({ msg: 'Got gas params', data: { chain, address: args.address, gasParams } }); const allPendingTransactions: Hex[] = [];