It’s important to take the time to document your code. It will help developers and users to understand the contract and its functionalities. In Cairo, you can add comments withDocumentation Index
Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
Use this file to discover all available pages before exploring further.
//.
Best Practices
Since Cairo 1, the community has adopted a Rust-like documentation style.Contract Interface
In smart contracts, you will often have a trait that defines the contract’s interface (with#[starknet::interface]).
This is the perfect place to include detailed documentation explaining the purpose and functionality of the contract entry points. You can follow this template: