Cleared
Cleared keeps the contract in charge. src/Treasury.sol is a compact Foundry contract where only the designated agent can call pay(vendor, amount, invoiceHash), and every call is checked against vendorCap, a rolling spentOnDay daily cap, an invoicePaid replay guard and a pause flag, with Paid, VendorSet, DailyCapSet and AgentSet events for the audit trail. test/Treasury.t.sol covers the rules with 10 forge tests, and script/Deploy.s.sol ships a broadcast to Arc testnet. The policy layer is web/api/cleared.js, a Vercel serverless ethers.js endpoint that screens the vendor name against a sanctions list, checks invoice hash and vendor cap on-chain before submitting, and records why each payment was approved or refused. web/index.html is a single-page console that submits payments through the agent path and includes a bypass flow that calls the contract directly to show the on-chain limits hold on their own. It is a small, forkable pattern for giving a spending key bounded authority over USDC on Arc.
Learning Cloud & DevOps in public 🚀 AWS · Linux · Terraform | Web3 content strategist & builder
1 (Solo) — Benny