Skip to content

Commit

Permalink
fix: lastSetupTxBlockNumber type
Browse files Browse the repository at this point in the history
  • Loading branch information
Julink-eth committed Jul 24, 2024
1 parent 0255e41 commit cd40e58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions packages/linea-ens-resolver/test/testL1ResolverLocal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe("Crosschain Resolver Local", () => {
signerL2Address,
l2ResolverAddress,
wrapperAddress;
let lastSetupTxBlockNumber: number;
let lastSetupTxBlockNumber: bigint;
let sendTransactionsPromise: NodeJS.Timeout;

before(async () => {
Expand Down Expand Up @@ -274,7 +274,7 @@ describe("Crosschain Resolver Local", () => {

const tx = await l2Resolver.setContenthash(subDomainNode, contenthash);
const txReceipt = await tx.wait();
lastSetupTxBlockNumber = txReceipt.blockNumber;
lastSetupTxBlockNumber = BigInt(txReceipt.blockNumber);

// Generate activity on Linea to make finalization events happen
const [maxPriorityFeePerGas, maxFeePerGas] = getAndIncreaseFeeData(
Expand Down Expand Up @@ -302,7 +302,9 @@ describe("Crosschain Resolver Local", () => {
const currentL2BlockNumberFinalized = await rollup.currentL2BlockNumber({
blockTag: "finalized",
});
expect(currentL2BlockNumberFinalized < lastSetupTxBlockNumber);
expect(lastSetupTxBlockNumber).to.be.greaterThan(
currentL2BlockNumberFinalized
);
await target
.setTarget(encodedname, l2ResolverAddress)
.then((tx) => tx.wait());
Expand Down
2 changes: 1 addition & 1 deletion packages/linea-ens-resolver/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function getAndIncreaseFeeData(

export async function waitForL2BlockNumberFinalized(
rollup: Contract,
afterBlockNo: number,
afterBlockNo: bigint,
pollingInterval: number
) {
let currentL2BlockNumberFinalized;
Expand Down

0 comments on commit cd40e58

Please sign in to comment.