-
Notifications
You must be signed in to change notification settings - Fork 716
feat: add setup contracts to contract consensus test #6699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add setup contracts to contract consensus test #6699
Conversation
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (75.63%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #6699 +/- ##
===========================================
- Coverage 79.47% 75.63% -3.84%
===========================================
Files 577 577
Lines 357469 357564 +95
===========================================
- Hits 284089 270460 -13629
- Misses 73380 87104 +13724
... and 245 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
d35184e
f3f889f
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Updates the consensus testing infrastructure to support deploying dependency contracts before the main contract under test.
While writing tests for
CheckErrorKind, I encountered multiple scenarios requiring pre-deployed contracts (e.g., for the traits ) that the main contract references. Instead of usingConsensusTestfor each case, I extended the macros to simplify this setup.Changes
contract_call_consensus_test!andcontract_deploy_consensus_test!to accept an optionalsetup_contractsparameter.SetupContractto define these dependencies.static_check_error_bad_trait_implementationto static_analysis_tests.rs demonstrating the use of asetup contract for a trait definition.
Will add more tests in future PRs.
Applicable issues
Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yamlandrpc-endpoints.mdfor v2 endpoints,event-dispatcher.mdfor new events)clarity-benchmarkingrepo