Demo
Deploy the Payout Contract
Payout.sol
TypeScript backend
The transaction emits one
PayoutSent event per recipient under the same batchId, and the sum of token transfers matches your approved batch total.Multicall3 contract as an ERC-20 spender. Downstream token calls see Multicall3 as msg.sender, and any caller can ask that general-purpose contract to invoke transferFrom against an allowance you grant it. Use a purpose-built contract that fixes who can initiate payouts and how recipients are selected.
See Also
Split a Payment
Calculate basis-point shares and assign rounding exactly.
Reconcile Payments
Join payout events to your ledger reference.