feat: add payer-verification oracle interface, mock oracle, and fix clippy warnings#176
Merged
Merged
Conversation
|
@vjuliaife 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! 🚀 |
…lippy warnings Resolves Invoice-Liquidity-Network#91 — oracle interface (oracle_interface.rs, docs/oracle-design.md) Resolves Invoice-Liquidity-Network#94 — mock oracle contract and 9 integration tests Resolves Invoice-Liquidity-Network#95 — oracle integration guide (docs/oracle-integration.md) Resolves Invoice-Liquidity-Network#97 — clippy CI job + zero-warnings across all crates Closes Invoice-Liquidity-Network#91, closes Invoice-Liquidity-Network#94, closes Invoice-Liquidity-Network#95, closes Invoice-Liquidity-Network#97
Nursca
approved these changes
May 31, 2026
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
cargo clippy --all-targets -- -D warningsto CI with all warnings fixedChanges
Oracle interface & documentation (#91, #95)
contracts/invoice_liquidity/src/oracle_interface.rs—OracleInterfacetrait,VerificationResultstruct,check_payer_verifiedhelper (fail-open when no oracle configured),ORACLE_STALENESS_THRESHOLD_SECS = 7 daysdocs/oracle-design.md— data format, update mechanism, trust model, failure modes, staleness policy,security notes
docs/oracle-integration.md— step-by-step deployment guide, worked MockOracle examples, security checklistMock oracle for testing (#94)
contracts/tests/mocks/mock_oracle.rs— controllable mock:set_verified(address, bool),set_timestamp(ts),set_should_panic()(one-shot panic simulation)contracts/tests/oracle_integration_test.rs— 9 integration tests covering default state, set/revoke,timestamp, staleness detection, panic simulation, per-address independence
contracts/invoice_liquidity/Cargo.toml— added[[test]]entry for the new integration testClippy zero-warnings (#97)
.github/workflows/ci.yml— newclippyjob runningcargo clippy --all-targets -- -D warningsinvoice_liquidity,iln_governance, andreputation_bonuscrates
Test plan
cargo clippy --all-targets -- -D warningsexits 0cargo test --workspace --tests --all— all tests pass includingoracle_integration_test(9/9)Closes #91, closes #94, closes #95, closes #97