What everyone needs to know
- A data source contract is a way of providing extensions to a treasury that either override or augment the default
- A data source contract can be used to provide custom data to the
JBPayoutRedemptionPaymentTerminal.pay(...) transaction and/or the
- A data source is passed contextual information from the transactions, from which it can derive custom data for the protocol to use to affect subsequent behaviors in the pay and redeem transactions. Contextual information from the pay transaction is passed to the data source in the form of
JBPayParamsData , and contextual information from the redeem transaction is passed to the data source in the form of
- Data sources can revert under custom circumstances, which can be used to create a gated treasury, max token supply, min contribution amount, etc.
- A data source is responsible for specifying any delegate hooks that should be triggered after the core functionality of a
redeemTokensOf(...) transaction executes successfully.
IJBPaymentTerminal fork can leverage data sources in unique ways.
What you'll want to know if you're building
Get started building data sources.