Skip to content

Commit

Permalink
[#787]
Browse files Browse the repository at this point in the history
Use BigInt instead of ethers.toBigInt
  • Loading branch information
akshay-ap committed Jul 17, 2024
1 parent b0dc5ad commit 5f6694c
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions test/libraries/SafeMigration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ describe("SafeMigration Library", () => {

expect(await hre.ethers.provider.getStorage(safeAddress, 3)).to.be.eq(ownerCountBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 4)).to.be.eq(thresholdBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(
BigInt(nonceBeforeMigration) + 1n,
);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(BigInt(nonceBeforeMigration) + 1n);
expect(await hre.ethers.provider.getStorage(safeAddress, GUARD_STORAGE_SLOT)).to.be.eq(guardBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, FALLBACK_HANDLER_STORAGE_SLOT)).to.be.eq(
fallbackHandlerBeforeMigration,
Expand Down Expand Up @@ -223,9 +221,7 @@ describe("SafeMigration Library", () => {

expect(await hre.ethers.provider.getStorage(safeAddress, 3)).to.be.eq(ownerCountBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 4)).to.be.eq(thresholdBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(
ethers.toBigInt(nonceBeforeMigration) + ethers.toBigInt(1),
);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(BigInt(nonceBeforeMigration) + 1n);
expect(await hre.ethers.provider.getStorage(safeAddress, GUARD_STORAGE_SLOT)).to.be.eq(guardBeforeMigration);
});
});
Expand Down Expand Up @@ -278,9 +274,7 @@ describe("SafeMigration Library", () => {

expect(await hre.ethers.provider.getStorage(safeAddress, 3)).to.be.eq(ownerCountBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 4)).to.be.eq(thresholdBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(
ethers.toBigInt(nonceBeforeMigration) + ethers.toBigInt(1),
);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(BigInt(nonceBeforeMigration) + 1n);
expect(await hre.ethers.provider.getStorage(safeAddress, GUARD_STORAGE_SLOT)).to.be.eq(guardBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, FALLBACK_HANDLER_STORAGE_SLOT)).to.be.eq(
fallbackHandlerBeforeMigration,
Expand Down Expand Up @@ -341,9 +335,7 @@ describe("SafeMigration Library", () => {

expect(await hre.ethers.provider.getStorage(safeAddress, 3)).to.be.eq(ownerCountBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 4)).to.be.eq(thresholdBeforeMigration);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(
ethers.toBigInt(nonceBeforeMigration) + ethers.toBigInt(1),
);
expect(await hre.ethers.provider.getStorage(safeAddress, 5)).to.be.eq(BigInt(nonceBeforeMigration) + 1n);
expect(await hre.ethers.provider.getStorage(safeAddress, GUARD_STORAGE_SLOT)).to.be.eq(guardBeforeMigration);
});
});
Expand Down

0 comments on commit 5f6694c

Please sign in to comment.