Last active
August 30, 2018 08:04
-
-
Save PaulLaux/341abd39d4628ddca3fd13e906ffa673 to your computer and use it in GitHub Desktop.
Calling Ethereum contract methods via Web3.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Automatically determines the use of call or sendTransaction based on the method type | |
myContractInstance.myMethod(param1 [, ...][, callback]); | |
// Explicitly calling this method - simulate execution and return result | |
// No cost, no actual transaction is sent to the blockchain | |
myContractInstance.myMethod.call(param1 [, ...] [, callback]); | |
// Explicitly sending a transaction to this method | |
myContractInstance.myMethod.sendTransaction(param1 [, ...] [, callback]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment