Skip to main content
Version: 0.5

Get the Contract Address of the AVT Token

To get the contract address of the AVT token on the Ethereum blockchain. Returns the 20 byte Ethereum address of the AVT token contract.

await api.send.avtContractAddress;

Example

const AvnApi = require("avn-api");
const GATEWAY = "<node_url>"; //Replace the node_url with the url received from Aventus.
const api = new AvnApi(GATEWAY);

async function main() {
await api.init();

const contractAddress = await api.send.avtContractAddress;
console.log(
"The smart contract address of the AVT token on the Ethereum blockchain is: ",
contractAddress
);
}

(async () => {
await main();
})();

Example Output

0x405df1b38510c455ef81500a3dc7e9ae599e18f6

JSON-RPC

REQUEST POST https://AVN-API-URL/query

HEADERS Content-Type: application/json Authorization': bearer <awtToken>

EXAMPLE

## JSON-RPC over HTTPS POST
curl https://AVN-API-URL/query \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: bearer <awtToken>" \
-d '{"jsonrpc":"2.0", "method":"getAvtContractAddress", "params":{}, "id":1}'

RESULT FIELDS VALUE - string value of AVT contract ethereum address

BODY

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x405df1b38510c455ef81500a3dc7e9ae599e18f6"
}