docs(escrow): add storage schema and compatibility guidance#87
Merged
mikewheeleer merged 2 commits intoLiquifact:mainfrom Mar 27, 2026
Merged
docs(escrow): add storage schema and compatibility guidance#87mikewheeleer merged 2 commits intoLiquifact:mainfrom
mikewheeleer merged 2 commits intoLiquifact:mainfrom
Conversation
|
@oderahub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Add schema-first storage documentation for the escrow contract, anchored to the current source while explicitly surfacing schema drift and inconsistencies.
Closes #21
Scope
This PR is documentation-only and does not modify contract behavior.
Rustdoc additions in
escrow/src/lib.rsare source-accurate but not currently renderable via generated docs until the duplicateadminfield and related compile blockers are fixed in a separate PR.Changes
escrow/src/lib.rsto align with actual storage behaviordocs/EVENT_SCHEMA.mdwhere it would contradict storage docsStorage Model (High-Level)
"escrow"→InvoiceEscrow(full contract state)"version"→u32(schema version)Known Divergences (Explicitly Documented)
adminfield inInvoiceEscrowfunding_deadlineparameter ininitis not persistedsettled_amountexists but has incomplete/partial logicyield_bpstype mismatch (i64in struct vsu32in inputs)DataKey::Escrowreferenced but not definedThese are documented as source-level inconsistencies, not normalized in the schema.
Upgrade & Compatibility Notes
SCHEMA_VERSIONbumps and explicit migrationTesting / Validation
Ran locally:
cargo testResult:
duplicate
adminfield declaration and malformed duplicated method blocksin
escrow/src/lib.rs. The compiler errors at the unclosed delimiter aroundlines 369–410, before any test logic is reached.
cargo fmt --all -- --checkalso fails for the same reason.non-compiling state on this branch prior to these documentation edits.
escrow/src/test.rsadditionally contains obvious branch drift (duplicatedeployhelper, tests referencingconfirm_payment,pause/unpause)that is unrelated to the storage schema documentation task.
Follow-up Work (Out of Scope for This PR)
adminfield, undefinedDataKey::Escrow,yield_bpstype mismatch (i64vsu32), andunclosed delimiter in
lib.rstest.rsbranch drift once thesource is stabilized
EVENT_SCHEMA.mdfull reconciliation: deferred; only contradiction-limiting edits were made here