November 2018
Intermediate to advanced
528 pages
13h 21m
English
To change the state of the contract instance, instead of making a call, you need to send a transaction that costs you real money (gas) to validate your action.
For instance, to invoke the bid() method, you have to send a transaction to the blockchain network with the necessary arguments and fees. Just like with the call, to invoke the foo() method, you need to explicitly make the invocation using sendTransaction() as follows:
myContractInstance.foo.sendTransaction(param1 [, param2, ...] [, transactionObject] [, callback]);
Why not let Web3 decide for you!
Web3.js is smart enough to automatically determine the use of call or sendTransaction based on the method type indicated in the ABI, therefore ...
Read now
Unlock full access