Created
January 18, 2022 07:59
-
-
Save petrosDemetrakopoulos/b238b5d2899f8a9018c6765187600ca7 to your computer and use it in GitHub Desktop.
Initializing EthairBalloons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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