vechain / vechain-sdk-js

The official JavaScript SDK for VeChain.
24 stars 9 forks source link

💡 [REQUEST] - Support transaction options with `executeMultipleClausesTransaction` #1143

Closed ifavo closed 1 month ago

ifavo commented 2 months ago

Summary

Issueing transactions using executeTransaction or executeMultipleClausesTransaction does not accept options to define a custom gas calculation.

Transactions of mine run frequently into out of gas due the inability.

https://github.com/vechain/vechain-sdk-js/blob/1.0.0-beta.26/packages/network/src/thor-client/contracts/contracts-module.ts#L191-L194

I suggest to add the options to executeMultipleClausesTransaction and executeTransaction.

Basic Example

await thor.contracts.executeTransaction(signer, address, fragment, parameters, { gas })
await thor.contracts.executeMultipleClausesTransaction([], signer, { gas }
victhorbi commented 1 month ago

Hello @ifavo, this make us think we have a bug in how we estimate gas. It's anyway useful, we will split in two tasks

  1. Making it possible to specify the gas manually
  2. Investigate the issue with the estimation

Thanks for raising this, and sorry for the late reply.