Skip to content

feat: add flashblock RPC listener - #216

Merged
thanhpp merged 4 commits into
mainfrom
feat/flashblock-rpc-listener
Jul 29, 2026
Merged

feat: add flashblock RPC listener#216
thanhpp merged 4 commits into
mainfrom
feat/flashblock-rpc-listener

Conversation

@thanhpp

@thanhpp thanhpp commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Add RPCListener client dialing an RPC endpoint and subscribing to Base's newFlashblocks and pendingLogs feeds.
  • Add NewFlashblock/Transaction/DepositTx types handling the full-block payload shape and Base's deposit tx type (0x7e), which go-ethereum's types.Transaction doesn't support.
  • Add tests exercising both subscriptions (skipped without a live node RPC endpoint configured).

Test plan

  • go build ./... passes
  • go test ./pkg/flashblock/... passes (new tests skip without a live node RPC)
  • golangci-lint run --new-from-rev=HEAD ./pkg/flashblock/... reports no new issues

🤖 Generated with Claude Code

thanhpp and others added 2 commits July 29, 2026 15:01
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: thanhpp <thanhphanphu18@gmail.com>
@thanhpp thanhpp self-assigned this Jul 29, 2026
@thanhpp
thanhpp requested a review from vaigay July 29, 2026 08:07

@vaigay vaigay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

event.Resubscribe(1*time.Second, func(ctx context.Context) (event.Subscription, error) { return r.rpcClient.EthSubscribe(ctx, newFlashBlockCh, "newFlashblocks") })
Can we add new function like this to handle resubscribe

thanhpp added 2 commits July 29, 2026 16:07
Signed-off-by: thanhpp <thanhphanphu18@gmail.com>
Signed-off-by: thanhpp <thanhphanphu18@gmail.com>
@thanhpp
thanhpp merged commit 1c0b913 into main Jul 29, 2026
3 checks passed
@thanhpp
thanhpp deleted the feat/flashblock-rpc-listener branch July 29, 2026 09:42
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