Vault contract reference
ProoflineVault functions, events, errors and EIP-712 types, for integrators and auditors.
Source: contracts/src/ProoflineVault.sol (Solidity 0.8.28, OpenZeppelin 5). Tests: contracts/test.
EIP-712
Domain: { name: "ProoflineVault", version: "1", chainId, verifyingContract: <vault> }
Obligation(bytes32 caseId,address recipient,uint256 amount,uint64 dueAt)
Void(bytes32 caseId)
caseId = keccak256("proofline:<reportId>:<rewardCalculationId>"). A severity change produces a new obligation id.
Immutable configuration
| Name | Meaning |
|---|---|
token |
Reward token (fee-on-transfer tokens are rejected at funding) |
owner |
The project's wallet or multisig |
attester |
Proofline's signer, fixed for the vault's lifetime |
withdrawalDelay |
Timelock for withdrawals and cap tightening (minimum 3 days) |
Functions
| Function | Who | Notes |
|---|---|---|
fund(amount) |
anyone | Tops up the reserve |
register(caseId, recipient, amount, dueAt, sig) |
anyone | Records an attester-signed obligation |
settle(caseId) |
owner any time; recipient after dueAt |
Pays exactly amount to recipient |
registerAndSettle(...) |
owner, or recipient after dueAt |
Both steps in one transaction |
voidObligation(caseId, sig) |
anyone, with an attester signature | E.g. a mediation reversal before payment |
requestWithdrawal(amount, to) / executeWithdrawal() / cancelWithdrawal() |
owner | Timelocked; can't exceed freeBalance() |
setMaxPerObligation(amount) |
owner | Loosening is immediate; tightening is timelocked |
pauseRegistrations() / resumeRegistrations() |
owner | New registrations only; maximum 7 days, 30-day cooldown |
Views: balance(), totalOutstanding(), freeBalance(), shortfall(), currentCap(), registrationsPaused(), obligation(caseId).
Events
Funded, ObligationRegistered, Settled(caseId, recipient, amount, claimedByRecipient), ObligationVoided, WithdrawalRequested, WithdrawalCancelled, WithdrawalExecuted, CapChanged, RegistrationsPaused, RegistrationsResumed.
Proofline records a payout only after finding a Settled event for the Casefile's caseId, with the attested recipient and amount, in a successful receipt from the linked vault.
Errors
NotOwner, ZeroAddress, ZeroAmount, DelayTooShort, BadSignature, AlreadyRegistered, NotOpen, NotAuthorized, NotDueYet, InsufficientReserve, ExceedsCap, Paused, PauseCoolingDown, NoPendingWithdrawal, WithdrawalLocked, ExceedsFreeBalance, UnsupportedToken.