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 Spacebeast from Rari Labs for the NFT social 3.0 project.
Rari Labs is not liable for any outcome of using ERC721RA
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
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);
}
}
- Hardhat compile
npx hardhat compile
- IMPORTANT: when you tweak Gas, sometimes you need to force compile or clean
npx hardhat compile --force
# or
npx hardhat clean
-
No need to run Hardhat node locally for testing
-
Run Hardhat test
npx hardhat test
Test Gas
- Turn on the gas report, in the .env file set the following
REPORT_GAS=true
- Run Gas Test cases only
npx hardhat test --grep GAS_TEST
Check Contributors List
Join ERC721RA as a contributor: Apply Now
Distribution under the MIT License.