Replies: 1 comment
-
The code snippet does not seem to be involving ethers.js at all.
This address seems to be a wallet address. I assume that should be an NFT contract for it to work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
// Setup: npm install alchemy-sdk
import { Alchemy, Network } from "alchemy-sdk";
const config = {
apiKey: "GR-bzrCwBLNTZTyiDDgQQStDIU4roiyS",
network: Network.ETH_MAINNET,
};
const alchemy = new Alchemy(config);
const main = async () => {
// TIMEPieces contract address
const address = "0x2953399124F0cBB46d2CbACD8A89cF0599974963";
// Safe Haven Token ID
const tokenId = "22814226546495036352186613407982797376672736561543061742014763990998275063809";
// Get owner of NFT
const owner = await alchemy.nft.getOwnersForNft(address, tokenId);
console.log(owner);
};
const runMain = async () => {
try {
await main();
process.exit(0);
} catch (error) {
console.log(error);
process.exit(1);
}
};
runMain();
Beta Was this translation helpful? Give feedback.
All reactions