Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
f28a1354
Commit
f28a1354
authored
Sep 07, 2018
by
Francisco Giordano
Committed by
Nicolás Venturo
Sep 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary internal constant (#1297)
parent
f12817e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
ERC721Holder.sol
contracts/token/ERC721/ERC721Holder.sol
+1
-1
IERC721Receiver.sol
contracts/token/ERC721/IERC721Receiver.sol
+5
-11
No files found.
contracts/token/ERC721/ERC721Holder.sol
View file @
f28a1354
...
@@ -13,6 +13,6 @@ contract ERC721Holder is IERC721Receiver {
...
@@ -13,6 +13,6 @@ contract ERC721Holder is IERC721Receiver {
public
public
returns(bytes4)
returns(bytes4)
{
{
return
ERC721_RECEIVED
;
return
this.onERC721Received.selector
;
}
}
}
}
contracts/token/ERC721/IERC721Receiver.sol
View file @
f28a1354
...
@@ -8,19 +8,13 @@ pragma solidity ^0.4.24;
...
@@ -8,19 +8,13 @@ pragma solidity ^0.4.24;
*/
*/
contract IERC721Receiver {
contract IERC721Receiver {
/**
/**
* @dev Magic value to be returned upon successful reception of an NFT
* Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`,
* which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
*/
bytes4 internal constant ERC721_RECEIVED = 0x150b7a02;
/**
* @notice Handle the receipt of an NFT
* @notice Handle the receipt of an NFT
* @dev The ERC721 smart contract calls this function on the recipient
* @dev The ERC721 smart contract calls this function on the recipient
* after a `safetransfer`. This function MAY throw to revert and reject the
* after a `safeTransfer`. This function MUST return the function selector,
* transfer. Return of other than the magic value MUST result in the
* otherwise the caller will revert the transaction. The selector to be
* transaction being reverted.
* returned can be obtained as `this.onERC721Received.selector`. This
* Note: the contract address is always the message sender.
* function MAY throw to revert and reject the transfer.
* Note: the ERC721 contract address is always the message sender.
* @param _operator The address which called `safeTransferFrom` function
* @param _operator The address which called `safeTransferFrom` function
* @param _from The address which previously owned the token
* @param _from The address which previously owned the token
* @param _tokenId The NFT identifier which is being transferred
* @param _tokenId The NFT identifier which is being transferred
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment