erc-1155 | Ethereum Semi Fungible Standard (ERC-1155) | Blockchain library

 by   0xsequence TypeScript Version: v4.0.0 License: Non-SPDX

kandi X-RAY | erc-1155 Summary

kandi X-RAY | erc-1155 Summary

erc-1155 is a TypeScript library typically used in Blockchain, Ethereum applications. erc-1155 has no bugs, it has no vulnerabilities and it has low support. However erc-1155 has a Non-SPDX License. You can download it from GitHub.

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

            kandi-support Support

              erc-1155 has a low active ecosystem.
              It has 300 star(s) with 119 fork(s). There are 32 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 11 open issues and 33 have been closed. On average issues are closed in 37 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of erc-1155 is v4.0.0

            kandi-Quality Quality

              erc-1155 has 0 bugs and 0 code smells.

            kandi-Security Security

              erc-1155 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              erc-1155 code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              erc-1155 has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              erc-1155 releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of erc-1155
            Get all kandi verified functions for this library.

            erc-1155 Key Features

            No Key Features are available at this moment for erc-1155.

            erc-1155 Examples and Code Snippets

            No Code Snippets are available at this moment for erc-1155.

            Community Discussions

            QUESTION

            How to fix "Unidentified contract"? OpenSea is unable to “understand” ERC1155
            Asked 2022-Jan-19 at 23:00

            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:07

            I 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] ).

            Source https://stackoverflow.com/questions/68891144

            QUESTION

            What's the way to change metadata parameters in ERC721/1155?
            Asked 2021-Sep-07 at 19:04

            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:04

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

            Source https://stackoverflow.com/questions/69092325

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install erc-1155

            yarn add @0xsequence/erc-1155 or npm install @0xsequence/erc-1155.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/0xsequence/erc-1155.git

          • CLI

            gh repo clone 0xsequence/erc-1155

          • sshUrl

            git@github.com:0xsequence/erc-1155.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Blockchain Libraries

            bitcoin

            by bitcoin

            go-ethereum

            by ethereum

            lerna

            by lerna

            openzeppelin-contracts

            by OpenZeppelin

            bitcoinbook

            by bitcoinbook

            Try Top Libraries by 0xsequence

            sstore2

            by 0xsequenceJavaScript

            niftyswap

            by 0xsequenceTypeScript

            sequence.js

            by 0xsequenceTypeScript

            erc20-meta-token

            by 0xsequenceTypeScript

            ethkit

            by 0xsequenceGo