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
systemApps
array andisSystemApp
mapping to manage system applications. - Introduced
updateSystemApps
function to update the list of system apps. - Modified
getSponsor
function togetApp
for better clarity. - Added
getSystemApps
function to retrieve the list of system apps.
- Added
-
SponsorPaymaster.sol
- Updated
getSponsor
function call togetApp
for consistency with the new naming convention.
- Updated
-
KintoWallet.sol
- Improved documentation and comments for better clarity.
- Added
systemApp
check in_executeInner
function to allow system apps to execute without being whitelisted. - Removed redundant privileged app checks and logic.
-
Tests
-
KintoAppRegistryTest
- Added tests for
updateSystemApps
to 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