Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ contracts. The addresses emitted by the deploy script are authoritative.
are (`custodian`, `vault`, the allowlisted `account`). OpenZeppelin trait
methods keep their own names (`operator`, `user_address`).
- **Named errors.** Contract code fails with a named error variant, never with
`unwrap`, `expect` or a bare `panic!`. Tests may unwrap.
`unwrap`, `expect` or a bare `panic!`. Tests may unwrap. Each contract
declares its error enum through `strata_bindings::error_enum!`, which fails
the build if a code leaves the contract's block (`docs/kit-spec.md`, section
7).
- **No boolean switches.** A new entrypoint does one thing. Two behaviours get
two functions, like `freeze_partial_tokens` and `unfreeze_partial_tokens`,
not one function that takes a `bool`.
Expand Down
326 changes: 168 additions & 158 deletions contracts/async-vault/src/error.rs

Large diffs are not rendered by default.

Loading
Loading