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

starknet_subscribeTransactionStatus websocket method #2210

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pnowosie
Copy link
Contributor

@pnowosie pnowosie commented Oct 11, 2024

Fixes #2209
This is based on #2211

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 54.28571% with 160 lines in your changes missing coverage. Please review.

Project coverage is 74.81%. Comparing base (3f7639e) to head (b617595).

Files with missing lines Patch % Lines
rpc/events.go 46.07% 136 Missing and 15 partials ⚠️
jsonrpc/server.go 64.28% 4 Missing and 1 partial ⚠️
sync/sync.go 87.09% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2210      +/-   ##
==========================================
- Coverage   75.45%   74.81%   -0.65%     
==========================================
  Files         106      106              
  Lines       11237    11565     +328     
==========================================
+ Hits         8479     8652     +173     
- Misses       2124     2258     +134     
- Partials      634      655      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pnowosie pnowosie force-pushed the pnowosie/2209-subscribe-tx-status-ws branch 2 times, most recently from c5eb695 to abfec15 Compare October 22, 2024 12:07
@pnowosie pnowosie marked this pull request as ready for review October 23, 2024 11:02
@pnowosie pnowosie force-pushed the pnowosie/2209-subscribe-tx-status-ws branch from dae4ff2 to bffd2bf Compare October 23, 2024 12:13
rpc/handlers.go Outdated Show resolved Hide resolved
return err
}

func (h *Handler) SubscribeTxnStatus(ctx context.Context, txHash felt.Felt, _ *BlockID) (*SubscriptionID, *jsonrpc.Error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As per the specs, we also need to support historical blocks. Or is it not possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not possible. I added a comment explaining this.

@pnowosie pnowosie force-pushed the pnowosie/2209-subscribe-tx-status-ws branch from 0ce1ae2 to b170da1 Compare October 29, 2024 12:12
@pnowosie pnowosie force-pushed the pnowosie/2209-subscribe-tx-status-ws branch from b170da1 to b617595 Compare November 13, 2024 12:59
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.

Implement starknet_subscribeTransactionStatus websocket method
3 participants