smartcontractkit / ccip

Cross Chain Interoperability Protocol
Other
119 stars 47 forks source link

feat: add getter to return all source chain config #1477

Closed 0xsuryansh closed 1 week ago

0xsuryansh commented 2 weeks ago

Motivation

The current offchain initialization process involves calling getSourceChainConfig(sourceChainSelector), which retrieves configurations for a specific source chain selector. However, there's no mechanism to fetch a complete list of supported source chains during the initialization phase. This limitation complicates the process, as the full list of source chain selectors is not readily available.

Solution

To address this, the proposed solution introduces an enumerable set of all source chain selectors. By implementing a getAllSourceChainConfig() function, we can easily retrieve the complete list of source chains on-chain. This eliminates the need for additional rounds of OCR gossip to share known source chains, simplifying initialization and improving efficiency.

github-actions[bot] commented 2 weeks ago

LCOV of commit d2c3165 during Solidity Foundry #8524

Summary coverage rate:
  lines......: 97.8% (2270 of 2320 lines)
  functions..: 95.3% (427 of 448 functions)
  branches...: 93.6% (537 of 574 branches)

Files changed coverage rate: n/a
cl-sonarqube-production[bot] commented 1 week ago

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