Skip to content

Commit

Permalink
Inline keccak256 result (#1741)
Browse files Browse the repository at this point in the history
* inline keccak256 result

* Update ERC777.sol

* switch hex constant style

* Update ERC777.sol
  • Loading branch information
frangio authored and nventuro committed May 8, 2019
1 parent aa4c9fe commit e60c790
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions contracts/drafts/ERC777/ERC777.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,15 @@ contract ERC777 is IERC777, IERC20 {
string private _name;
string private _symbol;

bytes32 constant private TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender");
bytes32 constant private TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient");
// We inline the result of the following hashes because Solidity doesn't resolve them at compile time.
// See https://github.com/ethereum/solidity/issues/4024.
//
// keccak256("ERC777TokensSender")
bytes32 constant private TOKENS_SENDER_INTERFACE_HASH =
0x29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe895;
// keccak256("ERC777TokensRecipient")
bytes32 constant private TOKENS_RECIPIENT_INTERFACE_HASH =
0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b;

// This isn't ever read from - it's only used to respond to the defaultOperators query.
address[] private _defaultOperatorsArray;
Expand Down

0 comments on commit e60c790

Please sign in to comment.