5

Python developer here, very interested in the ETH ecosystem. I would say I'm an experienced developer, but unaware of the many languages/tools that are available to interact with Ethereum wallets.

Let's say I've recently purchased ownership for a couple of NFTs (images). Is there any way for me to programmatically connect to this Ethereum wallet and view all the NFTs owned by that wallet (given the appropriate auth/access needed)? By view - I mean at least get access to all the metadata that's available for the NFTs, and possibly render the images. Is solidity able to help with this use case?

5 Answers 5

5

The smart contract ABI and code are public on Ethereum net. You could find the NFT contract that you want to retrieve info (https://etherscan.io/) and call the public functions on it...

Hope it helps

1

Lazy way 1 : go to a large NFT market place (eg the not so great opensea) and lookup the address or use this link: https://opensea.io/{{wallet address here}}

Lazy way 2: same as 1 but etherscan (or polygon scan): eg https://etherscan.io/address/0x300e31AAF34aB0327Eaf6624C543Dbe19f44bbd3

Nonlazy way: setup an archive node and walk it once creating whatever indexes you want (eg wallet address) and use normal DB calls on your indexes to find what you want

Other: Use rich APIs from third party value add providers like Infura of Etherscan to do the lookup for you.

1

Check out Alchemy docs. They have interesting solutions for this purpose.

https://docs.alchemy.com/reference/nft-api-quickstart

After initialization, you must come across a single line of code, such as

const nftsForOwner = await alchemy.nft.getNftsForOwner("address");

Then nftsForOwner variable will have valuable properties to satisfy every need you may have in your project, like metadata

0

Check out Lazy.com, you can create an account and your wallet address to view all your NFTs.

-1

This is not possible and in my opinion a fundamental design flaw. Given an ETH address, the only way to enumerate all NFTs it owns is to crawl the ETH blockchain like opensea.io does

4
  • Not only is it not possible, but this is how you do it?
    – Ram
    May 10, 2022 at 15:39
  • @Ram I don't know of any other way. There are many indexers that already exist it seems.
    – mikestaub
    May 11, 2022 at 20:20
  • You said how to do it.
    – Ram
    May 11, 2022 at 20:34
  • As you mentioned, querying the Blockchain is the solution and there are many companies offering this kind of service nowadays May 3, 2023 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.