Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

lucky2077/erc721ra

 
 

Repository files navigation

ERC721RA (v1.0 Beta) - refundable and gas optimized NFT

ERC721RA

What is ERC721RA?

ERC721RA is an improved implementation of ERC721A with refundability and gas saving. It gives NFT owners freedom to return minted NFTs and get refund within a given time.

The goal of this project is to encourage the adoption of ERC721RA NFT and improve creators credibility.

For more information please visit erc721ra.org. Follow us on twitter for @ERC721RA the latest updates. Join our Github project to collaborate.

ERC721RA was initially created by Will Qian from Rari Labs for the NFT social 3.0 project.

Rari Labs is not liable for any outcome of using ERC721RA

Gas Comparison ERC721RA vs ERC721

The gas report is generated with Hardhat Gas Reporter. The minting performance is much more efficient and consistent.

gas-saving

Get Started

Install Hardhat

yarn add hardhat

Install following to run the sample project

yarn add @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-etherscan hardhat-gas-reporter solidity-coverage @openzeppelin/contracts

Usage

pragma solidity ^0.8.7;

import "./ERC721RA.sol";

contract Rari is ERC721RA {
  constructor() ERC721RA("Rari", "RARI") {}

  function mint(uint256 amount) external payable {
    _safeMint(_msgSender(), amount);
  }

  function refund(uint256 tokenId) external {
      _refund(_msgSender(), tokenId);
  }
}

Contributing

Contributions are welcome.

  1. Fork the Project and clone the repository.
  2. Create a new branch. (git checkout -b add-mint-function)
  3. Coding and commit your Changes. (git commit -m "Added Mint Function")
  4. Push your Changes to the Branch. (git push -u origin add-mint-function)
  5. Open a Pull Request.

Running tests locally

  1. npm ci
  2. npm test
  3. if you want to use another network, you can use: npm test -- --network <network-name>

Contact

Join ERC721RA as a contributor: Apply Now

License

Distribution under the MIT License.

ERC721RA

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 59.3%
  • JavaScript 40.4%
  • Shell 0.3%