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.54545% with 160 lines in your changes missing coverage. Please review.

Project coverage is 75.14%. Comparing base (00ac988) to head (56509eb).
Report is 2 commits behind head on main.

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.60%   75.14%   -0.47%     
==========================================
  Files         104      104              
  Lines       11102    11430     +328     
==========================================
+ Hits         8394     8589     +195     
- Misses       2074     2194     +120     
- Partials      634      647      +13     

☔ 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
},
{
Name: "starknet_subscribeTransactionStatus",
Params: []jsonrpc.Parameter{{Name: "transaction_hash"}, {Name: "block"}},
Copy link
Contributor

Choose a reason for hiding this comment

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

block should be optional as per the specs

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?

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