diff --git a/test/hardhat/pcsv3_test.ts b/test/hardhat/pcsv3_test.ts index ad16b30..67f2e26 100644 --- a/test/hardhat/pcsv3_test.ts +++ b/test/hardhat/pcsv3_test.ts @@ -137,7 +137,8 @@ describe("Pool lens test with PCSV3 on BSC", () => { it("Test getting all positions by owner", async () => { const totalSupply = await npm.read.totalSupply({ blockNumber }); - const owner = await npm.read.ownerOf([totalSupply - 1n], { blockNumber }); + const tokenId = await npm.read.tokenByIndex([totalSupply - 1n], { blockNumber }); + const owner = await npm.read.ownerOf([tokenId], { blockNumber }); const posArr = await getAllPositionsByOwner(PCSV3_NPM, owner, publicClient, blockNumber); await verifyPositionDetails(posArr); }); diff --git a/test/hardhat/univ3_test.ts b/test/hardhat/univ3_test.ts index 3690ff5..2d75346 100644 --- a/test/hardhat/univ3_test.ts +++ b/test/hardhat/univ3_test.ts @@ -135,7 +135,8 @@ describe("Pool lens test with UniV3 on mainnet", () => { it("Test getting all positions by owner", async () => { const totalSupply = await npm.read.totalSupply({ blockNumber }); - const owner = await npm.read.ownerOf([totalSupply - 1n], { blockNumber }); + const tokenId = await npm.read.tokenByIndex([totalSupply - 1n], { blockNumber }); + const owner = await npm.read.ownerOf([tokenId], { blockNumber }); const posArr = await getAllPositionsByOwner(UNIV3_NPM, owner, publicClient, blockNumber); await verifyPositionDetails(posArr); });