← all projects

Cleared

@BenCoy09·Benny·added 2026-10-24
0
stars
491
lines
8
files
0
forks
0
followers
languages
Solidity 46%HTML 35%JavaScript 19%

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.

events
tags
builder bio

Learning Cloud & DevOps in public 🚀 AWS · Linux · Terraform | Web3 content strategist & builder

team · solo

1 (Solo) — Benny

on xx/Benny___5
last pushed 2026-10-16