Specifications
A contract can become a treasury redemption delegate by adhering to ISnowconeRedemptionDelegate3_1_1:
When extending the redemption functionality with a delegate, the protocol will pass a SnowconeDidRedeemData3_1_1 to the didRedeem(...)
function:
The msg.sender
to the delegate will be the payment terminal that facilitated the redemption.
In payment terminals based on the SnowconePayoutRedemptionPaymentTerminal3_1_1, such as SnowconeETHPaymentTerminal3_1_1's and SnowconeERC20PaymentTerminal3_1_1's, the redemption delegate hook gets called before the reclaimed amount is sent to the redemption beneficiary, but after all internal accounting has been updated. View the docs.
Ensure to only allow trusted contracts to access the didRedeem(...)
transaction.
Attaching
New delegate contracts should be deployed independently. Once deployed, its address can be returned from a data source hook.