You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to lookup the balances of multiple tokens for one wallet address using the "tokens" command, but it appears to not properly use the --by_acct flag.
Omit --by_acct and use three addresses for tokens command, works as expected
In normal operation the first item in the address_list is assumed to be an ERC20 token contract whose balances are being queried, whereas the remainder of the list is assumed to be addresses on which to report.
Retrieve balances for both tokens for the wallet, use --by_acct, duplicates result as without flag
In --byAcct mode, all addresses in the address_list are assumed to be ERC20 token contracts, except the final one which is the account whose token balances are reported.
It seems to ignore the --by_acct flag by treating only the first address as the token, and then the last two addresses as wallets for which to look up balances, as the prior example:
-b, --by_acct consider each address an ERC20 token except the last, whose balance is reported for each token
So it appears to be a bug...
Do you have any interest in trying to debug it? I'm flat out on the next release. If you make a valid PR, I'll merge it for the next release. Otherwise, this will probably get put on a back-log.
which appears to completely ignore the option (called ByAcct).
If you do this, I will incorporate your example into our testing suite (something easier for me to do than you), but you can also try to write some unit testing...
Thank you for the fast response, and overall for making TrueBlocks.
I've made the changes and the pull request. The examples I give above all still work and I am able to achieve the expected result in the last example. I have also tested a larger number of token contracts via serve api and it also works as expected.
I am trying to lookup the balances of multiple tokens for one wallet address using the "tokens" command, but it appears to not properly use the --by_acct flag.
Version: trueblocks-core v4.2.0, amd64
Operation system: Ubuntu 22.04
Wallet address: 0xca3Fc56d07235E97D11FA85fc9Bada41d6C6a7bc
Token 1 - Resolv USD (USR) - address: 0x66a1E37c9b0eAddca17d3662D6c05F4DECf3e110
Token 2 - YT Ethena USDe 27MAR2025 (YT-USDe-27MAR2025) - address: 0x4A8036EFA1307F1cA82d932C0895faa18dB0c9eE
Retrieve balance of Token 1 for wallet, works as expected:
Retrieve balance of Token 2 for wallet, works as expected:
Omit --by_acct and use three addresses for tokens command, works as expected
Retrieve balances for both tokens for the wallet, use --by_acct, duplicates result as without flag
It seems to ignore the --by_acct flag by treating only the first address as the token, and then the last two addresses as wallets for which to look up balances, as the prior example:
Expected result (cannot obtain this)
The text was updated successfully, but these errors were encountered: