ERC1155D Smart Contract Module in Bunzz

The ERC1155D module is a gas efficient NFT contract and an alternative to ERC721. It is intended to only be used for 1/1 NFT’s (supply of 1) and does not support tokens with supply greater than 1.

It’s fully backward compatible with ERC1155 and has no issues with high gas cost when following the specifications. It will not break any centralized or decentralized exchanges that swap ERC1155 tokens.

Among its advantages, we can find:

  • It has useful functions for tracking ownership that extend the ERC1155 protocol without interfering with the specification.
  • It costs less in gas than the OpenZeppelin’s ERC1155 for both minting and transfers.
  • It’s completely non-fungible and a suitable substitute for ERC721 and its variants.
  • It’s far more gas efficient than any other contract out there, including highly optimized ones like ERC721 slim and ERC721A.

You can access this Module and the code here: https://bit.ly/42gmxwN

How To Use

To use the ERC1155D smart contract module in your project, copy contracts/ERC1155D.sol to your project.

Then, you can import it, and write an implementation that extends the contract as is ERC1155.

NOTE: ERC1155D does not maintain tokenID enumeration. You will need to implement a counter for it in your contract.

Functions

#WRITE

  • safeBatchTransferFrom
  • safeTransferFrom
  • setApprovalForAll

#READ

  • MAX_SUPPLY
  • balanceOf
  • balanceOfBatch
  • getERC721BalanceOffChain
  • getOwnershipRecordOffChain
  • isApprovedForAll
  • ownerOfERC721Like
  • supportsInterface
  • uri

You can access this Module and the code here: https://bit.ly/42gmxwN

If you still haven’t signed up to Bunzz, what are you waiting for?

Sign up here https://app.bunzz.dev/signup and get your smart contracts deployed in 5 minutes through our great GUI.

Share this article:

Leave a Comment

Your email address will not be published. Required fields are marked *