Skip to content

Commit

Permalink
add baseFeeMultiplier to getGasCosts optional params
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Jan 2, 2025
1 parent 128767e commit d0d52bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/relayFeeCalculator/chain-queries/baseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ export class QueryBase implements QueryInterface {
options: Partial<{
gasPrice: BigNumberish;
gasUnits: BigNumberish;
baseFeeMultiplier: number;
transport: Transport;
}> = {}
): Promise<TransactionCostEstimate> {
const { gasPrice = this.fixedGasPrice, gasUnits, transport } = options;
const { gasPrice = this.fixedGasPrice, gasUnits, baseFeeMultiplier, transport } = options;

const tx = await populateV3Relay(this.spokePool, deposit, relayer);
const {
Expand All @@ -82,6 +83,7 @@ export class QueryBase implements QueryInterface {
} = await estimateTotalGasRequiredByUnsignedTransaction(tx, relayer, this.provider, {
gasPrice,
gasUnits,
baseFeeMultiplier,
transport,
});

Expand Down
7 changes: 6 additions & 1 deletion src/relayFeeCalculator/relayFeeCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export interface QueryInterface {
getGasCosts: (
deposit: Deposit,
relayer: string,
options?: Partial<{ gasPrice: BigNumberish; gasUnits: BigNumberish; transport: Transport }>
options?: Partial<{
gasPrice: BigNumberish;
gasUnits: BigNumberish;
baseFeeMultiplier: number;
transport: Transport;
}>
) => Promise<TransactionCostEstimate>;
getTokenPrice: (tokenSymbol: string) => Promise<number>;
getTokenDecimals: (tokenSymbol: string) => number;
Expand Down

0 comments on commit d0d52bd

Please sign in to comment.