Smart contracts¶
The shop's limits live on chain, in a contract the agent cannot change. These are the contracts
in contracts/ (Solidity 0.8.37, Arc Foundry).
Deployed on Arc Testnet¶
| Contract | Address |
|---|---|
ShopPayablesFactory |
0x4d8efEc867e9F46c05E8359e81dEC6C7D13c95A8 (source verified on Sourcify) |
| USDC (ERC-20 interface) | 0x3600000000000000000000000000000000000000 |
| Memo (predeployed) | 0x5294E9927c3306DcBaDb03fe70b92e01cCede505 |
| Agent wallet (Circle EOA) | 0x2309ed4a43e3b1ab4222f6938538a6c88bd27dd8 |
Who can do what¶
The owner can also call pay, and the limits do not apply to the owner. Every other caller is
refused with NotAuthorized.
How a payment is accepted¶
Each invoiceRef is a unique reference for the invoice (the contract documents a hash of its ERP
name as one example), so it can be paid once and matched to its invoice. The transfer uses transferFrom: the money stays in the owner's wallet until the call
succeeds, and revoking the USDC allowance stops every payment.
Limits¶
maxPerPaymentis greater than zero and no more thanweeklyCap.- The weekly window starts when the shop is created and runs in seven-day blocks.
- Only the owner changes limits. Every change emits
LimitsChanged.
Events¶
| Event | Emitted when |
|---|---|
Paid |
An invoice is paid, with its reference, payee, amount and caller |
LimitsChanged |
The owner changes the per-payment or weekly limit |
AgentChanged |
The owner sets the agent's address |
PayeeSet |
The owner approves or removes a supplier wallet |
Paused / Unpaused |
The agent or owner pauses; only the owner resumes |
The dashboard reads these events from the chain to show suppliers and payments.