Get the NFT Contract Address
Returns a list of 20 byte Ethereum addresses of the NFT Listings contract registered in the AvN
await api.query.getNftContractAddress();
important
You can get the AVN_GATEWAY_URL here.
- Example
- Example Result
- JSON-RPC
- JSON-RPC Output
const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<node_url>";
const API = new AVN_API(AVN_GATEWAY_URL);
async function main() {
await api.init();
let contractAddress = await api.query.getNftContractAddress();
console.log(contractAddress);
}
(async () => {
await main();
})();
["0xb8608e90ae5bfbdf6156558a5231e0b291a74330", "0xb7608e90ae5bfbdf6156558a5231e0b291a74331"]
REQUEST
POST https://AVN_GATEWAY_URL/query
HEADERS
Content-Type: application/json Authorization: bearer <awtToken>
JSON-RPC Example
curl https://AVN_GATEWAY_URL/query \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: bearer <awtToken>" \
-d '{"jsonrpc":"2.0", "method":"getNftContractAddress", "params":{}, "id":1}'
note
result - string value of NFT contract ethereum address.
{
"jsonrpc": "2.0",
"id": 1,
"result": ["0xb8608e90ae5bfbdf6156558a5231e0b291a74330", "0xb7608e90ae5bfbdf6156558a5231e0b291a74331"]
}