-
Notifications
You must be signed in to change notification settings - Fork 238
feat(proxy): Add mainnet
network enum
#1756
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
Conversation
mainnet
network enummainnet
network enum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the EigenDA mainnet network in the proxy service.
- Introduces
MainnetEigenDANetwork
in the network enum and adds its associated contract addresses, disperser endpoint, and chain ID mapping. - Updates CLI messaging and GitHub Actions to include the new mainnet configuration.
- Adds a dedicated
.env.exampleV2.mainnet
with full mainnet settings.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
api/proxy/config/v2/eigendaflags/cli.go | Updated CLI help text to list four allowed networks including mainnet |
api/proxy/common/eigenda_network.go | Added mainnet constant, address mappings, chainID map, and parser case |
api/proxy/.env.exampleV2.mainnet | New example config file for mainnet |
.github/workflows/test-proxy.yml | Included .env.exampleV2.mainnet in the CI test matrix |
Comments suppressed due to low confidence (2)
api/proxy/.env.exampleV2.mainnet:1
- The header comment still refers to "Holesky Testnet" but this file is for mainnet. Update it to reflect mainnet.
# V2 Configuration for Holesky Testnet
api/proxy/common/eigenda_network.go:17
- There are no existing unit tests for the new mainnet case in methods like GetEigenDADirectory, GetServiceManagerAddress, GetDisperserAddress, and GetBLSOperatorStateRetrieverAddress. Consider adding tests to cover these code paths.
case MainnetEigenDANetwork:
) | ||
|
||
// GetEigenDADirectory returns, as a string, the address of the EigenDADirectory contract for the network. | ||
func (n EigenDANetwork) GetEigenDADirectory() (string, error) { | ||
switch n { | ||
case MainnetEigenDANetwork: | ||
return "0x64AB2e9A86FA2E183CB6f01B2D4050c1c2dFAad4", nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Hardcoded contract addresses are repeated across multiple methods. You could extract these values into package-level constants or a single mapping to reduce duplication and ease future updates.
Copilot uses AI. Check for mistakes.
mainnet
network enummainnet
network enum
…y contract - gen static output
@@ -57,6 +64,8 @@ func (n EigenDANetwork) GetDisperserAddress() (string, error) { | |||
// network | |||
func (n EigenDANetwork) GetBLSOperatorStateRetrieverAddress() (string, error) { | |||
switch n { | |||
case MainnetEigenDANetwork: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add TODO to get rid of this function and fetch via directory instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -27,6 +30,8 @@ func (n EigenDANetwork) GetEigenDADirectory() (string, error) { | |||
// GetServiceManagerAddress returns, as a string, the address of the EigenDAServiceManager contract for the network. | |||
func (n EigenDANetwork) GetServiceManagerAddress() (string, error) { | |||
switch n { | |||
case MainnetEigenDANetwork: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add todo to get rid of this function and fetch from directory instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) | ||
|
||
// GetEigenDADirectory returns, as a string, the address of the EigenDADirectory contract for the network. | ||
func (n EigenDANetwork) GetEigenDADirectory() (string, error) { | ||
switch n { | ||
case MainnetEigenDANetwork: | ||
return "0x64AB2e9A86FA2E183CB6f01B2D4050c1c2dFAad4", nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention is function comment that these addresses should always match with https://docs.eigencloud.xyz/products/eigenda/networks/mainnet
this way llm can catch bugs in future if we redeploy a directory and forget to update this fct or docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Add support for EigenDA mainnet network configuration in the proxy service.
Changes
MainnetEigenDANetwork constant
mapping
mainnet configuration
values