Redemption delegate
Before implementing, learn about delegates here. Also see juice-delegate-template
.
Specs
A contract can become a treasury redemption delegate by adhering to IJBRedemptionDelegate3_1_1
:
interface IJBRedemptionDelegate3_1_1 is IERC165 {
function didRedeem(JBDidRedeemData3_1_1 calldata data) external payable;
}
When extending the redemption functionality with a delegate, the protocol will pass a JBDidRedeemData3_1_1
to the didRedeem(...)
function:
struct JBDidRedeemData3_1_1 {
address holder;
uint256 projectId;
uint256 currentFundingCycleConfiguration;
uint256 projectTokenCount;
JBTokenAmount reclaimedAmount;
JBTokenAmount forwardedAmount;
address payable beneficiary;
string memo;
bytes dataSourceMetadata;
bytes redeemerMetadata;
}
struct JBTokenAmount {
address token;
uint256 value;
uint256 decimals;
uint256 currency;
}