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

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

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 ...


3

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,...


3

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 for different users? Using OpenZeppelin you can create either a fungible token ERC1155 or a non-fungible token ERC721. In case you want each platform user to ...


2

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 on the first result Scroll down to The Standard section Click on the TENJ Token: 0x33fcaef31a637c96207e99b1a1189e1eb4640976 ABI bullet Search the word decimals ...


2

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

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

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

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

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

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

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

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 ...


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

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(...


2

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.


1

ERC1155 gives you a function uri(uint256 _id) external view returns (string memory); function that gives you URL for metadata of an asset. The metadata is a JSON file. See EIP-1155 for more details. About how you'll access the data; is how you'll invoke the contract function. You can use any known library; ( web3.js being a popular one) to call the uri ...


1

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 Control. The address you are using, the caller in this case, is not registered as either an owner or otherwise approved, hence the error.


1

No. Nobody knows about EthItem as a published standard. The list of published standards is recorded at https://eips.ethereum.org/all But if you have seen some draft, then maybe people are talking about it. And it would then be in a very early stage // definitely not at a point where you want to implement it.


1

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


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

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 ...


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

this is done using "Factory" approach. You have a factory contract and it does this for you. Take a look at uniswap v2 contract factory: function createPair(address tokenA, address tokenB) external returns (address pair) { require(tokenA != tokenB, 'UniswapV2: IDENTICAL_ADDRESSES'); (address token0, address token1) = tokenA < ...


1

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


1

I have created a dApp that does an ERC1155<->ERC20<->ETH bridge (ERC-721 to be added - please make a pull request). Convert between ERC-1155, ERC-20, and ETH in both directions in several ways (locking or wrapping). So 2x2+1=5 ways to convert. No fees. Several blockchains deployed. Live: https://erc1155.portonvictor.org/#/ GitHub: https://github....


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