Skip to main content
Version: 0.3

Relayer Fees

await api.query.getRelayerFees(avnRelayerAddress);

The will return an object detailing the default fees a particular relayer charges, in AVT, for a set of executable transactions.

Example

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

const avnRelayerAddress = "5DA...gxV"; //replace with the relayer address received from Aventus

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

const fees = await api.query.getRelayerFees(avnRelayerAddress);
console.log(fees);
}

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

Expected Output

Below is an example of a returned object showing the transaction types supported by the relayer and what it charges for each transaction type.

{
proxyAvtTransfer: '7000000000000000',
proxyTokenTransfer: '7000000000000000',
proxyMintSingleNft: '7000000000000000',
proxyListNftOpenForSale: '7000000000000000',
proxyTransferFiatNft: '1000000000000000',
proxyCancelListFiatNft: '1000000000000000'
}