-
Notifications
You must be signed in to change notification settings - Fork 592
Fix unit issues in balance/transfer actions #835
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Heimdall Review Status
|
719e232 to
2bc7d00
Compare
532bc67 to
c2857a8
Compare
c2857a8 to
2647632
Compare
8494f1f to
c9f3547
Compare
murrlincoln
approved these changes
Sep 4, 2025
CarsonRoscoe
approved these changes
Sep 5, 2025
Contributor
CarsonRoscoe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work, ty! Lots of little chores we've been meaning to get to all wrapped up in one nice package
This was referenced Sep 3, 2025
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action provider
New action provider
documentation
Improvements or additions to documentation
example
New example agent
typescript
wallet provider
New wallet provider
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes issues for native/erc20 balance actions reported by @Story91:
get_wallet_detailsreturns ETH amount in wei, LLM converts this to whole units in message to user. Result of conversion depends on LLM knowledge, gpt-4o-mini always got it wrong in my tests-> get_wallet_details returns now both amount in wei and whole units
when several erc20 token balances are queried in one prompt, default rpc might throw error due to rate limits
-> made rpc calls more efficient using multicall
when prompting eg "fetch usdc balance", LLM often hallucinates address (for example taking usdc address from mainnet, not base)
-> refined action description + added new action to retrieve commonly used token addresses by symbol for given network
In addition, the following improvements are made:
native_transfertakes amount in whole units as input and passes this to walletProviders. However, most of them expect atomic units instead -> this is now handled consistently as follows: action takes whole unit format as input, converts to atomic units and then calls internalnative_transferfrom walletProviders with thatget_balanceerc20 actionexamples/langchain-cdp-chatbot /chatbot.tsto correctly configure CdpSolanaWalletProviderCdpSolanaWalletProviderthat was throwingError during transfer: Error: Signature must be 64 bytes longTests
Checklist
A couple of things to include in your PR for completeness: