Two treasury variants, one SDK methodThe
paymentTreasury() method works with both on-chain implementations:Both contracts share the same ABI and the same SDK interface. Time enforcement is handled entirely on-chain — simply pass the deployed contract address regardless of which variant was deployed.
Methods
Reads
Writes
All write methods returnPromise<Hex> (transaction hash).
Types
LineItem
ExternalFees
PaymentData
Returned bygetPaymentData():
Usage examples
Create and confirm a payment
Query payment data
Process a crypto payment
Batch operations
Withdraw and disburse
When using a
TimeConstrainedPaymentTreasury, calls made outside the allowed time window will revert on-chain. For example, createPayment() will revert if called before launch or after the deadline + buffer period.Related
- CampaignInfo — the campaign this treasury belongs to
- GlobalParams — line item types and fee configuration
- TreasuryFactory — deploying treasury contracts