erc-1155 | Ethereum Semi Fungible Standard (ERC-1155) | Blockchain library
kandi X-RAY | erc-1155 Summary
kandi X-RAY | erc-1155 Summary
The contracts in this repository follow a standard implementation of an ([ERC-1155] contract. This standard provides basic functionality to track and transfer multiple tokens and the interface provide an API other contracts and off-chain third parties can use. ERC-1155 contracts keep track of many token balances, which can lead to significant efficiency gains when batch transferring multiple token classes simultaneously. This is particularly useful for fungible tokens that are likely to be transfered together, such as gaming items (cards, weapons, parts of objects, minerals, etc.). The possible efficiency gains are more significant if the amount of tokens each address can own is capped, as shown in this implementation examples. This repository contains two main implementations of the ERC-1155 token standards: [ERC1155] ) and [ERC155PackedBalance] ). The latter implementation packs multiple balances within a single uint256 using bitwise operations. This brings the cost of transferring 100 different token classes to 467,173 gas, an average of 4,671 gas per token type transfer. Still using MT, but without balance packing, transferring 100 different token types costs 2,763,399 gas, an average of 27,633 gas per token transfer. The latter is already an improvement over multiple fungible tokens that are stored on different contracts, since cross-contract calls have a base cost of 700 gas. This is ignoring the cost of initial approvals that would need to be set for each user and existing ERC-20 tokens.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of erc-1155
erc-1155 Key Features
erc-1155 Examples and Code Snippets
Community Discussions
Trending Discussions on erc-1155
QUESTION
I have deployed a ERC-1155 based contract (based on OpenZeppelin) and minted some NFTs on this contract successfully. But when I want to use these NFTs in OpenSea, it always says "Unidentified contract".
Example: https://testnets.opensea.io/assets/0xc7d3e4a5A0c3e14ba8C68ea1b8a99a9dBf3ca76F/2
API-Example: https://testnets-api.opensea.io/api/v1/asset/0xc7d3e4a5A0c3e14ba8C68ea1b8a99a9dBf3ca76F/2/?force_update=true
Following their official Tutorial repository (which does not compile any more because of outdated dependencies and other issues) I have added some (maybe) opensea-specific functions and data that might required for OpenSea in order to work properly. However, OpenSea is able to grab all required data to display an NFT, but as long as they say "Unidentified contract", this all makes no sense so far.
My question has:
has someone already managed to deploy a ERC-1155 and used it with OpenSea properly without this issue? Is there anything we have to "register" somehow contracts that are not based on ERC-721?
🔢 Code to reproduce ...ANSWER
Answered 2021-Aug-27 at 22:07I finally found the root cause! OpenSea expects a public property called name
in order to display the proper Name of the Collection instead of a static label Unidentified contract.
I came across this while looking at their reference code (which depends on a now 3-year-old MultiToken-Contract implementation and needs all in all some downgrades of Node and other tools in order to get it build [a downgrade to Node 10 worked best for me today] ).
QUESTION
So imagine there are ERC-721 (or ERC-1155?) with metadata
One of parameters is Strength:
It slowly decrease on every transfer from 100 to 0
How can it be programmable without burning and minting token again and again with new metadata?
...ANSWER
Answered 2021-Sep-07 at 19:04You can have a mapping
that takes the token ID as the key, and the strength as the value.
Then you can expand your mint
and transfer
functions to set the correct value.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install erc-1155
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page