split-collaborator-royalties
Use when an NFT drop has multiple creators and proceeds or royalties must be divided. Verifies shares sum correctly, the receiver is solvent, and rounding dust stays claimable.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- split-collaborator-royalties
- description
- Use when an NFT drop has multiple creators and proceeds or royalties must be divided. Verifies shares sum correctly, the receiver is solvent, and rounding dust stays claimable.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md354 B
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
Split collaborator royalties
When a drop has multiple creators the split must be enforced by a contract that pays each wallet on withdrawal, not by a promise in the announcement.
Procedure
-
Use a
PaymentSplitter(OpenZeppelin) or equivalent with shares fixed at deploy:cast call $SPLITTER "totalShares()(uint256)" --rpc-url $RPC cast call $SPLITTER "payee(uint256)(address)" 0 --rpc-url $RPC -
Verify the shares sum exactly to
totalShares. A mixed denominator (shares of 100 against a total of 10000) silently overrides a collaborator's cut. -
Confirm the splitter is both the mint-proceeds receiver and the
royaltyInforeceiver:cast call $NFT "royaltyInfo(uint256,uint256)(address,uint256)" 1 1000000000000000000 --rpc-url $RPC -
Check rounding. With shares 1/2/3 of 6 and a 1 wei balance the smallest share rounds to 0 and stays stuck; release the whole balance, not per-wei.
-
Verify
release(payee)succeeds for every payee:cast send $SPLITTER "release(address)" $PAYEE --rpc-url $RPC --private-key $KEY -
For any push-based split, confirm a failed send to one payee does not block the others; prefer pull (
release). -
Test with a fork:
forge test --match-test testSplitRounding --fork-url $RPC -vvv
Pitfalls
- Shares set against a denominator other than the sum let one collaborator drain more than their cut.
- A payee address that is a contract reverting on receive bricks a push payout for everyone.
- A splitter that only handles ETH while the sale pays WETH leaves royalties unreachable.
- Changing shares after the first withdrawal creates an inconsistency; splits should be immutable.
- Payments smaller than the 21000-gas send cost are uneconomical to release, so dust accumulates and must be claimable in bulk.
Verification
forge test --match-test testSplitRounding --fork-url $RPC -vvv
Pass: the sum of payee balances plus residual dust equals the deposit across random balances, and each share's bps matches the agreement. Report the shares, the splitter address, and the rounding result.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.