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: extract splitterFactory address to the object and expose chain ID #472

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

vojtechsimetka
Copy link
Contributor

Resolves #450

I decided to stor the chainId of the different chains into the BlockchainNetwork type because:

  1. Getting the chainId is async call which makes the args creation a bit more challenging. Storing it in the BlockchainNetwork means we can just get it.
  2. This way we can define the chains we want to connect to and then validate with the RPC that we are connected to the right chain. This is done in the main Layout.

@vojtechsimetka vojtechsimetka requested a review from agazso October 12, 2023 15:53
@vercel
Copy link

vercel bot commented Oct 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku-objects-playground ✅ Ready (Inspect) Visit Preview Oct 12, 2023 3:53pm

Copy link
Contributor

@agazso agazso left a comment

Choose a reason for hiding this comment

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

Looks good.

I found that the chainId is bigint strange but I reckon it is also returned as such in Ethers.

@vojtechsimetka
Copy link
Contributor Author

I found that the chainId is bigint strange but I reckon it is also returned as such in Ethers.

Yes ethersjs@6 does return everything as bigint now. Token balances, or even chain IDs. Before these used to be strings

@vojtechsimetka vojtechsimetka merged commit dc9dbf8 into main Oct 13, 2023
2 checks passed
@vojtechsimetka vojtechsimetka deleted the feat/extract-splitter-address-to-the-object branch October 13, 2023 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

splitterFactory address is hardcoded in the BlockchainNetwork type
2 participants