chiru-labs / ERC721A

https://ERC721A.org
MIT License
2.51k stars 842 forks source link

Fix _toString comment typo #405

Closed KamaDeFi closed 2 years ago

KamaDeFi commented 2 years ago

Question: why does the memory pointer have to be 32-byte aligned? I ran the code reserving exactly 78+32 bytes str := add(mload(0x40), 0x6C), and the execution of the function cost 3 less gas.

Vectorized commented 2 years ago

It must be aligned, or else other code that assumes a 32 byte alignment will break.