0

This is not about Solidity. My question is about web3.eth.Contract.send version > 3.

I tried out web3.eth.Contract.call on a single contract and as I expected I can issue multiple calls in the EVM. Now I want to do the same with "send" but for the purpose of saving gas and blocks I want to mine the Contract only once.

Giving a contract that has decoupled methods, does the API support multiple "send" calls (of different methods of) a contract followed by single-mining?

2
  • 1
    Can you explain a couple phrases in your question? What does "version > 3" mean? (The highest available version of web3.js is 1.0 beta.) What does "mine the Contract" mean? Blocks are mined, and blocks contain transactions. Are you talking about the transaction that deploys your contract? Or something else?
    – user19510
    Dec 21, 2018 at 17:00
  • @smarx yes, I meant version 1.0 beta as in the link. Yes, I mean the transaction that deploys the contract. The way it is, I need multiple transactions. That is undesired behavior. Dec 22, 2018 at 17:57

1 Answer 1

1

No, each send will create a new transaction.

A possibility is that you can implement in your contract such functionality. Passing multiple parameters to execute several functions.

2
  • The thing is that I do not supply the contract code. Dec 22, 2018 at 17:59
  • At the web3 level you cannot batch several transaction into a single one. You can modify your contract or create a proxy but in both cases you need to program in solidity.
    – Ismael
    Dec 22, 2018 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.