Closed AmeanAsad closed 1 year ago
This would mean having to merge the splitter and factory contracts in an awkward way as msg.sender
when calling the splitter from the factory contract is ... the factory contract. Unless we remove the interfaces to claim from the factory and make claiming directly from each individual PaymentSplitter the only way to claim funds (this also saves on Gas for users but is worse UX).
tldr: would involve shifting more work into the JS interface and the user having to sign off on more transactions (maybe not so bad if they consistently claim every month tbh).
Can we not add a conditional on release
to work either with msg.sender
or the factory contract address? The factory contract address will always be constant and we'll know it before initializing the PaymentSplitter.
Either way, we can test having to do a release just from the payment splitter.
@patrickwoodhead also made the astute point that folks may have their rewards being sent to exchange wallets. In which case the claiming wallet in metamask will likely be different to the exchange address. As such we want to enable flexibility whereby a given claimant on the frontend can push funds to another address.
Description:
PaymentSplitter
using a beta group, we want to only allow wallet owners to release their own funds.release
function to only release funds by checking againstmsg.sender
.