ERC721AA is optimized the following items based on ERC721A:
- Remove "burn" method and relative storage
- Remove "TokenOwnership" struct, only keep "ownerAddress"
- Remove "AddressData" struct, only keep "balance"
- Replace tokenId's type uint256 with uint16, assume NFT totalSupply can't exceed 65535 - 1
We did gas measurements test on Rinkeby test, comparing ERC721 by OpenZeppelin, ERC721A by Azuki and ERC721AA by Crepto.
Here are contract address:
-
ERC721(OpenZeppelin): 0xE411909726B9B33fB30Cc750D7A7f046C4659945
-
ERC721A(Azuki):0xE0F58459c377B71b3E68e6E99Dbe746dbFd6b64F
-
ERC721AA(Crepto Pass):0xcc468bFaa348d37681B194d46f8f7143fDBcE588
Result:
NUMBER MINTED | GAS USED (ERC721) | GAS USED (ERC721A) | GAS USED (ERC721AA) |
---|---|---|---|
Mint 1 | 58,093 | 57,733 | 57,008 |
Mint 2 | 84,051 | 59,693 | 58,986 |
Mint 3 | 110,009 | 61,653 | 60,964 |
Mint 4 | 135,967 | 63,613 | 62,942 |
Mint 5 | 161,925 | 65,573 | 64,920 |