Summary
Contributors adding new functionality to the contracts repo have no documented reference for the expected patterns: where to put the function, how to handle authorization, how to emit events, and what the CI checks require before a PR can be merged.
Scope
- Document the file structure: which module a new function belongs in based on its category (trade, config, view, admin)
- Explain the authorization pattern: when to use
require_auth and which address to authorize against
- Show the event emission pattern: how to define a new event struct and emit it
- List what CI checks must pass:
cargo fmt, cargo clippy, cargo test
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Contributors adding new functionality to the contracts repo have no documented reference for the expected patterns: where to put the function, how to handle authorization, how to emit events, and what the CI checks require before a PR can be merged.
Scope
require_authand which address to authorize againstcargo fmt,cargo clippy,cargo testAcceptance Criteria
ETA: 12 hours
Coordinate on Telegram