Skip to content

[STYLE] Establish Inline Yul/Assembly Annotation Standard #669

Description

@mijinummi

Labels: good-first-issue, documentation, gasguard
Difficulty: Easy
Module: docs/


🧠 Concept

Draft and enforce a clear inline documentation standard for all Yul assembly blocks across the repository to ensure maintainability without sacrificing gas savings.

⚠️ Problem

Low-level Yul assembly blocks optimize gas but degrade readability, making future audits and code reviews prone to missing subtle logic errors.

📁 Implementation Scope

  • docs/ASSEMBLY_STYLE_GUIDE.md
  • contracts/utils/

🛠️ Requirements

  1. Define stack state annotation formats (e.g., // [arg1, arg2] -> [result]).
  2. Require safety invariants and memory offset usage (0x00-0x40 scratch vs free memory pointer) to be explicitly commented above assembly blocks.

🎯 Acceptance Criteria

  • Comprehensive assembly style guide published in repository docs.
  • Utility contracts annotated according to the new standard.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions