Skip to content

Conversation

@hanzel98
Copy link
Contributor

@hanzel98 hanzel98 commented Nov 21, 2025

Summary

This PR removes the ArgsEqualityCheckEnforcer requirement and aggregator whitelist functionality from the DelegationMetaSwapAdapter contract to simplify the swap delegation flow.

DelegationMetaSwapAdapter: 0xB457CE3b5b6B6449B6d3CA08D498BAc9D8407045

Changes

Contract ()

  • ✅ Removed argsEqualityCheckEnforcer immutable state variable
  • ✅ Removed isAggregatorAllowed mapping (aggregator whitelist)
  • ✅ Removed WHITELIST_ENFORCED and WHITELIST_NOT_ENFORCED constants
  • ✅ Updated constructor to remove _argsEqualityCheckEnforcer parameter
  • ✅ Simplified swapByDelegation function by removing _useTokenWhitelist parameter
  • ✅ Removed _validateTokens() function
  • ✅ Removed updateAllowedAggregatorIds() function
  • ✅ Removed related events: SetArgsEqualityCheckEnforcer, ChangedAggregatorIdStatus
  • ✅ Removed related errors: MissingArgsEqualityCheckEnforcer, AggregatorIdIsNotAllowed

Tests & Deployment

  • ✅ Updated all constructor calls across tests
  • ✅ Updated all swapByDelegation calls to remove whitelist parameter
  • ✅ Removed aggregator whitelist management tests
  • ✅ Removed ArgsEqualityCheckEnforcer-specific tests
  • ✅ Updated delegation caveats in helper functions
  • ✅ Updated deployment script

Impact

  • Any aggregator can now be used (no whitelist check)
  • Delegations no longer require ArgsEqualityCheckEnforcer as first caveat
  • Token whitelist (isTokenAllowed) remains but is not enforced (can be removed in future if not needed)
  • Simplified API surface for the contract

Testing

All existing tests pass with the modifications. The contract compiles successfully with no linter errors.

…rom DelegationMetaSwapAdapter

- Remove argsEqualityCheckEnforcer requirement from delegations
- Remove aggregator whitelist functionality (isAggregatorAllowed)
- Simplify swapByDelegation function by removing _useTokenWhitelist parameter
- Update constructor to remove argsEqualityCheckEnforcer parameter
- Remove _validateTokens and updateAllowedAggregatorIds functions
- Update all tests to reflect changes
- Update deployment script
@hanzel98 hanzel98 self-assigned this Nov 21, 2025
Remove test_revert_swapByDelegation_tokenFromNotAllowed and test_revert_swapByDelegation_tokenToNotAllowed tests since token whitelist validation was removed from the contract
@hanzel98 hanzel98 closed this Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants