-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Add getter for number of unclaimed tokens in PaymentSplitter #3350
Conversation
Hello @alonbg and thank you for your PR. This is something that I wanted to include for quite a while. I really think it has its place in this contract. I was personally considering the "claimable" name, but "unclaimed" is also nice. We'll need a changelog entry and some tests, but it should be simple enough to get into the next release. |
Sure @Amxx cheers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests and update the changelog.
When we audited PaymentSplitter, we found this lacking as well. Here are the other lacking features we would love to see in this contract:
My apologies for dumping them here. Keep up the great work! |
|
This is interesting. I would personally reverse the argument. If a smart contract is a recipient, and if it is not "payment splitter aware" then it might not have the ability to release or to give permission to release. This will result in locked funds. Now you could easily override the |
The trick is to default to "grant allowance to all", this would be most compatible with the current implementation (all though obviously still breaking some compatibility).
Right, my team was looking at code that extended PaymentSplitter. We weren't looking at this contract as if it should be deployed "as-is" 👍 But as it's private and not internal it's furthermore a non-issue, like you indicate. |
Such an extension of the payment splitter was already discussed in another issue. A prototype is available here |
@alonbg could you please rename the new function from We will also need some tests and a Changelog entry in order to merge the PR. |
move payment to unclaimed functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @alonbg! We do require tests. I've added some.
Thank you @alonbg |
payment
assignment is done throughunclaimed()
functionsFixes #????
PR Checklist