vechain-sdk-js
vechain-sdk-js copied to clipboard
Feat: support raw clauses and transaction options in the execution of multiple clauses transaction
Expand the multiple clauses transaction execution to support:
- transaction options
- raw clauses
Es:
/* setup env */
const thor = ThorClient.fromUrl('https://testnet.vechain.org');
const randomSigner = new VeChainPrivateKeySigner(secp256k1.generatePrivateKey(), thor);
/* prepare */
const clauses = [
clauseBuilder.functionInteraction(
'0x8384738c995d49c5b692560ae688fc8b51af1059',
'increment()'
),
];
const options = { /* toggle fee delegation, tx comment, dependency, etc. */ }
/* execute */
const tx = await thor.contracts.executeMultipleClausesTransaction(clauses, randomSigner, /* pass options here? */ );
/* wait & track */
await tx.wait()