Update ERC721 to latest 1.11.0 from OpenZeppelin-solidity (#11)
* Update ERC721 to latest 1.11.0 from OpenZeppelin-solidity * Hardcode supported interfaces instead of using lookup table. This avoids shifting storage when extending supports interface. * Update build artifacts * Fix linter errors
This commit is contained in:
committed by
GitHub
parent
8f4610e007
commit
c46f0353d1
@ -7,15 +7,22 @@ contract ERC721ReceiverMock is ERC721Receiver {
|
||||
bytes4 retval;
|
||||
bool reverts;
|
||||
|
||||
event Received(address _address, uint256 _tokenId, bytes _data, uint256 _gas);
|
||||
event Received(
|
||||
address _operator,
|
||||
address _from,
|
||||
uint256 _tokenId,
|
||||
bytes _data,
|
||||
uint256 _gas
|
||||
);
|
||||
|
||||
function ERC721ReceiverMock(bytes4 _retval, bool _reverts) public {
|
||||
constructor(bytes4 _retval, bool _reverts) public {
|
||||
retval = _retval;
|
||||
reverts = _reverts;
|
||||
}
|
||||
|
||||
function onERC721Received(
|
||||
address _address,
|
||||
address _operator,
|
||||
address _from,
|
||||
uint256 _tokenId,
|
||||
bytes _data
|
||||
)
|
||||
@ -24,7 +31,8 @@ contract ERC721ReceiverMock is ERC721Receiver {
|
||||
{
|
||||
require(!reverts);
|
||||
emit Received(
|
||||
_address,
|
||||
_operator,
|
||||
_from,
|
||||
_tokenId,
|
||||
_data,
|
||||
gasleft() // msg.gas was deprecated in solidityv0.4.21
|
||||
|
||||
@ -9,7 +9,7 @@ import "../token/ERC721/ERC721Token.sol";
|
||||
* and a public setter for metadata URI
|
||||
*/
|
||||
contract ERC721TokenMock is ERC721Token {
|
||||
function ERC721TokenMock(string name, string symbol) public {
|
||||
constructor(string name, string symbol) public {
|
||||
ERC721Token.initialize(name, symbol);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user