A hard cumulative spend limit in the raw units of one token. Every spending primitive here consults a SpendCap; once the cap is hit, further spends throw SpendCapExceededError rather than silently proceeding.
SpendCap
Readonly
Remaining headroom.
Amount spent so far.
true if amount still fits under the cap.
true
amount
Reserve amount, or throw if it would breach the cap.
A hard cumulative spend limit in the raw units of one token. Every spending primitive here consults a
SpendCap; once the cap is hit, further spends throw SpendCapExceededError rather than silently proceeding.