Decorators are the primary way SolidScript maps TypeScript class members to Solidity contract behavior. Rather than writing Solidity modifiers and visibility keywords by hand, you annotate class properties and methods with decorators that the compiler translates into correct, auditable Solidity output. This keeps your contract logic readable in TypeScript while giving you precise control over how each member behaves on-chain.Documentation Index
Fetch the complete documentation index at: https://docs.solidscipt.zoracle.xyz/llms.txt
Use this file to discover all available pages before exploring further.
| Decorator | Use it for |
|---|---|
@storage | State variables such as bigint, boolean, Address, Map<K, V>, and arrays |
@view | Read-only public functions |
@pure | Public functions that read no contract state |
@payable | Functions that can receive msg.value |
@onlyOwner | Owner-gated methods backed by OpenZeppelin Ownable |
@nonReentrant | Reentrancy protection backed by OpenZeppelin ReentrancyGuard |
@whenNotPaused | Pause-aware entrypoints backed by OpenZeppelin Pausable |
@invariant | Properties converted into generated Forge invariant tests |
@assembly | Yul bodies for narrow low-level code |
@unsafe("reason") | A documented override recorded in the audit pack |