Skip to content

enforce mandate spending caps with pre-flight balance check - #185

Open
BigMick03 wants to merge 3 commits into
Sub-Rosa-Issue:mainfrom
BigMick03:subrosa-1
Open

enforce mandate spending caps with pre-flight balance check#185
BigMick03 wants to merge 3 commits into
Sub-Rosa-Issue:mainfrom
BigMick03:subrosa-1

Conversation

@BigMick03

Copy link
Copy Markdown

Closes #159

Pre-flight check comparing bid + escrow against mandate cap and balance.
Clear typed error when a bid would exceed the cap.
Tests for within-cap, over-cap, and insufficient-balance cases.
Behavior documented.

Add InsufficientBalanceError and assertSufficientBalance to mandate guards.
Integrate SAC balance query into runBidderAgent via createSacBalanceReader,
checking that the session account holds enough escrow token before
committing. New usdcSacId field on BidderAgentConfig (required).

Includes pure-function unit tests for sufficient/insufficient balance,
negative-cap regression test, e2e script update, and README documenting
the full guard-rail table.
@drips-wave

drips-wave Bot commented Aug 2, 2026

Copy link
Copy Markdown

@BigMick03 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent: enforce mandate spending caps with pre-flight balance check

1 participant