Traits
Diving into the Traits section, you'll discover the modular characteristics and behaviors that subjects within the Grams framework can adopt. Traits are like building blocks, allowing developers to mix and match functionalities as per their requirements. They define specific behaviors or characteristics that a subject can embody and are often mapped to corresponding Solidity constructs. This directory ensures that developers have a repository of reusable, standardized behaviors, streamlining the development process and ensuring best practices are adhered to.
📄️ Behavior Traits
Behavior traits are traits that significantly refine, or change, the type of a behavior.
📄️ Constraint Traits
Constraint traits are used to constrain the values that can be provided for a shape. Constraint traits are for validation only and SHOULD NOT impact the types signatures of generated code.
📄️ Documentation Traits
Documentation traits describe shapes in the model in a way that does not materially affect the semantics of the model.
📄️ Type Refinement Traits
Type refinement traits are traits that significantly refine, or change, the type of a shape.