-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PaymentSplitter + ERC20 #2701
Comments
Hello @cybertelx, and thank you for this issue. This is something we have on our roadmap, and for which I have some "work-in-progress" code: Keep in mind that this code has not gone through our testing and review process. I'll share you interest, and we will possibly put that on the feature-set for an uncomming version. |
@Amxx can you explain the usage for these work in progress code? Which contract needs to be deployed to become the recipient for WETH? unfortunately opensea forces the acceptance of weth which breaks paymentsplitter. |
THE PR linked above is pretty much WIP, I wouldn't recommend anyone using it right now. I'm sorry but we don't have an ERC20 payment splitter that I can just point you right now. I can however confirm that this is on our roadmap, and will hopefully be addressed soon! |
yes the problem is that if weth tokens are sent by opensea they will be lost. there is no way to rescue them from the current payment splitter. |
if the payment splitter is not upgradeable, then NO, there are no way to retrieve it. Not that is has always been clear in the PaymentSplitter that it is for base ETH ONLY. Please do not use it in a context where ERC20 might be sent to it. |
yes however, i think if i can add this code to the end of paymentspliitter then it should be able to rescue the erc20 tokens.
|
I understand that the pull request for this feature has not audited, but I want to be able to use this contract in a project that I'm working on now. What would be the safest way to do this? I'm using it to split royalty payments, so I'm currently thinking that I could deploy it separately and store a reference tot its address in my main contract. Then, if vulnerabilities are found, I could update the address in my main contract to the new version. Is this safe/advisable? |
@splintred The mechanism that you describe sounds like a reasonable mitigation. I can't say whether this is safe as there are many other factors involved. If you want you can share more details over at our forum for further discussion. |
🧐 Motivation
PaymentSplitter (with Ether) already exists, so why not ERC20PaymentSplitter? Plus, the finance area probably needs more contracts.
📝 Details
PaymentSplitter (in contracts/finance), but with ERC20 support. Payees can withdraw any ERC20 token sent to the contract corresponding to their share in it, as long as they provide the address to the token, which should be checked with EIP 165.
The text was updated successfully, but these errors were encountered: