← Code LabSolidity0/50 solved · 0%
Patterns · medium

37. Payment splitter

Distribute ether proportionally.

Constructor takes `address[] memory payees, uint256[] memory shares`. Implement `release(address payable account)` that sends each payee their pro-rata share. Focus on `shares[account]`, `totalShares`, and `released[account]` accounting.
Required in your answer: shares[account]released[account] += paymentaccount.call{value: payment}