docs: document all contract error codes and simulation response forma…#565
Merged
Chucks1093 merged 1 commit intoJul 23, 2026
Conversation
Closed
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #555
Adds a complete reference document for all contract error codes, covering
what each code means and the exact condition in the contract logic that
triggers it. This removes the guesswork developers previously faced when
a transaction reverts with an opaque numeric code.
What's included
docs/error-codes.mdContractErrorvariants fromcreator-keys/src/lib.rs(codes 1–33)PollErrorvariants fromcreator-keys/src/events.rs(codes 20–28)creator-keys/src/quote_view_errors.rswith citations to the originating function, file, and line number
simulateTransactionRPC response showingError(Contract, #16), plus a short TypeScript snippet showing how aclient can parse the code out of the response
Scope / non-goals
docs/error-codes.mdto minimize merge conflict riskAcceptance criteria (from #555)
docs/Verification
cargo fmt --all -- --check— passedcargo check --workspace— passedorigin/main, no conflictsNotes for reviewers
Please double-check that no error variants were missed, especially any
recently added ones that might not yet be reflected in
lib.rs/events.rsat review time.