Repository navigation
feat(core): add AGW v5 SDK support - #291
Open
mohammeds1992 wants to merge 27 commits into
Open
mohammeds1992 wants to merge 27 commits into
mohammeds1992 wants to merge 27 commits into
Conversation
Add wallet creation, labels and rules management, owner and agent execution, and EVM/Solana destination composition and tracking. Include independent token budgets, SPL source-mint resolution, raw-offset rule support and the READ.CHAIN.WEB2 alias. Keep runtime bindings, consumer documentation, ABI snapshots, local-contract tests, opt-in funded E2Es and validation scripts together. Align CI with the deployed v5 source. Exclude all planning-folder changes.
Sync non-plan source through v4 aed6799, including AGW error improvements and marketplace SDK work. Preserve v5 release version, changelog, lockfile and existing plan tree.
- Resolve the node-registered Circle USDC routes (Sepolia, Base, Arbitrum Sepolia) by exact address for agentic wallets; DEXES Sepolia and LENDING Arbitrum Sepolia presets become route-ready. - AGW gas budget never attaches less than the Push pool cost plus 20%, keeps the over-$10 share and excludes protocolFee; BNB testnet gas is valued at the pool rate because no BNB/USD feed exists. - Agent EVM sends default to 1,000,000 gas for token exports or multi-call payloads (the 500,000 base ran out on a Sepolia swap); omitted Solana gas uses route and finalize sizing. - Refuse an explicit gasLimit below the chain base, a Solana budget still short after one re-quote, and a zero Solana maxGasPerCall. - Correct the Base Sepolia WETH address. - Add opt-in live groups (unchanged and routed presets, gas, agent SPL, exact routes, Solana Memo) and read-only compatibility, gas-quote and route-registry drift scripts.
Act on the product, preset and contract answers (Harsh, Aman, Zaryab):
- Presets contain only what works: Uniswap V3 and Aave V3 on Sepolia,
Base Sepolia and Arbitrum Sepolia. Each sends native ETH from Push and
wraps it on arrival; DEX swaps WETH and Circle USDC on the destination
only. get() returns { rules }: readiness and the network option are
removed, PREDICTION and the mainnet templates are dropped, and supplied
assets must be one ETH asset per chain with positive limits.
- Tokens-only EVM rules: ERC20 assets without allowedCalls become
transfer calls pinned to the owner's EVM address, plus opt-in transferTo
recipients. Native assets and Solana are refused.
- MOVEABLE.TOKEN.<CHAIN>.ALL expands to every routable token with default
limits; utils.agentic.assets.all(chain) exposes the list. create, add
and update take the new AuthoredRule input type; Rule is unchanged.
- Report the eight-function Push-chain limit before the generic 1..32.
- Refuse Solana fromEnd data pins on write until the policy fix.
- Decode InnerValueExceedsAllowance and BeneficiaryMismatch, which URP
encodes by selector and its compiled ABI omits.
Tests: rewritten preset unit, local v6 and live acceptance specs (the
DEX case picks the fee tier with QuoterV2); new tokens-only/ALL unit and
live specs; the old prefunded preset fixtures are removed. All six
presets and both tokens-only/ALL cases pass live on Donut.
This branch has not been deployed
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.
Summary
Adds
client.agenticso owners can create and label an agentic wallet, grant/update/revoke rules, and connect an owner or agent signer to send from that wallet. Targets the deployed Donut v5 suite, with native Push execution, EVM destinations, named-IDL Solana instructions and owner funds-only SOL/SPL transfers.packages/core/src/lib/agentic/.READ.CHAIN.WEB2withweb2; legacyweb2:httpsinput remains accepted.Consumer guide: packages/core/AGW.md.
Validation
agw-verify.js: focused units, real contracts, library/spec/local typechecks, build, guide examples, package imports/declarations and API comparison.allremains 76 scenarios and excludes funded AGW groups. No funded E2Es were rerun to create this PR.Review notes
No
plan/changes are included. The planning/evidence bundle remains in #290; that PR is unchanged.Fresh Sepolia CEA finalization exceeded the current upstream 500,000-gas default. Positive tests/examples use an explicit 2,000,000 destination-gas budget; the SDK does not silently change the default. Refund spend-credit wiring remains a downstream executor dependency. Existing v4 wallets are unsupported by this v5-only adapter.