Fee Delegation
Enable Fee Delegation
const tx = await thor.transactions.buildTransactionBody(clauses, gas.totalGas,
{ isDelegated: true }
);Sign with Fee Delegation
const walletWithUrlSponsor = new ProviderInternalBaseWallet(
[{privateKey, address: senderAddress}],
{
gasPayer: {
gasPayerServiceUrl: 'https://sponsor-testnet.vechain.energy/by/90',
},
}
);
const walletWithAccountSponsor = new ProviderInternalBaseWallet(
[{privateKey, address: senderAddress}],
{
gasPayer: {
gasPayerPrivateKey: gasPayerAccount.privateKey,
},
}
);Example Project
Sign as Gas-Payer Service
Example Project
Last updated
Was this helpful?