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(gnoclient): Add Transaction and PendingTransaction methods #2643

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

linhpn99
Copy link
Contributor

@linhpn99 linhpn99 commented Jul 30, 2024

This PR adds functionality for retrieving transaction by hash from the blockchain and handling unconfirmed transactions.This PR includes :

  • The function implementations
  • Its associated unit tests
Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Jul 30, 2024
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 60.45%. Comparing base (f04ec89) to head (1293ebb).
Report is 51 commits behind head on master.

Files with missing lines Patch % Lines
gno.land/pkg/gnoclient/client_queries.go 83.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2643      +/-   ##
==========================================
+ Coverage   60.44%   60.45%   +0.01%     
==========================================
  Files         563      563              
  Lines       75159    75183      +24     
==========================================
+ Hits        45427    45453      +26     
+ Misses      26343    26340       -3     
- Partials     3389     3390       +1     
Flag Coverage Δ
contribs/gnodev 61.46% <ø> (ø)
contribs/gnofaucet 15.31% <ø> (ø)
gno.land 67.34% <83.33%> (+0.12%) ⬆️
gnovm 64.46% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 20.23% <ø> (+0.35%) ⬆️
tm2 61.96% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@linhpn99 linhpn99 changed the title feat(gnoclient): Add method to query Transaction by hash feat(gnoclient): Add Transaction and PendingTransaction methods Jul 30, 2024
@Kouteki Kouteki added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Oct 3, 2024

// GetTransaction retrieves the transaction details for a given transaction hash
// The provided hash must be a valid base64 encoded string
func (c *Client) Transaction(hash string) (*ctypes.ResultTx, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment says "GetTransaction". Should the function name be GetTransaction?

// PendingTransaction retrieves unconfirmed transactions from the blockchain
// The `limit` parameter specifies the maximum number of unconfirmed transactions to return
// If `limit` is 0, it retrieves all unconfirmed transactions
func (c *Client) PendingTransaction(limit int) (*ctypes.ResultUnconfirmedTxs, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should this be named GetPendingTransaction , similar to GetTransaction.

@jefft0
Copy link
Contributor

jefft0 commented Oct 31, 2024

@linhpn99 Is this PR still being worked on?
cc @sunspirit99

@sunspirit99
Copy link
Contributor

@linhpn99 Is this PR still being worked on?

cc @sunspirit99

I'm no longer continuing with this, but I’m sure the others are still waiting for a review and ready to keep developing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related review/triage-pending PRs opened by external contributors that are waiting for the 1st review
Projects
Status: No status
Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants