11 votes

Get a list of all token types for ERC1155

So the question was an underlying question while trying to understand how all these platforms like OpenSeas are identifying all of the minted tokens for standard ERC721 and ERC1155 contracts. It was ...
  • 323
8 votes
Accepted

Can we mint 5 gigabyte video NFTs?

I'll come at this from a slightly different direction... The current price of ETH is ~$1500. The Yellow Paper states that storing a 256-bit (32-byte) word costs 20,000 gas. Average gas price is ...
7 votes

Royalties for ERC 1155

Short Answer: There is currently no single way to achieve this that has been widely adopted. Add the royalty functionality of the platforms you think you will need (like OpenSea). Example provided ...
6 votes

How can I get a list of all owners of an ERC1155 NFT by using a web3 call?

UPDATE: Now you can use the Moralis API /nft/{token_address}/owners to get this directly. This is quite difficult, as Anupam pointed out you would have to go through all the transfer events and save ...
  • 759
6 votes
Accepted

ERC1155 name and symbol

The ERC1155 standard interface has a URI (Uniform Resource Identifier) that can point to a file where you can specify all the characteristics of the token (name, symbol, description, size, color or ...
5 votes

Get a list of all token types for ERC1155

The common way to know the number of token types (aka. tokenId) is to have a counter inside the ERC1155 contract, for instance: uint256 private _currentTokenID = 0; This way, whenever you need to ...
5 votes
Accepted

How to extract the URL of a crypto art as it appears within the NFT? and technical details like ERC-token type?

I can't find that particular piece in their contracts, but the below applies to the 2 of 10 edition. How can I view the URL link to the associated image file as it appears within the metadata/code of ...
4 votes
Accepted

How is the ERC721TokenReceiver.onERC721Received data parameter used in practice?

The original thought was this would be used mainly for passing a price to a marketplace contract. Everyone using it (just a few people) are using it for that. I don't know of any wallets that support ...
3 votes
Accepted

Pattern for generating dynamic ERC-1155 or ERC-721 metadata

The approach of using an IPFS address as the token URI is intended to ensure its immutability, since the generated hash within the IPFS address will be unique for the file you are pointing to. In your ...
3 votes
Accepted

How to have the contract check if the msg.sender currently owns a specific token. (erc721)

If contracts is an ERC721 then you can query how many tokens a user owns with balanceOf uint count = token.balanceOf(user); if (count > 0) { // User owns at least 1 index } If the tokens ...
  • 30.1k
3 votes

What are the reasons to use ERC-1155 instead of multiple ERC-20 contracts?

ERC-1155 tends to be more useful for things such as games that need both fundable (In-game gold) and non-fungible(land) tokens.
  • 31
3 votes

How can I get a list of all owners of an ERC1155 NFT by using a web3 call?

If you want an ownerOf in ERC1155 youll have to implement it yourself. rarible and opensea use indexing services like thegraph.com to keep track of transfers and who currently owns the token.
3 votes
Accepted

What is operator approval in context of ERC-1155?

The term operator has been first introduced by the EIP-721 to define addresses authorized (or approved) by a NFT owner to spend all of his token Ids. In EIP-1155, the operator is set by the token ...
  • 3,937
3 votes
Accepted

Which token standard should be use to create different tokens for different users?

I have requirement to create a platform on which users can register and create their own token with passing token name, price and so. Is it possible to develop such contract to create different token ...
3 votes

What is the best way to handle multiple NFTs of the same collection in ERC1155?

The short answer is that it looks like the latter, unique id for each NFT, regardless of grouping (eg stadium). But to have NFT-like grouping there are a couple of considerations: The nft example ...
3 votes

How do I let a user transfer ERC1155 token from my contract address to his address?

Could you look into the documentation on openzepplin? I've linked it here, particularly pertaining to ERC1155PresetMinterPauser.There's a dependency that I don't see mentioned here, namely, Access ...
2 votes

Precision (digits) of ERC-1155 tokens

Exactly the same way they are determined in ERC20: You pass them in the constructor You get them via function decimals And all it took for me to find this out was: Search ERC-1155 on Google Click ...
2 votes

Limiting operator transactions in ERC-1155

For the sake of simplicity, we'll call the functionality to limit approves to a specific token and amount "individual approves" since the approvals won't just be a blanket approval over all ...
  • 1,138
2 votes
Accepted

Implementing ERC-1155 contract on the fly

You need to write a public wrapper function for the _mint function. Since this function is internal, it can only be called from within the context of the contract itself. Something like: function ...
  • 306
2 votes
Accepted

ERC-1155 events for approval

These two functions are not part of the EIP-1155 (https://eips.ethereum.org/EIPS/eip-1155). In fact, the EIP only defines : /** @notice Enable or disable approval for a third party ("...
  • 3,937
2 votes

Can we mint 5 gigabyte video NFTs?

Yes you can create an NFT out of your video because you will use the hash of the content, not the content itself. Content should not be stored on the Blockchain. It's stored preferably on a ...
2 votes

Is there any way of creating ERC-1155 or ERC-721 tokens always earn transaction fees?

It is easy to create an NFT that transfers a fixed fee to you at every transfer of this NFT. Just add transfer (of ETH, or an ERC-20/1155) to it. It is nearly impossible to get a transaction ...
  • 1,424
2 votes

What are the reasons to use ERC-1155 instead of multiple ERC-20 contracts?

The only benefit is having everything in the same place. ERC-1155 is orders of magnitude more gas efficient, as deploying an ERC-20 contract is costly with current Ethereum gas prices.
2 votes

How to Fractionalize NFT's (high level)

You got the answer yourself: ERC1155 gives you the combination of fungible and non-fungible tokens within the same standard contract. In essence, you still have a non-fungible token with its ID, like ...
2 votes

If crypto art is stored off-chain, how does the collector have any control over their NFT's contents if the server where it is saved shuts down?

There are several questions here. Let's review. If crypto art is stored off-chain, how does the collector have any control over their NFT's contents if the server where it is saved shuts down? Answer: ...
2 votes

What tokenized assets can be stored on-chain?

You are asking two questions really: What can be stored on-chain What can be stored economically Let's address them separately. What can be stored on-chain? The ERC-721 Metadata Extension (...
2 votes

ERC1155 name and symbol

From the Rationale section of the standard: The symbol function (found in the ERC-20 and ERC-721 standards) was not included as we do not believe this is a globally useful piece of data to identify a ...
2 votes
Accepted

Get NFT owner by contract & token Id

Try this abi: {"constant":true,"inputs": [{"internalType":"uint256","name":"tokenId","type":"uint256"}], "name&...
2 votes
Accepted

Why is BITWISE & used in ERC 1155 implementation

They do so because the values manipulated TYPE_NF_BIT, NF_INDEX_MASK and TYPE_MASK are used as bit flags or bit masks. That way they can encode several pieces of information in a single uint256 _id.
  • 30.1k
2 votes
Accepted

How can Opensea and Etherscan understand that CryptoPunks are NFTs if the contract does not implement ERC20, ERC721 nor ERC1155?

Etherscan hardcoded the CryptoPunks contact to show up that way. Basically Etherscan is programmed this way: If contract is CryptoPunks handleCryptoPunksSpecially() Else If contract is CryptoKities ...

Only top scored, non community-wiki answers of a minimum length are eligible