kinto-core
kinto-core copied to clipboard
System apps
Summary
This PR introduces several enhancements and fixes to the KintoAppRegistry, IKintoAppRegistry, IKintoWallet, and related contracts. The main changes include the addition of system app management, updates to the wallet execution logic, and improvements to the test coverage.
Implementation Details
-
KintoAppRegistry.sol
- Added
systemAppsarray andisSystemAppmapping to manage system applications. - Introduced
updateSystemAppsfunction to update the list of system apps. - Modified
getSponsorfunction togetAppfor better clarity. - Added
getSystemAppsfunction to retrieve the list of system apps.
- Added
-
SponsorPaymaster.sol
- Updated
getSponsorfunction call togetAppfor consistency with the new naming convention.
- Updated
-
KintoWallet.sol
- Improved documentation and comments for better clarity.
- Added
systemAppcheck in_executeInnerfunction to allow system apps to execute without being whitelisted. - Removed redundant privileged app checks and logic.
-
Tests
- KintoAppRegistryTest
- Added tests for
updateSystemAppsto ensure correct functionality and edge cases.
- Added tests for
- ExecuteTest
- Added tests for executing transactions with system apps.
- Improved existing tests to cover more scenarios.
- ExecuteBatchTest
- Added tests for batch execution with system apps.
- ValidateSignatureTest
- Removed tests related to privileged apps as the logic has been simplified.
- WhitelistTest
- Simplified tests for whitelisting apps and setting app keys.
- KintoAppRegistryTest
Summary of Changes
- Added system app management in
KintoAppRegistry. - Updated wallet execution logic to support system apps.
- Improved documentation and comments across multiple contracts.
- Enhanced test coverage for new and existing functionalities.
Type of change
- [ ] Bug fix
- [x] New feature
- [ ] Breaking change
- [ ] Dependency changes
- [ ] Deployment
- [ ] Forge Script
- [ ] Code refactor / cleanup
- [ ] Documentation or wording changes
- [ ] Other
Checklist:
- [x] The diff is legible and has no extraneous changes
- [x] Complex code has been commented, including external interfaces
- [x] Tests have 100% code coverage
- [x] The base branch is either
main, or there's a description of how to merge
Issue Resolution
System apps
Generated at commit: 7d933d98d60705857a7a92440d72d75f39f898ab
🚨 Report Summary
| Severity Level | Results | |
|---|---|---|
| Contracts | Critical High Medium Low Note Total | 3 1 0 12 40 56 |
| Dependencies | Critical High Medium Low Note Total | 0 0 0 0 0 0 |
For more details view the full report in OpenZeppelin Code Inspector
Slither report
THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.81%. Comparing base (
adc3651) to head (7d933d9). Report is 11 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #256 +/- ##
==========================================
+ Coverage 89.74% 89.81% +0.06%
==========================================
Files 33 33
Lines 1746 1747 +1
==========================================
+ Hits 1567 1569 +2
+ Misses 179 178 -1
| Files | Coverage Δ | |
|---|---|---|
| src/apps/KintoAppRegistry.sol | 98.09% <100.00%> (+0.09%) |
:arrow_up: |
| src/paymasters/SponsorPaymaster.sol | 100.00% <100.00%> (ø) |
|
| src/wallet/KintoWallet.sol | 88.67% <100.00%> (+0.33%) |
:arrow_up: |