Skip to content

backend: add Transactions implementation to blockbook. #3443

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

Open
wants to merge 1 commit into
base: staging-blockbook
Choose a base branch
from

Conversation

bznein
Copy link
Collaborator

@bznein bznein commented Jul 9, 2025

Note: based on #3440

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

// But numConfirmations is already returned by the API call.
_ = blockTipHeight

_ = isInternal // TODO figure out how to deal with internal txs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do, my ERC20 accounts don't show any transactions with this PR 😅 I should probably review once it works for ETH and ERC20, or do you want to separate it into two PRs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think since we are on a staging branch, is fine to do it in a separate PR. Definitely need to do some investigation for it :)

to = tx.Vout[0].Addresses[0]
}
if ours != from && ours != to {
return nil, errp.New("transaction does not belong to our account")
Copy link
Contributor

Choose a reason for hiding this comment

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

This errors on my ETH account I use for testing, because some spam tx touched it:

https://etherscan.io/tx/0x1a926b5296dc6803a8a07daeebbd6b1b6b476790af5719ec628d5eeca08027f2

This tx has a ton of ERC-1155 token transfers (NFTs?), one of which touches my address.

I am not sure so you should check, but I think the Etherscan-based account includes such transactions in the list if it originated from the account, in other words, if the ETH accounts paid the fees for it (which impacts the account balance and portfolio chart calculation). I guess it does not make sense to list "incoming" token transfers in the main ETH account, these are shown separately in the respective ERC20 accounts.

@bznein bznein force-pushed the blockbook_4 branch 2 times, most recently from 3776e83 to ec78e5c Compare July 15, 2025 11:09
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