.config
index.js
Packager files
package-lock.json
package.json
Config files
.replit
replit.nix
// Imports the Alchemy SDK
const { Alchemy, Network } = require("alchemy-sdk");
// Configures the Alchemy SDK
const config = {
apiKey: "alchemy-replit", // Replace with your API key
network: Network.ETH_MAINNET, // Replace with your network
};
// Creates an Alchemy object instance with the config to use for making requests
const alchemy = new Alchemy(config);
const main = async () => {
let owner = "0xe785E82358879F061BC3dcAC6f0444462D4b5330";
let tokenId = 44;
//Call the method to get the nfts owned by this address
let response = await alchemy.nft.getNftMetadata(owner, tokenId)
//Logging the response to the console
console.log(response)
};
main();