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(store-indexer,store-sync): make chain optional, configure indexer with RPC #1234

Merged
merged 3 commits into from Aug 3, 2023

Conversation

holic
Copy link
Member

@holic holic commented Aug 3, 2023

Needed to make the indexed configurable with just RPC URLs

@changeset-bot
Copy link

changeset-bot bot commented Aug 3, 2023

🦋 Changeset detected

Latest commit: 027c4f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@latticexyz/store-indexer Major
@latticexyz/store-sync Major
@latticexyz/block-logs-stream Major
@latticexyz/cli Major
@latticexyz/common Major
@latticexyz/config Major
create-mud Major
@latticexyz/dev-tools Major
@latticexyz/ecs-browser Major
@latticexyz/gas-report Major
@latticexyz/network Major
@latticexyz/noise Major
@latticexyz/phaserx Major
@latticexyz/protocol-parser Major
@latticexyz/react Major
@latticexyz/recs Major
@latticexyz/schema-type Major
@latticexyz/services Major
@latticexyz/solecs Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/std-client Major
@latticexyz/std-contracts Major
@latticexyz/store-cache Major
@latticexyz/store Major
@latticexyz/utils Major
@latticexyz/world Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@holic holic changed the title feat(store-indexer,store-sync): make chain optional feat(store-indexer,store-sync): make chain optional, configure indexer with RPC Aug 3, 2023
@holic holic marked this pull request as ready for review August 3, 2023 16:42
@holic holic requested a review from alvrs as a code owner August 3, 2023 16:42
Comment on lines 36 to 41
const chain = env.CHAIN_ID ? possibleChains.find((c) => c.id === env.CHAIN_ID) : undefined;

const transports: Transport[] = [
env.RPC_WS_URL ? webSocket(env.RPC_WS_URL) : null,
env.RPC_HTTP_URL ? http(env.RPC_HTTP_URL) : null,
].filter(isNotNull);
Copy link
Member

Choose a reason for hiding this comment

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

should we throw an error if neither CHAIN_ID nor RPC_HTTP_URL/RPC_WS_URL are set?

alvrs
alvrs previously approved these changes Aug 3, 2023
Copy link
Member

@alvrs alvrs left a comment

Choose a reason for hiding this comment

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

comment is not blocking, can do followup

@holic holic merged commit 131c63e into main Aug 3, 2023
10 checks passed
@holic holic deleted the holic/indexer-rpc branch August 3, 2023 16:59
@github-actions github-actions bot mentioned this pull request Aug 3, 2023
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.

None yet

2 participants