Token Checker
Background
The Token Checker contract is designed to make it simple to check for what standard various tokens belong too.
The Token Checker contract is also used by Sediments Token Gate contract
Installation
Using Token Checker
API
Solidity API
IERC165
supportsInterface
TokenChecker
A contract to check if a given contract address implements the ERC-20, ERC-721, or ERC-1155 token standard
isERC20
Check if the given contract address is an ERC-20 token contract
Parameters
Name | Type | Description |
---|---|---|
tokenAddress | address | The address of the token contract to check |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the contract is an ERC-20 token, false otherwise |
isERC721
Check if the given contract address is an ERC-721 token contract
Parameters
Name | Type | Description |
---|---|---|
tokenAddress | address | The address of the token contract to check |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the contract is an ERC-721 token, false otherwise |
isERC1155
Check if the given contract address is an ERC-1155 token contract
Parameters
Name | Type | Description |
---|---|---|
tokenAddress | address | The address of the token contract to check |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the contract is an ERC-1155 token, false otherwise |