Calls a contract's constant function via the API server and gets the result.

Internally calls http GET /call on the AltExecCnsAPI.

Please refer to the following page for detailed information.



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


Name Type Description
err error Error
res array An array in which the return values of call are arranged in order

Usage'__PASSWORD__', 'Building', 'getRoomIds', ['building1'], abi, function(err, res) {
  if (err) console.error(err);
  else console.log(res.join(','));

results matching ""

    No results matching ""