简体   繁体   中英

Opensea ERC-1155 proof of ownership

I'm creating a web3.0 project where I need to know if the user has a specific token in their wallet to provide access to content.

The collection was created in opensea, was lazy minted, and the contract is ERC-1155 provided by opensea.

My question is, based on Opensea is the owner of the contract, how can I determine if the asset hold for the customer is the one in the collection?

You can determine if a wallet holds an NFT or not using Moralis NFT API.

Here is an example step-by-step: https://docs.moralis.io/web3-data-api/evm/how-to-get-all-nfts-owned-by-an-address .

Also here is a guide on how to build a protected webpage that only an owner of an NFT can access: https://docs.moralis.io/example-dapps/evm/token-gating-website-nextjs .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM