Skip to content

Conversation

@yrong
Copy link
Contributor

@yrong yrong commented Feb 6, 2026

Summary

Adds optional sweep support to the CallContracts command so that when sub-calls fail, configured tokens (including ETH) can be swept to a recipient. This recovers assets that would otherwise be stuck in the agent when a call reverts.

Behavior

  • CallContracts: Runs sub-calls in order and reverts on the first failure.
  • Sweep on failure: When configured, a sweep runs in the catch block after a failure to move the agent’s ETH and/or ERC20s to a recipient.
  • Payload format: CallContractsParams bundles calls, sweepRecipient, and tokensToSweep.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 83.78378% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.14%. Comparing base (1832f1a) to head (6beeda5).

Files with missing lines Patch % Lines
contracts/src/AgentExecutor.sol 75.00% 3 Missing and 1 partial ⚠️
contracts/src/Gateway.sol 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1702      +/-   ##
==========================================
+ Coverage   81.04%   81.14%   +0.09%     
==========================================
  Files          22       22              
  Lines         997     1034      +37     
  Branches      186      195       +9     
==========================================
+ Hits          808      839      +31     
- Misses        172      177       +5     
- Partials       17       18       +1     
Flag Coverage Δ
solidity 81.14% <83.78%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yrong yrong changed the title Add multiple contract calls Call multiple contracts with optional Sweep-on-Failure Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant