Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hanzel98
Copy link
Contributor

@hanzel98 hanzel98 commented Mar 13, 2025

What?

  • Making the MetaSwap Adapter to optionally enforce the token whitelist with a flag
  • A signature validation on the Api Swap data and expiration time is added.

Why?

  • The flow needs to be more flexible, some delegations could allow swaps to any tokens.
  • The MetaSwapAdapter is meant to be used with accurate swap data from the swaps API, these changes enforce that the swap data comes from the swaps API and it is recent data.

How?

  • Adding a boolean flag to the function swapByDelegation to enforce the token whitelist or not.
  • Using the argsEqualityCheckEnforcer to allow the root delegator indicate if the whitelist must be enforced or not.
  • Adding signature validation and expiration time.

Previous PR: #86

@hanzel98 hanzel98 requested a review from a team as a code owner March 13, 2025 14:05
@hanzel98 hanzel98 self-assigned this Mar 13, 2025
@hanzel98 hanzel98 changed the title Chore/adapter whitelist MetaSwap Adapter Optional Token Whitelist Mar 13, 2025
@hanzel98 hanzel98 force-pushed the chore/adapter-whitelist branch from eb786fb to cca89f6 Compare March 13, 2025 15:14
@hanzel98 hanzel98 requested a review from McOso March 21, 2025 22:55
Copy link
Member

@McOso McOso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some comments. Let me know what you think about the enforced message. I would be okay with just removing spaces and connecting words with "-"

@hanzel98 hanzel98 requested a review from McOso April 5, 2025 13:27
McOso
McOso previously approved these changes Apr 7, 2025
McOso
McOso previously approved these changes Apr 7, 2025
@hanzel98 hanzel98 force-pushed the chore/adapter-whitelist branch from b0ea519 to 73b0e2e Compare April 7, 2025 23:05
@hanzel98 hanzel98 requested a review from McOso April 7, 2025 23:05
@hanzel98 hanzel98 changed the title MetaSwap Adapter Optional Token Whitelist MetaSwap Adapter Optional Token Whitelist And Added Swaps ApiData Signature Validation Apr 8, 2025
Copy link
Member

@McOso McOso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hanzel98 hanzel98 merged commit 0f8e128 into main Apr 11, 2025
4 checks passed
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.

4 participants