I have one contract with method name as getValues().From Dapp I am invoking contract method as 'contractCAt.getValues.call(function(error,result){...})' this works fine and by using 'contractCAt.getValues(function(error,result){...})' this syntax also works fine.I didn't get any difference between those two ways to invoke contract method.So could anyone help me to give idea about those syntax.
相关问题
- Send Raw Transaction Ethereum infura nodejs npm
- Uncaught Error: Returned values aren't valid,
- Hyperledger fabcar sample fabric showing connect f
- Best datatype to store hexidecimal and hex charact
- npm error “Keccak bindings compilation fail.” whil
相关文章
- Hyperledger transaction verification
- Hyperledger fabric's ChannelCreationPolicy
- Dynamic array in Solidity
- VM Exception while processing transaction: out of
- How to efficiently hash (SHA 256) in golang data w
- ltdl.h Not found error while building chaincode
- Private blockchains Vs Hashgraph, Ripple, BigChain
- How can the transaction certificates in Hyperledge
See the web3j documentation:
contractCAt.getValues.call()
is run locally and will not alter the state of your contract on the blockchain. Does not consume any ether.contractCAt.getValues.sendTransaction()
does alter the state (assuming the transaction is successfully mined).contractCAt.getValues()
automatically delegates to one of the two above based on the method definition. Constant and pure functions will usecall()
while the rest will usesendTransaction()
.