vechain / hardhat-plugins

3 stars 2 forks source link

Hardhat: Support for Clauses #24

Closed nwbrettski closed 1 year ago

nwbrettski commented 1 year ago

Currently, using hardhat a transaction looks like this (where token is the deployed contract)

const transferTx = await token
       .connect(signer)
       .transfer(toAddress, amount)

Can we support a structure like the below to enable a developer to easily create a transaction with clauses

const tx = await token.clauseBuilder()
     .withClause(token.transfer, toAddress, amount)
     .withClause(token.transfer, toAddress, amount)
     .withClause(token.transfer, toAddress, amount)
     .send()
vanja-vechain commented 1 year ago

Released