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

Fix DifferentChainID error #722

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Fix DifferentChainID error #722

merged 1 commit into from
Jul 30, 2024

Conversation

JamesHinshelwood
Copy link
Contributor

PR #699 attempted to remove the startup-time dependency on the API by moving the point at which we get the chain ID to transaction creation time.

However, this wasn't valid because the signer needs to be configured with the correct chain ID. Instead, we wrap our provider in a tokio::sync::OnceCell and lazily initialise it.

This means the signer is initialised with the result of the call from eth_chainId, but we don't need to make this call until someone uses the faucet.

PR #699 attempted to remove the startup-time dependency on the API
by moving the point at which we get the chain ID to transaction
creation time.

However, this wasn't valid because the signer needs to be
configured with the correct chain ID. Instead, we wrap our
provider in a `tokio::sync::OnceCell` and lazily initialise it.

This means the signer is initialised with the result of the call
from `eth_chainId`, but we don't need to make this call until
someone uses the faucet.
@JamesHinshelwood JamesHinshelwood merged commit 4107bb2 into main Jul 30, 2024
4 of 6 checks passed
@JamesHinshelwood JamesHinshelwood deleted the fix-spout branch July 30, 2024 06:21
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.

2 participants