Skip to content

Commit

Permalink
Update hardhat test to be more stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarlycow committed Jul 29, 2024
1 parent 70e2d2f commit 39f1731
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/hardhat/pcsv3_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe("Pool lens test with PCSV3 on BSC", () => {

it("Test getting all positions by owner", async () => {
const totalSupply = await npm.read.totalSupply({ blockNumber });
const tokenId = await npm.read.tokenByIndex([totalSupply - 1n], { blockNumber });
const tokenId = await npm.read.tokenByIndex([0n], { blockNumber });
const owner = await npm.read.ownerOf([tokenId], { blockNumber });
const posArr = await getAllPositionsByOwner(AMM, PCSV3_NPM, owner, publicClient, blockNumber);
await verifyPositionDetails(posArr);
Expand Down
2 changes: 1 addition & 1 deletion test/hardhat/slipstream_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe("Pool lens test with SlipStream on Base", () => {

it("Test getting all positions by owner", async () => {
const totalSupply = await npm.read.totalSupply({ blockNumber });
const tokenId = await npm.read.tokenByIndex([totalSupply - 1n], { blockNumber });
const tokenId = await npm.read.tokenByIndex([0n], { blockNumber });
const owner = await npm.read.ownerOf([tokenId], { blockNumber });
const posArr = await getAllPositionsByOwner(AMM, SLIPSTREAM_NPM, owner, publicClient, blockNumber);
await verifyPositionDetails(posArr);
Expand Down
2 changes: 1 addition & 1 deletion test/hardhat/univ3_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe("Pool lens test with UniV3 on mainnet", () => {

it("Test getting all positions by owner", async () => {
const totalSupply = await npm.read.totalSupply({ blockNumber });
const tokenId = await npm.read.tokenByIndex([totalSupply - 1n], { blockNumber });
const tokenId = await npm.read.tokenByIndex([0n], { blockNumber });
const owner = await npm.read.ownerOf([tokenId], { blockNumber });
const posArr = await getAllPositionsByOwner(AMM, UNIV3_NPM, owner, publicClient, blockNumber);
await verifyPositionDetails(posArr);
Expand Down

0 comments on commit 39f1731

Please sign in to comment.