Skip to content

Commit 0a4b3c0

Browse files
committed
Initial
0 parents  commit 0a4b3c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+45909
-0
lines changed

.eslintrc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"commonjs": true,
5+
"es2021": true,
6+
"mocha": true
7+
},
8+
"extends": "eslint:recommended",
9+
"parserOptions": {
10+
"ecmaVersion": "latest"
11+
},
12+
"globals": {
13+
"ethers": "readonly"
14+
},
15+
"rules": {
16+
"max-len": [
17+
"error",
18+
{
19+
"code": 120
20+
}
21+
]
22+
}
23+
}

.github/workflows/transpile-merge.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Transpile Merge
2+
3+
on:
4+
push:
5+
branches: [patches]
6+
workflow_dispatch: {}
7+
repository_dispatch:
8+
types: [Update]
9+
10+
concurrency:
11+
group: transpile-${{ github.ref_name }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
transpile:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Use Node.js 16.x
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: 16.x
23+
- name: Transpile Merge
24+
run: ./scripts/transpile-merge.sh

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules/
2+
.env
3+
coverage
4+
coverage.json
5+
typechain
6+
7+
#Hardhat files
8+
cache
9+
artifacts

.prettierrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 120,
4+
"overrides": [
5+
{
6+
"files": "*.sol",
7+
"options": {
8+
"printWidth": 120,
9+
"explicitTypes": "always"
10+
}
11+
}
12+
]
13+
}

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Chiru Labs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
[![Docs][docs-shield]][docs-url]
2+
[![NPM][npm-shield]][npm-url]
3+
[![CI][ci-shield]][ci-url]
4+
[![Issues][issues-shield]][issues-url]
5+
[![MIT License][license-shield]][license-url]
6+
<!-- OTHER BADGES -->
7+
<!-- [![Contributors][contributors-shield]][contributors-url] -->
8+
<!-- [![Forks][forks-shield]][forks-url] -->
9+
<!-- [![Stargazers][stars-shield]][stars-url] -->
10+
11+
<!-- ABOUT THE PROJECT -->
12+
13+
## About The Project
14+
15+
The goal of ERC721A is to provide a fully compliant implementation of IERC721 with significant gas savings for minting multiple NFTs in a single transaction. This project and implementation will be updated regularly and will continue to stay up to date with best practices.
16+
17+
The [Azuki](https://twitter.com/azukizen) team created ERC721A for its sale on 1/12/22. There was significant demand for 8700 tokens made available to the public, and all were minted within minutes. The network BASEFEE remained low despite huge demand, resulting in low gas costs for minters, while minimizing network disruption for the wider ecosystem as well.
18+
19+
![Gas Savings](https://pbs.twimg.com/media/FIdILKpVQAEQ_5U?format=jpg&name=medium)
20+
21+
For more information on how ERC721A works under the hood, please visit our [blog](https://www.azuki.com/erc721a). To find other projects that are using ERC721A, please visit [erc721a.org](https://www.erc721a.org) and our [curated projects list](https://github.com/chiru-labs/ERC721A/blob/main/projects.md).
22+
23+
**Chiru Labs is not liable for any outcomes as a result of using ERC721A.** DYOR.
24+
25+
<!-- Docs -->
26+
27+
## Docs
28+
29+
https://chiru-labs.github.io/ERC721A/
30+
31+
<!-- Installation -->
32+
33+
## Installation
34+
35+
```sh
36+
37+
npm install --save-dev erc721a
38+
39+
```
40+
41+
<!-- USAGE EXAMPLES -->
42+
43+
## Usage
44+
45+
Once installed, you can use the contracts in the library by importing them:
46+
47+
```solidity
48+
pragma solidity ^0.8.4;
49+
50+
import "erc721a/contracts/ERC721A.sol";
51+
52+
contract Azuki is ERC721A {
53+
constructor() ERC721A("Azuki", "AZUKI") {}
54+
55+
function mint(uint256 quantity) external payable {
56+
// _safeMint's second argument now takes in a quantity, not a tokenId.
57+
_safeMint(msg.sender, quantity);
58+
}
59+
}
60+
61+
```
62+
63+
<!-- ROADMAP -->
64+
65+
## Roadmap
66+
67+
- [] Support ERC721 Upgradeable
68+
- [] Add more documentation on benefits of using ERC721A
69+
- [] Increase test coverage
70+
71+
See the [open issues](https://github.com/chiru-labs/ERC721A/issues) for a full list of proposed features (and known issues).
72+
73+
<!-- CONTRIBUTING -->
74+
75+
## Contributing
76+
77+
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
78+
79+
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
80+
81+
Don't forget to give the project a star! Thanks again!
82+
83+
1. Fork the Project
84+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
85+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
86+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
87+
5. Open a Pull Request
88+
89+
<!-- ROADMAP -->
90+
91+
### Running tests locally
92+
93+
1. `npm install`
94+
2. `npm run test`
95+
96+
<!-- LICENSE -->
97+
98+
## License
99+
100+
Distributed under the MIT License. See `LICENSE.txt` for more information.
101+
102+
<!-- CONTACT -->
103+
104+
## Contact
105+
106+
- 2pm.flow (owner) - [@2pmflow](https://twitter.com/2pmflow)
107+
- location tba (owner) - [@locationtba](https://twitter.com/locationtba)
108+
- cygaar (maintainer) - [@cygaar_dev](https://twitter.com/cygaar_dev)
109+
- vectorized.eth (maintainer) - [@optimizoor](https://twitter.com/optimizoor)
110+
111+
Project Link: [https://github.com/chiru-labs/ERC721A](https://github.com/chiru-labs/ERC721A)
112+
113+
<!-- MARKDOWN LINKS & IMAGES -->
114+
115+
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
116+
117+
[docs-shield]: https://img.shields.io/badge/docs-%F0%9F%93%84-blue?style=for-the-badge
118+
[docs-url]: https://chiru-labs.github.io/ERC721A/
119+
[npm-shield]: https://img.shields.io/npm/v/erc721a.svg?style=for-the-badge
120+
[npm-url]: https://www.npmjs.com/package/erc721a
121+
[ci-shield]: https://img.shields.io/github/workflow/status/chiru-labs/ERC721A/ERC721A%20CI?label=build&style=for-the-badge
122+
[ci-url]: https://github.com/chiru-labs/ERC721A/actions/workflows/run_tests.yml
123+
[contributors-shield]: https://img.shields.io/github/contributors/chiru-labs/ERC721A.svg?style=for-the-badge
124+
[contributors-url]: https://github.com/chiru-labs/ERC721A/graphs/contributors
125+
[forks-shield]: https://img.shields.io/github/forks/chiru-labs/ERC721A.svg?style=for-the-badge
126+
[forks-url]: https://github.com/chiru-labs/ERC721A/network/members
127+
[stars-shield]: https://img.shields.io/github/stars/chiru-labs/ERC721A.svg?style=for-the-badge
128+
[stars-url]: https://github.com/chiru-labs/ERC721A/stargazers
129+
[issues-shield]: https://img.shields.io/github/issues/chiru-labs/ERC721A.svg?style=for-the-badge
130+
[issues-url]: https://github.com/chiru-labs/ERC721A/issues
131+
[license-shield]: https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge
132+
[license-url]: https://github.com/chiru-labs/ERC721A/blob/main/LICENSE.txt
133+
[product-screenshot]: images/screenshot.png

0 commit comments

Comments
 (0)