Skip to content

Instantly share code, notes, and snippets.

@javahippie
Created March 19, 2018 18:30
Show Gist options
  • Select an option

  • Save javahippie/283eacf2bc8bd2493974bd3d8acd3438 to your computer and use it in GitHub Desktop.

Select an option

Save javahippie/283eacf2bc8bd2493974bd3d8acd3438 to your computer and use it in GitHub Desktop.
Instantiate Ethereum Contract and call function
var contract = web3.eth.contract(Contract.abi).at(Contract.address);
var vin = 'W0L000051T2123456';
contract.createCar(vin, function (error, result) {
if(!error) {
UI.showTransactionSuccess(); // Do something on the UI if the call is successful
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment