JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.contracts.getMetadata({
address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
});
console.log(result);
}
run();curl --request GET \
--url https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address} \
--header 'x-glacier-api-key: <api-key>'import requests
url = "https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}"
headers = {"x-glacier-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-glacier-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-glacier-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}")
.header("x-glacier-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-glacier-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"ercType": "ERC-721",
"name": "<string>",
"description": "<string>",
"officialSite": "<string>",
"email": "<string>",
"logoAsset": {
"assetId": "<string>",
"imageUri": "<string>"
},
"bannerAsset": {
"assetId": "<string>",
"imageUri": "<string>"
},
"color": "<string>",
"resourceLinks": [
{
"url": "<string>"
}
],
"tags": [
"<string>"
],
"deploymentDetails": {
"txHash": "<string>",
"deployerAddress": "<string>",
"deployerContractAddress": "<string>"
},
"symbol": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}Contracts
Get contract metadata
Gets metadata about the contract at the given address.
GET
/
v1
/
chains
/
{chainId}
/
addresses
/
{address}
JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.contracts.getMetadata({
address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
});
console.log(result);
}
run();curl --request GET \
--url https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address} \
--header 'x-glacier-api-key: <api-key>'import requests
url = "https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}"
headers = {"x-glacier-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-glacier-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-glacier-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}")
.header("x-glacier-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://glacier-api.avax.network/v1/chains/{chainId}/addresses/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-glacier-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "<string>",
"ercType": "ERC-721",
"name": "<string>",
"description": "<string>",
"officialSite": "<string>",
"email": "<string>",
"logoAsset": {
"assetId": "<string>",
"imageUri": "<string>"
},
"bannerAsset": {
"assetId": "<string>",
"imageUri": "<string>"
},
"color": "<string>",
"resourceLinks": [
{
"url": "<string>"
}
],
"tags": [
"<string>"
],
"deploymentDetails": {
"txHash": "<string>",
"deployerAddress": "<string>",
"deployerContractAddress": "<string>"
},
"symbol": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"error": "<string>"
}Authorizations
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Path Parameters
A supported evm chain id or blockchain id. Use the /chains endpoint to get a list of supported chain ids.
Contract address on the relevant chain.
Response
Successful response
- Option 1
- Option 2
- Option 3
- Option 4
A wallet or contract address in mixed-case checksum encoding.
Example:
"0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
Available options:
ERC-721 The contract name.
Example:
"Wrapped AVAX"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The contract symbol.
Example:
"WAVAX"
Was this page helpful?
⌘I