跳到主要内容

Cash Out Hook

A cash out hook adds functionality to when a project's token holder cashes out. To build a cash out hook, you'll want to implement the IJBCashOutHook interface.

interface IJBCashOutHook is IERC165 {
function afterCashOutRecordedWith(JBAfterCashOutRecordedContext calldata context) external payable;
}

Once you've deployed your contract, you can return its address from ruleset data hook. The cash out hook's IJBCashOutHook.afterCashOutRecordedWith(...) function will be called with the cash out's JBAfterCashOutRecordedContext automatically after the project's token holder cashes out.

Learn more about cash out hooks.