Return native token balance to address #991
Open
Kushmanmb wants to merge 25 commits intocoinbase:mainfrom
Open
Return native token balance to address #991Kushmanmb wants to merge 25 commits intocoinbase:mainfrom
Kushmanmb wants to merge 25 commits intocoinbase:mainfrom
Conversation
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
feat(typescript): add get_balance action to WalletActionProvider
Fix `yarn install` in `create-onchain-agent` next template
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
…pt and Python) Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Add return_native_balance action: sweep entire wallet balance minus gas fees
feat(typescript): migrate TypeScript monorepo from pnpm to yarn
🟡 Heimdall Review Status
|
Kushmanmb
commented
Mar 7, 2026
…Python) Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
…s, fix BigInt precision, fix URL construction Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
…uperfluid test address assertions, use checksummed addresses Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
…ovider.ts 0x6fb9e80dDd0f5DC99D7cB38b07e8b298A57bF253 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…llet/validators.py 0x6fb9e80dDd0f5DC99D7cB38b07e8b298A57bF253 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…case-insensitive 0x prefix Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
…rabilities Add EVM zero address protection to wallet transfer actions
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a new "return native balance" action for wallets, allowing users to transfer their entire native token balance (minus estimated network/gas fees) to a specified address. The implementation includes robust gas/fee estimation for EVM and Solana networks, schema definitions, and comprehensive unit tests. Additional improvements include minor workflow updates and enhancements to schema definitions and tests for existing wallet actions.
Wallet Action: Return Native Balance
ReturnNativeBalanceSchemain both Python (wallet/schemas.py) and TypeScript (wallet/schemas.ts) to define input for the new action, requiring only a destination address. [1] [2]return_native_balanceaction inWalletActionProvider, including logic to estimate gas/transaction fees for EVM (using provider, web3, or fallback) and Solana, and error handling for insufficient balance or transfer failures. [1] [2]Schema and Test Enhancements
GetBalanceSchemain TypeScript for input validation of the get balance action, and expanded tests for balance retrieval and schema validation. [1] [2]Workflow and Dependency Updates
These changes collectively improve wallet action functionality, reliability, and test coverage.<!--
Thanks for contributing to AgentKit!
Please fill out the information below to help reviewers understand your changes.
Note: We require commit signing.
See here for instructions: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification
-->
Description
Tests
Checklist
A couple of things to include in your PR for completeness: