Delegate

What everyone should know

  • A delegate contract is a mechanism for extending the default SNOWPayoutRedemptionPaymentTerminal functionality for a treasury.

  • Pay delegates contain a custom didPay(...) hook that executes after all of the default protocol pay logic in the terminal contract has been properly performed. A variety of contextual information is supplied to the hook through the SNOWDidPayData data structure.

  • Redemption delegates provide a custom didRedeem(...) hook that executes after the default protocol redeem logic in the terminal contract has been successfully completed. A variety of contextual information is supplied to the hook through the SNOWDidRedeemData data structure. Redemption delegates provide a custom didRedeem(...) hook that executes after the default protocol redeem logic in the terminal contract has been successfully completed. A variety of contextual information is supplied to the hook through the SNOWDidRedeemData data structure.

  • Each ISNOWPaymentTerminal branch might use delegates in a unique manner.

What you should know if you're constructing

  • ISNOWPayDelegates and ISNOWRedemptionDelegates are both sorts of delegates. Any contract adhering to these interfaces may be used as a delegate in the financing cycles of a project.

  • The dataSource of the financing cycle should specify which delegated contracts to utilize.

  • didPay(...) is invoked in SNOWPayoutRedemptionPaymentTerminal. pay(...), and didRedeem(...) is invoked in SNOWPayoutRedemptionPaymentTerminal.redeemTokensOf(..). (...).

  • The redemption delegate hook is called prior to the distribution of monies.

Last updated

SnowconeDAO