visit
What to expect from this article?
What is the ERC-721 token?
ERC- 721 token is the standard for creating Non-fungible(unique) tokens. It’s some sort of agreed method of creating tokens that are unique or distinct on the Ethereum blockchain. Non-fungible tokens are interchangeable units of value like digital arts, writings, and pictures. Almost anything can be made into an NFT even real-life goods. I do understand we might have curious minds who aren’t into blockchain development here. So, let’s simplify things. The ERC-721 token is an Ethereum blockchain standard for writing non-fungible(distinct) token smart contracts. If you intend to write codes on the Ethereum blockchain, the ERC-721 is the standard code of functions that your contract must implement.
How is the ERC-721 different from the ERC-20 token?
Erc-721 is the opposite of the Erc-20 token. While the Erc-20 token serves as the standard code for implementing fungible tokens(coin), the Erc-721 token is a standard for non-fungible tokens(NFTs) like digital arts, access key, lottery, and tweets and so on.
Content of Erc-721 token
The following are the functions/ method keywords that must be contained in your Erc 721 code and their meaning.
function balanceOf(address _owner) external view returns (uint256);
ownerOf(unit 256 tokenId): This function tells you the address of who owns this particular token by verifying the tokenId because all NFTs are unique.
function ownerOf(uint256 _tokenId) external view returns (address);
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) 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);
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents"
},
"description": {
"type": "string",
"description": "Describes this NFT "
},
"image": {
"type": "string",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents."
}
How to create your own Erc-721 token.
You can simply import an interface from Openzepellin to create yours.I wrote something on the
Also Published