Skip to main content

Split Hook

A split hook adds functionality to when a project's payouts or reserved tokens are distributed. To build a split hook, you'll want to implement the IJBSplitHook interface.

interface IJBSplitHook is IERC165 {
function processSplitWith(JBSplitHookContext calldata context) external payable;
}

Once you've deployed your contract, you can use its address in the hook field of a JBSplit when specifying either payout splits or reserved token splits – the projectId and beneficiary fields of the JBSplit wont have any effect and can be used as metadata if you wish. The split hook's IJBSplitHook.processSplitWith(...) function will be called with the split's JBSplitHookContext automatically when the split is triggered from payouts or from reserved token distributions.

Learn more about split hooks.