Make ERC777 operator the caller (#2134)

* Make the sender the operator

* Make hook methods private

* Add changelog entry
This commit is contained in:
Nicolás Venturo
2020-03-16 19:49:17 -03:00
committed by GitHub
parent 90058040f0
commit e7b22483af
5 changed files with 23 additions and 19 deletions

View File

@ -11,16 +11,15 @@ contract ERC777Mock is Context, ERC777 {
string memory symbol,
address[] memory defaultOperators
) public ERC777(name, symbol, defaultOperators) {
_mint(_msgSender(), initialHolder, initialBalance, "", "");
_mint(initialHolder, initialBalance, "", "");
}
function mintInternal (
address operator,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData
) public {
_mint(operator, to, amount, userData, operatorData);
_mint(to, amount, userData, operatorData);
}
}