cairo-contracts icon indicating copy to clipboard operation
cairo-contracts copied to clipboard

Distinguish API docs between preset and library

Open martriay opened this issue 2 years ago • 3 comments

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.

martriay avatar Jun 22 '22 11:06 martriay

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 initializers belong as well.

andrew-fleming avatar Jun 27 '22 01:06 andrew-fleming

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.

ericglau avatar Aug 16 '22 21:08 ericglau

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.

martriay avatar Aug 16 '22 22:08 martriay

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.

martriay avatar Feb 16 '23 21:02 martriay