Skip to content

Conversation

@zZoMROT
Copy link
Contributor

@zZoMROT zZoMROT commented Jan 24, 2025

Added helper method getPermit2Address to avoid breaking changes by selecting the appropriate constant based on chainId for zkSync and other networks.

Static Code Analysis (readability, compactness):

Improves flexibility without modifying existing logic.

Dynamic Code Analysis (external APIs, interaction flows):

Ensures correct Permit2 contract address selection per supported network.

Efficiency (gas costs, computational complexity, memory requirements):

Minimal gas overhead with conditional logic.

Opinion, trade-offs and other thoughts (optional):

  • Maintains backward compatibility while adding multi-chain support.
  • Easy to add different custom networks in the future.

@codecov
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0268e85) to head (887dc33).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #174   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          342       346    +4     
  Branches        65        65           
=========================================
+ Hits           342       346    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ZumZoom ZumZoom merged commit 8ce00fb into master Feb 3, 2025
8 checks passed
@ZumZoom ZumZoom deleted the feature/permit2-zksync-2 branch February 3, 2025 12:40
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.

3 participants