Making PaymentSplitter editable

PaymentSplitter is a utility class that is used heavily in the NFT space for easily splitting royalties between project collaborators.

However, based on the current design, it is meant to be instantiated with certain defined splits, and immutable. The payment splits cannot be changed at a later date.

While it is possible to just create a new instance of the payment splitter to make changes, it doe not provide a great user experience for my current use case, where splits can be changed, and the splitter contract may currently have a balance of both ETH and ERC-20 tokens.

I was wondering if anyone here has ever built an implementation that allows the splits to be changed (presumably by the owner) or has an idea of how I can create my own implementation.

It's challenging to make a splitter that can both accept an arbitrary number of tokens and have dynamic splits. This is why we haven't implemented it. But we also haven't thought about it as much so I'd encourage you to think about it, just keep in mind that we don't think it's very easy to implement.

I haven't looked into this project myself but you can take a look at it, it might have what you need: