Skip to content

Commit

Permalink
add relayer
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Feb 21, 2024
1 parent 1dd7638 commit da6abea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/relayFeeCalculator/chain-queries/baseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default abstract class QueryBase implements QueryInterface {
* @returns The gas estimate for this function call (multplied with the optional buffer).
*/
async getV3GasCosts(deposit: V3Deposit, relayer: string): Promise<TransactionCostEstimate> {
const tx = await populateV3Relay(this.spokePool, deposit);
const tx = await populateV3Relay(this.spokePool, deposit, relayer);
return estimateTotalGasRequiredByUnsignedTransaction(
tx,
relayer,
Expand Down
6 changes: 4 additions & 2 deletions src/utils/SpokeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { getNetworkName } from "./NetworkUtils";
export function populateV3Relay(
spokePool: Contract,
deposit: V3Deposit,
relayer: string,
repaymentChainId = deposit.destinationChainId
): Promise<PopulatedTransaction> {
const v3RelayData: V3RelayData = {
Expand All @@ -42,11 +43,12 @@ export function populateV3Relay(
deposit.updatedOutputAmount,
deposit.updatedRecipient,
deposit.updatedMessage,
deposit.speedUpSignature
deposit.speedUpSignature,
{ from: relayer }
);
}

return spokePool.populateTransaction.fillV3Relay(v3RelayData, repaymentChainId);
return spokePool.populateTransaction.fillV3Relay(v3RelayData, repaymentChainId, { from: relayer });
}

/**
Expand Down

0 comments on commit da6abea

Please sign in to comment.