AltExecCnsContract.prototype.sendTransaction

Calls a contract's transaction function via API server.

Internally calls http POST /transaction on the AltExecCnsAPI.

Please refer to the following page for detailed information.

GUIDE

Parameters

Name Type Description
password string Account password
contractName string Target contract name
functionName string Contract function name
params array Parameters to pass to Contract function
abi JSONObject ABI of the contract to call
callback function callback

Callback

Name Type Description
err error Error
txHash string Transaction hash of executed transaction

Usage

contract.sendTransaction('__PASSWORD__', 'DeliveryCompany', 'create', ['company1', '0x2adea197e6600fe1a224540b0dd1666e6d75a64f'], abi, function(err, txHash) {
  if (err) console.error(err);
  else console.log(txHash);
}

results matching ""

    No results matching ""