Skip to content

Instantly share code, notes, and snippets.

@petrosDemetrakopoulos
Created January 18, 2022 07:59
Show Gist options
  • Save petrosDemetrakopoulos/b238b5d2899f8a9018c6765187600ca7 to your computer and use it in GitHub Desktop.
Save petrosDemetrakopoulos/b238b5d2899f8a9018c6765187600ca7 to your computer and use it in GitHub Desktop.
Initializing EthairBalloons
var ethAirBalloons = require('ethairballoons');
var path = require('path');
var savePath = path.resolve(__dirname + '/contracts');
var ethAirBalloonsProvider = ethAirBalloons('http://localhost:8545', savePath);
//ethereum blockchain provider URL, path to save auto generated smart contracts
var Car = ethAirBalloonsProvider.createSchema({
name: "Car",
contractName: "carsContract",
properties: [
{
name: "model",
type: "bytes32",
primaryKey: true
},
{
name: "engine",
type: "bytes32",
},
{ name: "cylinders",
type: "uint"
}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment