web3.personal.signAndSendTransaction method, Is there any such method available for Contract functions?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
What you have to do is to encode the contract signature and the parameters in the Application Binary Interface (ABI) format, then send this data in the
data parameter of the
Object - The transaction object to send: * from: String - The address for the sending account. Uses the web3.eth.defaultAccount property, if not specified. * to: String - (optional) The destination address of the message, left undefined for a contract-creation transaction. * value: Number|String|BigNumber - (optional) The value transferred for the transaction in Wei, also the endowment if it's a contract-creation transaction. * gas: Number|String|BigNumber - (optional, default: To-Be-Determined) The amount of gas to use for the transaction (unused gas is refunded). * gasPrice: Number|String|BigNumber - (optional, default: To-Be-Determined) The price of gas for this transaction in wei, defaults to the mean network gas price. * data: String - (optional) Either a byte string containing the associated data of the message, or in the case of a contract-creation transaction, the initialisation code. * nonce: Number - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
To work out what data to send, check out the step-by-step example under the heading Use Your Contract Using curl And JSON-RPC in How to call a contract method using the eth_call JSON-RPC API, search for "ABI" on this site, and check out Ethereum Contract ABI.