getTokenMetadata
The getTokenMetadata method is a powerful tool for retrieving metadata associated with a specific ERC20 token contract address.
How to use getTokenMetadata method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getTokenApprovals Builder API method effectively using Blast.
Parameters
Below, you can find the query parameters accepted by the method.
Parameter | Type | Description |
---|---|---|
contractAddress* | string | REQUIRED - The token contract address |
Returns
Discover an insightful explanation of the returned parameters here, offering a deep understanding of their significance and implications.
Parameter | Type | Description |
---|---|---|
contractAddress | string | The token contract address |
contractDecimals | string | Token decimals specified in the contract |
contractName | string | The name of the token |
contractSymbols | string | The symbol of the token |
Example Request and Result for getTokenMetadata
In this section, we provide an illustrative example of a request made to retrieve metadata for a specific ERC20 token contract address using the getTokenMetadata
method. We also present the resulting metadata in the response, including details such as the token's name, symbol, decimals, and contract address. This example serves as a practical guide for developers looking to access and utilize ERC20 token metadata within their applications or projects.
The example in this section uses a non-existing project id.
Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
Request
curl -X GET https://starknet-mainnet.blastapi.io/<project_id>/builder/getTokenMetadata?contractAddress=0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 \
-H 'Content-Type: application/json' \