Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofgazso committed Feb 6, 2024
1 parent 8c46986 commit 4121b35
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/utils/src/validation.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import {
type Address,
EntryPointAbi,
RpcError,
type Address,
type UserOperation
} from "@alto/types"
import {
type Chain,
ContractFunctionExecutionError,
ContractFunctionRevertedError,
EstimateGasExecutionError,
FeeCapTooLowError,
InsufficientFundsError,
IntrinsicGasTooLowError,
NonceTooLowError,
type PublicClient,
TransactionExecutionError,
type Transport,
concat,
encodeAbiParameters,
getContract,
getFunctionSelector,
serializeTransaction,
toBytes,
toHex
toHex,
type Chain,
type PublicClient,
type Transport
} from "viem"
import * as chains from "viem/chains"
import { type Logger, getGasPrice } from "."
import { getGasPrice, type Logger } from "."

export interface GasOverheads {
/**
Expand Down Expand Up @@ -173,12 +173,13 @@ export async function calcPreVerificationGas(
preVerificationGas *= 2n
} else if (
chainId === chains.optimism.id ||
chainId === chains.optimismSepolia.id ||
chainId === chains.optimismGoerli.id ||
chainId === chains.base.id ||
chainId === chains.baseGoerli.id ||
chainId === chains.baseSepolia.id ||
chainId === chains.opBNB.id ||
chainId === chains.opBNBTestnet.id ||
chainId === chains.baseSepolia.id ||
chainId === 957 // Lyra chain
) {
preVerificationGas = await calcOptimismPreVerificationGas(
Expand Down Expand Up @@ -234,7 +235,9 @@ export async function calcVerificationGasAndCallGasLimit(
let callGasLimit =
calculatedCallGasLimit > 9000n ? calculatedCallGasLimit : 9000n

if (chainId === chains.baseGoerli.id || chainId === chains.base.id) {
if (chainId === chains.baseGoerli.id ||
chainId === chains.baseSepolia.id ||
chainId === chains.base.id) {
callGasLimit = (110n * callGasLimit) / 100n
}

Expand Down

0 comments on commit 4121b35

Please sign in to comment.