import { ethers } from "ethers"; export const getTokenByIndex = async ( reliquaryContract: ethers.Contract, index: number ) => { try { const tokenId = await reliquaryContract.tokenByIndex(index); return tokenId.toNumber(); } catch (error) { return error; } };