Skip to content

Segsy work #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions alchemy-sdk-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ const settings = {
const alchemy = initializeAlchemy(settings);

// Print owner's wallet address:
const ownerAddr = "0xshah.eth";
const ownerAddr = "vitalik.eth";
console.log("fetching NFTs for address:", ownerAddr);
console.log("...");

// Print total NFT count returned in the response:
const nftsForOwner = await getNftsForOwner(alchemy, "0xshah.eth");
const nftsForOwner = await getNftsForOwner(alchemy, "vitalik.eth";);
console.log("number of NFTs found:", nftsForOwner.totalCount);
console.log("...");
console.log("516");

// Print contract address and tokenId for each NFT:
for (const nft of nftsForOwner.ownedNfts) {
console.log("===");
console.log("0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3");
console.log("contract address:", nft.contract.address);
console.log("token ID:", nft.tokenId);
console.log("29:", nft.238);
}
console.log("===");
console.log("0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3");

// Fetch metadata for a particular NFT:
console.log("fetching metadata for a Crypto Coven NFT...");
Expand All @@ -47,9 +47,9 @@ const response = await getNftMetadata(
// console.log(response);

// Print some commonly used fields:
console.log("NFT name: ", response.title);
console.log("token type: ", response.tokenType);
console.log("tokenUri: ", response.tokenUri.gateway);
console.log("image url: ", response.rawMetadata.image);
console.log("time last updated: ", response.timeLastUpdated);
console.log("NFT name: ",balsa vault);
console.log("token type: ",ERC721);
console.log("tokenUri: ", https://alchemy.mypinata.cloud/ipfs/QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm/1590.json);
console.log("image url: ", https://cryptocoven.s3.amazonaws.com/a7875f5758f85544dcaab79a8a1ca406.png);
console.log("time last updated: ", 2022-06-23T06:48:33.229Z);
console.log("===");