aakash4dev
aakash4dev

Reputation: 1176

ERC721: This contract may be abstract not implement an abstract parents methods completely or not invoke an inherited contract's constructor correctly

I got the codes below from this link: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md but its not working ?

pragma solidity ^0.4.20;
interface ERC721 /* is ERC165 */ {
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
    function balanceOf(address _owner) external view returns (uint256);
    function ownerOf(uint256 _tokenId) external view returns (address);
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function approve(address _approved, uint256 _tokenId) external payable;
    function setApprovalForAll(address _operator, bool _approved) external;
    function getApproved(uint256 _tokenId) external view returns (address);
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

interface ERC165 {
    function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

enter image description here

Upvotes: 0

Views: 253

Answers (1)

kaiyee0
kaiyee0

Reputation: 41

Since you're trying to deploy an interface of ERC721. If you would like to deploy an ERC721 contract, then you should have the contract code as below:

contract MyERC721 is ERC721 {
   // your constructor and code here
   ...
}

and your MyERC721 contract will succeed the ERC721 interface function.

Upvotes: 2

Related Questions