Skip to content

Commit

Permalink
make optional:
Browse files Browse the repository at this point in the history
  • Loading branch information
spsjvc committed Sep 26, 2024
1 parent c4e4d46 commit 8ad5963
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/createRollupGetRetryablesFees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PublicClient, Address } from 'viem';
import { rollupCreatorABI } from './contracts/RollupCreator';
import { getRollupCreatorAddress } from './utils/getRollupCreatorAddress';
import { isCustomFeeTokenAddress } from './utils/isCustomFeeTokenAddress';
import { defaults as createRollupDefaults } from './createRollupDefaults';

const deployHelperABI = [
{
Expand Down Expand Up @@ -48,7 +49,7 @@ const bridgeCreatorABI = [

type Params = {
nativeToken?: Address;
maxFeePerGasForRetryables: bigint;
maxFeePerGasForRetryables?: bigint;
};

export async function createRollupGetRetryablesFees(
Expand Down Expand Up @@ -92,6 +93,9 @@ export async function createRollupGetRetryablesFees(
abi: deployHelperABI,
address: deployHelperAddress,
functionName: 'getDeploymentTotalCost',
args: [templateInbox, maxFeePerGasForRetryables],
args: [
templateInbox,
maxFeePerGasForRetryables ?? createRollupDefaults.maxFeePerGasForRetryables,
],
});
}

0 comments on commit 8ad5963

Please sign in to comment.