6

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 currently ~100 Gwei. That's 100 x 20,000 Gwei per 32 bytes, which is 2,000,000 Gwei, which is 0.002 ETH, which is $3. 1 GB is 1,073,741,824 bytes, so there are 33,554,...


5

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 perplexing because there's no "getAllMintedTokens()" method in the standard smart contracts. So without further adieu, the answer is by searching for ...


4

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 them to some sort of database. And this takes a lot of effort when you want to do it with a lot of big NFTs. I've never found an easy solution myself. Full ...


4

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 create a new token, you use the current one and then increment it by one. It also allows you to do a loop in case you need to retrieve a list of all current ...


4

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 arbitrary data. In my experience, wallets are VERY slow to add features, so it might come some day.


3

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 implementation uses an IS_NFT bit for id's with single supplies. Notice that mint uses a packId. Perhaps this can be done more simply for your use case, or you can ...


3

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 implements the optional ERC721Enumerable interface you can use tokenOfOwnerByIndex to retrieve the tokenId of owned tokens by a user. try token.tokenOfOwnerByIndex(...


3

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


3

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 the NFT itself? The 2 of 10 edition is here. From that we see their contract - MakersTokenV2 - is at 0x2a46f2ffd99e19a89476e2f62270e0a35bbf0756. You can use ...


3

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

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 owner thanks to the following function : function setApprovalForAll(address _operator, bool _approved) external { operatorApproval[msg.sender][_operator] = ...


2

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 ("operator") to manage all of the caller's tokens. @dev MUST emit the ApprovalForAll event on success. @param _operator Address to add to the set of ...


2

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 assets in the contract, but rather to a specific tokenId and amount. Is there any "standard" extension of ERC-1155 allowing to limit which tokens and ...


2

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 case, if you need to dynamically change contents in the metadata, the URI can be pointing to an https file that you can update at any time. However, in my ...


2

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 decentralised storage or generated from the uint256 tokenId that can be used as the seed to generate an image, music, kitties, whatever. In your case you could store the ...


2

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 percentage every time a token is traded: Suppose somebody buys your token on Uniswap. Then your token receives from a Uniswap a message to be transferred. The token can ...


2

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: they have no control. Please refer to Entriken's law. ENTRIKEN'S LAW: Your ownership of assets on a ledger is only as valid as your trust in the custodian who ...


2

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 (ERC721Metadata) and ERC-1155 Metadata Extension (ERC1155Metadata_URI) both specify that a URI can be attached to an NFT but the specifications are slightly different: ...


2

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 addNewVideo(uint VideoN, uint ntokens, bytes memory IPFS_hash) public { _mint(msg.sender, VideoN, ntokens, IPFS_hash); }


2

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

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 generic virtual item / asset and are also prone to collisions. Short-hand symbols are used in tickers and currency trading, but they aren’t as useful outside ...


2

Try this abi: {"constant":true,"inputs": [{"internalType":"uint256","name":"tokenId","type":"uint256"}], "name":"ownerOf", "outputs":[{"internalType":"address","name":"","type":"address"...


2

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 handleCryptoKittiesSpecially() Else If contract follows ERC721() handleGenericERC721() Else itIsNotAnERC721() And this is precisely why we need standards,...


2

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 below. Long Answer The NFT World is divided when it comes to Royalties. As you can see here, OpenSea seems to do this off-chain by allowing you to include the ...


1

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 whatever you want). On the other hand, ERC721 standard interface has only name & symbol, but there is also a metadata extension (ERC721Metadata) to use also a ...


1

Yes, you can make changes in the functions (e.g. changing the metadata URL), but you cannot change the number/types of input arguments nor return values, because this would violate the interface (see Function Overriding for more details). Note that if you were inheriting from ERC1155Mintable, you could also call setURI to update your metadata URLs.


1

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 ERC721, but you can mint tokens for such NFT with fungible tokens, like ERC20. A typical use-case for this standard could be game cards: you have a card called '...


1

This will essentially depend on the national/local legislation from which the law is applicable to such an asset. In general terms, as of today, the answer is NO unless there is an underlying contract signed by a public notary to validate the ownership of the asset through an NFT. If this is not granted, a theft of that physical asset can't be legally ...


1

Ask yourself: "What useful data do I use in my everyday life?" That question leads to the following answers: Proof of Identification (Driver's license, Passport, Photo ID's) Insurance Documents (Auto insurance, Personal property) Health Information (Doctor's Papers, Fitness Data) Those are just a couple of examples that I came up with with that ...


1

The comment is right, removing the [] fixes it. stateStorageForNumbers_[tokenIDs[i]] = _numbers[i]; ^ This works.


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