Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CCIP-2465 enumerableMap for addressToBytes Mapping #14012

Merged
merged 6 commits into from
Aug 12, 2024

Conversation

defistar
Copy link
Contributor

@defistar defistar commented Aug 2, 2024

EnumerableMap for mapping Bytes32 to Bytes

JIRA Ticket

https://smartcontract-it.atlassian.net/browse/CCIP-2465

Background

  • CCIP has rateLimiter with tokenMapping from local to remote chain
  • The mappings are grouped by per remoteChainSelector to its localTokenAddress => remoteTokenAddress
  • at moment the mapping for tokenAddresses are using
mapping(uint64 remoteChainSelector => EnumerableMapAddresses.AddressToBytes32Map tokensLocalToRemote) internal
    s_rateLimitedTokensLocalToRemote;

this needs to be changed to use

mapping(uint64 remoteChainSelector => EnumerableMapAddresses.AddressToBytesMap tokensLocalToRemote) internal
    s_rateLimitedTokensLocalToRemote;

Change List

  1. new library EnumerableMapBytes32.sol which contains mapping from Bytes32 => Bytes
  2. use the new library in EnumerableMapAddresses.sol for mapping arrangement functions for Address => Bytes

@defistar
Copy link
Contributor Author

defistar commented Aug 2, 2024

This is a extension for PR
#13890

previous PR was approved but one of the commits were not signed
hencwe making a new PR on another branch for clean merge

@defistar defistar self-assigned this Aug 2, 2024
@defistar defistar requested review from RayXpub and makramkd August 2, 2024 09:22
elatoskinas
elatoskinas previously approved these changes Aug 2, 2024
Copy link
Contributor

github-actions bot commented Aug 2, 2024

LCOV of commit 23f785a during Solidity Foundry #40519

Summary coverage rate:
  lines......: 98.7% (1838 of 1862 lines)
  functions..: 96.6% (344 of 356 functions)
  branches...: 90.7% (782 of 862 branches)

Files changed coverage rate: n/a

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@defistar defistar added this pull request to the merge queue Aug 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 12, 2024
@defistar defistar added this pull request to the merge queue Aug 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 12, 2024
@defistar defistar added this pull request to the merge queue Aug 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 12, 2024
@defistar defistar added this pull request to the merge queue Aug 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 12, 2024
@defistar defistar added this pull request to the merge queue Aug 12, 2024
Merged via the queue into develop with commit 518cc28 Aug 12, 2024
134 checks passed
@defistar defistar deleted the feature/CCIP-2465-enumerableMap-addressToBytesMap branch August 12, 2024 12:16
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