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

Check if ETHEREUM_4337_BUNDLER_URL uses the correct chainId #2013

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

Uxio0
Copy link
Member

@Uxio0 Uxio0 commented Apr 28, 2024

"""
if settings.ETHEREUM_4337_BUNDLER_URL:
return BundlerClient(settings.ETHEREUM_4337_BUNDLER_URL)
logger.warning("ETHEREUM_4337_BUNDLER_URL not set, cannot configure bundler client")
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

One warning is for the bundler client, other is for initializing the AccountAbstractionService, I don't think they are redundant

bundler_client = get_bundler_client()
if bundler_client:
bundler_chain_id = bundler_client.get_chain_id()
if bundler_chain_id == chain_id:
Copy link
Member

Choose a reason for hiding this comment

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

Why not uses the database chain.chain_id field instead the RPC value?
For me is clearer to compare with database than a field that was previously checked with database.
I mean, database is the source of truth.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@Uxio0 Uxio0 force-pushed the check-bundler-same-chain-id branch from c5c256b to 56cb2ad Compare April 29, 2024 11:08
@Uxio0 Uxio0 force-pushed the check-bundler-same-chain-id branch from 56cb2ad to 90730cf Compare April 29, 2024 11:08
@Uxio0 Uxio0 merged commit eaf3099 into main Apr 29, 2024
6 checks passed
@Uxio0 Uxio0 deleted the check-bundler-same-chain-id branch April 29, 2024 14:43
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if ETHEREUM_4337_BUNDLER_URL uses the same chainId as ETHEREUM_NODE_URL
2 participants