Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
LayneHaber committed Aug 23, 2024
1 parent 7b46545 commit c7550a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { NoSpokeConnector, NoHubConnector, NoProviderForDomain } from "../errors
import { ExtraPropagateParam } from "../operations/propagate";
import {
getJsonRpcProvider,
getL1ToL2MessageGasEstimator,
getParentToChildMessageGasEstimator,
getBaseFee,
getInterface,
getBestProvider,
Expand Down Expand Up @@ -62,7 +62,7 @@ export const getPropagateParams = async (

try {
const l2Provider = getJsonRpcProvider(l2RpcUrl);
const l1ToL2MessageGasEstimate = getL1ToL2MessageGasEstimator(l2Provider);
const l1ToL2MessageGasEstimate = getParentToChildMessageGasEstimator(l2Provider);

// example encoded payload: 0x4ff746f6000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000207465737400000000000000000000000000000000000000000000000000000000
// length = 200 not including 0x = 100 bytes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ import * as Mockable from "../../../../src/mockable";
import { getPropagateParams } from "../../../../src/tasks/propagate/helpers/arbitrum";
import { getInterfaceMock, propagateCtxMock, getBestProviderMock } from "../../../globalTestHook";
import { mock } from "../../../mock";
import { L1ToL2MessageGasEstimator } from "@arbitrum/sdk";
import { ParentToChildMessageGasEstimator } from "@arbitrum/sdk";

const requestContext = createRequestContext("test");

const estimateSubmissionFee = Promise.resolve(constants.One);
const estimateRetryableTicketGasLimit = Promise.resolve(constants.Two);
let l1ToL2: SinonStubbedInstance<L1ToL2MessageGasEstimator>;
let l1ToL2: SinonStubbedInstance<ParentToChildMessageGasEstimator>;

describe("Helpers: Arbitrum ", () => {
beforeEach(() => {
l1ToL2 = createStubInstance(L1ToL2MessageGasEstimator, { estimateSubmissionFee, estimateRetryableTicketGasLimit });
l1ToL2 = createStubInstance(ParentToChildMessageGasEstimator, {
estimateSubmissionFee,
estimateRetryableTicketGasLimit,
});
stub(Mockable, "getJsonRpcProvider").returns(createStubInstance(providers.JsonRpcProvider));
stub(Mockable, "getL1ToL2MessageGasEstimator").returns(l1ToL2);
stub(Mockable, "getParentToChildMessageGasEstimator").returns(l1ToL2);
stub(Mockable, "getBaseFee").resolves(BigNumber.from(1));
getInterfaceMock.returns({ encodeFunctionData: stub().resolves(mkBytes32("0xcalldadta")) });
});
Expand Down

0 comments on commit c7550a1

Please sign in to comment.