aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/tokens/ERC721Token
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src/2.0.0/tokens/ERC721Token')
-rw-r--r--packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol6
-rw-r--r--packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Receiver.sol4
-rw-r--r--packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Token.sol20
3 files changed, 21 insertions, 9 deletions
diff --git a/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol b/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol
index defb506a8..60603aa19 100644
--- a/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol
+++ b/packages/contracts/src/2.0.0/tokens/ERC721Token/ERC721Token.sol
@@ -23,7 +23,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-pragma solidity ^0.4.24;
+pragma solidity 0.4.24;
import "./IERC721Token.sol";
import "./IERC721Receiver.sol";
@@ -41,7 +41,7 @@ contract ERC721Token is
{
// Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
- bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;
+ bytes4 constant internal ERC721_RECEIVED = 0xf0b9e5ba;
// Mapping from token ID to owner
mapping (uint256 => address) internal tokenOwner;
@@ -73,7 +73,7 @@ contract ERC721Token is
_;
}
- function ERC721Token(
+ constructor (
string _name,
string _symbol)
public
diff --git a/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Receiver.sol b/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Receiver.sol
index f72c75638..f2e8f3c88 100644
--- a/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Receiver.sol
+++ b/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Receiver.sol
@@ -23,7 +23,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-pragma solidity ^0.4.24;
+pragma solidity 0.4.24;
/**
@@ -38,7 +38,7 @@ contract IERC721Receiver {
* Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`,
* which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
*/
- bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba;
+ bytes4 constant internal ERC721_RECEIVED = 0xf0b9e5ba;
/**
* @notice Handle the receipt of an NFT
diff --git a/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Token.sol b/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Token.sol
index 0d64ee861..4d57ece38 100644
--- a/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Token.sol
+++ b/packages/contracts/src/2.0.0/tokens/ERC721Token/IERC721Token.sol
@@ -23,7 +23,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-pragma solidity ^0.4.24;
+pragma solidity 0.4.24;
/**
@@ -40,11 +40,13 @@ contract IERC721Token {
address indexed _to,
uint256 _tokenId
);
+
event Approval(
address indexed _owner,
address indexed _approved,
uint256 _tokenId
);
+
event ApprovalForAll(
address indexed _owner,
address indexed _operator,
@@ -55,6 +57,7 @@ contract IERC721Token {
public
view
returns (string);
+
function symbol()
public
view
@@ -64,10 +67,12 @@ contract IERC721Token {
public
view
returns (uint256 _balance);
+
function ownerOf(uint256 _tokenId)
public
view
returns (address _owner);
+
function exists(uint256 _tokenId)
public
view
@@ -75,6 +80,7 @@ contract IERC721Token {
function approve(address _to, uint256 _tokenId)
public;
+
function getApproved(uint256 _tokenId)
public
view
@@ -82,6 +88,7 @@ contract IERC721Token {
function setApprovalForAll(address _operator, bool _approved)
public;
+
function isApprovedForAll(address _owner, address _operator)
public
view
@@ -90,17 +97,22 @@ contract IERC721Token {
function transferFrom(
address _from,
address _to,
- uint256 _tokenId)
+ uint256 _tokenId
+ )
public;
+
function safeTransferFrom(
address _from,
address _to,
- uint256 _tokenId)
+ uint256 _tokenId
+ )
public;
+
function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
- bytes _data)
+ bytes _data
+ )
public;
}