Add missing requirements to ERC777 #2212
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2208 for the v2.5.0 branch.
#2027 made
_send
,_approve
,_callTokensToSend
and_callTokensReceived
internal
. We failed to identify that some of these functions contained arguments that were not validated: when they wereprivate
, this validation was performed at their callsite. This code was included in the v2.5.0 release.Then, #2134 got merged, which made the hook methods
private
again, and removed theoperator
argument from_send
(the one that was unchecked). This code was published in v3.0.0.This PR addresses the issues on the v2.5.0 release (and targets that branch). Once merged, v2.5.1 will be released and the branch merged back into
master
, only keeping the fix for_approve
(the only unprotected function in v3.0.0). That will then become v3.0.1.Because of this, I only added tests for the
require
statement in_approve
: the other one will only exist in the v2.5.1 branch.