States & Views
Example Data
executeCall
Without Parameters
const thor = ThorClient.at('https://mainnet.vechain.org');
// it is the ABI of the energy contract mentioned above
const contractABI = new ABIcontract ([
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
...
]);
const name = await thor.contracts.executeCall(
'0x0000000000000000000000000000456e65726779',
contractABI.getFunction('name'),
[]
);
console.log('Name', name.result.plain);With Parameters
Historical Data
Simulate Transaction
Example Project
contracts.load
Create Contract Object
Read Functions
Read Options
Example Project
Last updated
Was this helpful?