- JavaScript 58.2%
- Solidity 36.2%
- HTML 4.2%
- CSS 1.1%
- Shell 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| 4k | ||
| aesthetic | ||
| app | ||
| build/contracts | ||
| contracts | ||
| images | ||
| lib | ||
| metadata | ||
| migrations | ||
| pdfs | ||
| scripts | ||
| test | ||
| .gitignore | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| truffle-config.js | ||
NOTES
Token Creation Gas
Bulk NFT token generation is costly. We can create the ERC721 tokens in the contract constructor but we run out of gas if the contract implements ERC721Enumerable. Creating ERC998 tokens in the constructor is possible for at most a couple of tokens before we run out of gas. So constructors are not the right location for token creation in this scenario.
I tried a builder contract that acted as a migration proxy. It would create the contracts then create the tokens en masse but that proved to be over-engineered and cause problems with msg.sender based access control.
For the amount of tokens that needed creating and composing for this project the correct solution turned out to be adding access controlled batch token creation functions to the ERC721 and ERC998 contracts and creating and attaching the tokens (in batches) during migration.
Random Note
Ambroise Std Francois Demi is a nice font.