cairo-contracts
cairo-contracts copied to clipboard
Distinguish API docs between preset and library
Today our docs mix up APIs for presets and libraries, and some section focus on either lib or preset inconsistently. Also, initializers/constructors are not properly documented in may sections.
Since the token docs list the exposed API according to the EIP spec, maybe we should also include a library API
a la https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20 (but with the snake_cased methods). I think that's where token initializer
s belong as well.
There is also some inconsistency between what is documented: library or interface or both.
For example:
- ownable, access control, and upgrades have their library API documented (with snake case).
- ERC20 and ERC721 have their interface API documented (with camel case) in their API Specification section. But their interface is also listed at the top of the document here and here.
- IERC165 documents both library and interface.
There is also some inconsistency between what is documented: library or interface or both.
Indeed, I though we had an issue to track this but I couldn't find it. We need docs for libraries and presets separated.
Closing this since it will not be relevant anymore after the ongoing Cairo 1.0 migration. If you think this is a mistake, feel free to open a new issue.