4. Compliance
Currently, the functionalities implemented and the interfaces defined by ERC-1000 are compliant with ERC-20 and ERC-721 standards, specifically as follows:
4.1 ERC-20 Compliance
No.
Item
Description
Status
1.
name()
Is declared as a public view function
โ
Returns a string, for example โTether USDโ
โ
2.
symbol()
Is declared as a public view function
โ
Returns the symbol by which the token contract should be known, for example โUSDTโ. It is usually 3 or 4 characters in length
โ
3.
Decimals()
Is declared as a public view function
โ
Returns decimals, which refers to how divisible a token can be, from 0 (not at all divisible) to 18 (divisible) and even higher if required
โ
4.
totalSupply()
Is declared as a public view function
โ
Returns the number of total supplied tokens, including the total minted tokens (minus the total burned tokens) ever since the deployment
โ
5.
balanceOf()
Is declared as a public view function
โ
Anyone can query any addressesโ balance as all data on the blockchain is public
โ
6.
allowance()
Is declared as a public view function
โ
Returns the amount which the spender is still allowed to withdraw from the owner
โ
7.
transfer()
Is declared as a public function
โ
Returns a boolean value which accurately reflects the token transfer status
โ
Reverts if the caller does not have enough tokens to spend
โ
Allows zero amount transfers
โ
Emits Transfer() event when tokens are transferred successfully (include 0 amount transfers)
โ
Reverts while transferring to zero address
โ
8.
transferFrom()
Is declared as a public function
โ
Returns a boolean value which accurately reflects the token transfer status
โ
Reverts if the spender does not have enough token allowances to spend
โ
Updates the spenderโs token allowances when tokens are transferred successfully
โ
Reverts if the from address does not have enough tokens to spend
โ
Allows zero amount transfers
โ
Emits Transfer() event when tokens are transferred successfully (including zero amount transfers)
โ
Is declared as a public function
โ
Reverts while transferring from zero address
โ
9..
approve()
Is declared as a public function
โ
Returns a boolean value which accurately reflects the token approval status
โ
Emits Approval() event when tokens are approved successfully
โ
Reverts while approving to zero address
โ
10.
Transfer()event
Is emitted when tokens are transferred, including zero value transfers
โ
Is emitted with the from address set to ๐๐๐๐๐๐ ๐ (0๐ฅ0) when new tokens are generated
โ
11.
Approval()event
Is emitted on any successful call to approve()
โ
5.2 ERC-721 Compliance
No.
Item
Description
Status
1.
balanceOf()
Is declared as a public view function
โ
Anyone can query any addressesโ balance as all data on the blockchain is public
โ
2.
ownerOf()
Is declared as a public view function
โ
Returns the address of the owner of the NFT
โ
3.
getApproved()
Is declared as a public view function
โ
Reverts while โ_tokenIdโ does not exist
โ
Returns the approved address for this NFT
โ
4.
isApprovedForAll()
Is declared as a public view function
โ
Returns a boolean value which check โ_operatorโ is an approved operator
โ
5.
safeTransferFrom()
Is declared as a public function
โ
Reverts while โtoโ refers to a smart contract and not implement IERC721Receiver-onERC721Received
โ
Reverts unless โmsg.senderโ is the current owner, an authorized operator, or the approved address for this NFT
โ
Reverts while โ_tokenIdโ is not a valid NFT
โ
Reverts while โ_fromโ is not the current owner
โ
Reverts while transferring to zero address
โ
Emits Transfer() event when tokens are transferred successfully
โ
6.
transferFrom()
Is declared as a public function
โ
Reverts unless โmsg.senderโ is the current owner, an authorized operator, or the approved address for this NFT
โ
Reverts while โ_tokenIdโ is not a valid NFT
โ
Reverts while โ_fromโ is not the current owner
โ
Reverts while transferring to zero address
โ
Emits Transfer() event when tokens are transferred successfully
โ
7.
approve()
Is declared as a public function
โ
Reverts unless โmsg.senderโ is the current owner, an authorized operator, or the approved address for this NFT
โ
Emits Approval() event when tokens are approved successfully
โ
Reverts while approving to zero address
โ
8.
setApprovalForAll()
Is declared as a public function
โ
Reverts while not approving to caller
โ
Emits ApprovalForAll() event when tokens are approved successfully
โ
9.
Transfer()event
Is emitted when tokens are transferred`
โ
10.
Approval()event
Is emitted on any successful call to approve()
โ
11.
ApprovalForAll()event
Is emitted on any successful call to setApprovalForAll()
โ
Last updated
Was this helpful?