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(block-logs-stream): add block logs stream package #1070

Merged
merged 33 commits into from
Jul 4, 2023

Conversation

holic
Copy link
Member

@holic holic commented Jun 22, 2023

pulled out of #1033

@changeset-bot
Copy link

changeset-bot bot commented Jun 22, 2023

🦋 Changeset detected

Latest commit: 4891d89

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

This PR includes changesets to release 1 package
Name Type
@latticexyz/block-logs-stream Minor

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
Copy link
Member Author

holic commented Jun 22, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@holic holic force-pushed the holic/bump-viem branch from c4e1ee5 to 8ffed42 Compare June 22, 2023 18:28
@holic holic force-pushed the holic/block-sync-package branch from d739e85 to 093a852 Compare June 22, 2023 18:28
@holic holic force-pushed the holic/bump-viem branch from 8ffed42 to 8a3eb10 Compare June 23, 2023 08:49
@holic holic force-pushed the holic/block-sync-package branch from 093a852 to ca31d48 Compare June 23, 2023 08:50
@holic holic changed the title feat(block-events-stream): new block events stream package feat(block-events-stream): add\ block events stream package Jun 26, 2023
@holic holic changed the title feat(block-events-stream): add\ block events stream package feat(block-events-stream): add block events stream package Jun 26, 2023
@holic holic force-pushed the holic/block-sync-package branch from 748f33c to 1b417fa Compare June 26, 2023 09:42
Base automatically changed from holic/bump-viem to main June 26, 2023 10:05
@holic holic marked this pull request as ready for review June 26, 2023 13:29
@holic holic requested a review from alvrs as a code owner June 26, 2023 13:29
events,
}),
map(({ logs }) => from(groupLogsByBlockNumber(logs))),
mergeAll()
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 add import { mergeAll } from "rxjs" for this example?

Copy link
Member

Choose a reason for hiding this comment

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

also what's the difference between map + mergeAll to mergeMap?

Copy link
Member Author

Choose a reason for hiding this comment

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

no real difference! just got here iteratively, can do mergeMap instead

Comment on lines 24 to 26
publicClient,
address,
events,
Copy link
Member

Choose a reason for hiding this comment

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

is it worth adding the definitions of these to the example? or a comment about how to define them?

FetchLogsResult<TAbiEvents>
>;

export function blockRangeToLogs<TAbiEvents extends readonly AbiEvent[]>({
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 add a code documentation comment above here that explains the purpose / behavior?

alvrs
alvrs previously approved these changes Jul 4, 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.

minor comments, not blocking

@alvrs
Copy link
Member

alvrs commented Jul 4, 2023

just merged #1036 - can we add a changeset to this PR to try out the new release pipeline?

@holic holic changed the title feat(block-events-stream): add block events stream package feat(block-logs-stream): add block logs stream package Jul 4, 2023
@holic holic merged commit 72b8069 into main Jul 4, 2023
@holic holic deleted the holic/block-sync-package branch July 4, 2023 11:58
@alvrs alvrs added this to the MUD stable milestone Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants