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

Commit b95bb4a

Browse files
author
reddqian
committed
ERC721RA v1.0 Beta Release
1 parent 2b6b998 commit b95bb4a

23 files changed

+10649
-2
lines changed

.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ETHERSCAN_API_KEY=<YOUR ETHERSCAN API KEY>
2+
RINKEBY_URL=https://eth-rinkeby.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
3+
PRIVATE_KEY=<YOUR PRIVATE KEY>
4+
REPORT_GAS=true

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
artifacts
3+
cache
4+
coverage

.eslintrc.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
env: {
3+
browser: false,
4+
es2021: true,
5+
mocha: true,
6+
node: true,
7+
},
8+
extends: [
9+
"standard",
10+
"plugin:prettier/recommended",
11+
"plugin:node/recommended",
12+
],
13+
parserOptions: {
14+
ecmaVersion: 12,
15+
},
16+
overrides: [
17+
{
18+
files: ["hardhat.config.js"],
19+
globals: { task: true },
20+
},
21+
],
22+
};

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
hardhat.config.js
2+
scripts
3+
test

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
artifacts
3+
cache
4+
coverage*
5+
gasReporterOutput.json

.prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.solhint.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"rules": {
4+
"compiler-version": ["error", "^0.8.0"],
5+
"func-visibility": ["warn", { "ignoreConstructors": true }]
6+
}
7+
}

.solhintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 ERC721RA
3+
Copyright (c) 2022 Rari Labs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+78-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,78 @@
1-
# erc721ra
1+
# ERC721RA - refundable and gas optimized NFT
2+
3+
![ERC721RA](https://raw.githubusercontent.com/rarilabs/ERC721RA/main/assets/erc721ra-small.png)
4+
5+
## What is ERC721RA?
6+
7+
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.
8+
9+
The goal of this project is to encourage the adoption of ERC721RA NFT and improve creators credibility.
10+
11+
For more information please visit [erc721ra.org](https://erc721ra.org). Follow us on twitter for [@ERC721RA](https://twitter.com/erc721ra) the latest updates. Join our [Github](https://github.com/erc721ra) project to collaborate.
12+
13+
14+
ERC721RA was initially created by Will Qian from Rari Labs for the NFT social 3.0 project.
15+
16+
Rari Labs is not liable for any outcome of using ERC721RA
17+
18+
## Gas Comparison ERC721RA vs ERC721
19+
20+
The gas report is generated with Hardhat Gas Reporter. The minting performance is much more efficient and consistent.
21+
22+
![gas-saving](https://raw.githubusercontent.com/rarilabs/ERC721RA/main/assets/gas-saving-small.png)
23+
24+
25+
## Get Started
26+
27+
Install Hardhat
28+
29+
```
30+
yarn add hardhat
31+
32+
```
33+
34+
Install following to run the sample project
35+
36+
```
37+
yarn add @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-etherscan hardhat-gas-reporter solidity-coverage @openzeppelin/contracts
38+
```
39+
40+
## Usage
41+
42+
```
43+
pragma solidity ^0.8.7;
44+
45+
import "./ERC721RA.sol";
46+
47+
contract Rari is ERC721RA {
48+
constructor() ERC721RA("Rari", "RARI") {}
49+
50+
function mint(uint256 amount) external payable {
51+
_safeMint(_msgSender(), amount);
52+
}
53+
54+
function refund(uint256 tokenId) external {
55+
_refund(_msgSender(), tokenId);
56+
}
57+
}
58+
59+
```
60+
61+
62+
63+
## Contact
64+
65+
- 0xWil (creator) - [@0xwilxyz](https://twitter.com/0xwilxyz)
66+
- Kuncle (Contributor) - [@KingsUncle1](https://twitter.com/KingsUncle1)
67+
- Lucky (Contributor) - [@millsonzhou](https://twitter.com/millsonzhou)
68+
- Joyce (Contributor) - [@joydefender](https://twitter.com/joydefender)
69+
70+
71+
**Join ERC721RA as a contributor: [Apply Now](https://forms.gle/32uiJ6d7e8McddaK6)**
72+
73+
74+
## License
75+
76+
Distribution under the MIT License.
77+
78+
![ERC721RA](https://raw.githubusercontent.com/rarilabs/ERC721RA/main/assets/erc721ra-banner.png)

assets/erc721ra-banner.png

37.5 KB
Loading

assets/erc721ra-profile.png

148 KB
Loading

assets/erc721ra-small.png

33.9 KB
Loading

assets/erc721ra.png

54.4 KB
Loading

assets/gas-saving-small.png

196 KB
Loading

assets/gas-saving.png

98.6 KB
Loading

0 commit comments

Comments
 (0)