Skip to content

Instantly share code, notes, and snippets.

@petrosDemetrakopoulos
Created January 18, 2022 21:47
Show Gist options
  • Save petrosDemetrakopoulos/03312cdd8db1969a2f75757938bf6da6 to your computer and use it in GitHub Desktop.
Save petrosDemetrakopoulos/03312cdd8db1969a2f75757938bf6da6 to your computer and use it in GitHub Desktop.
EthairBalloons API dependencies
const ethAirBalloons = require('ethairballoons');
const path = require('path');
const savePath = path.resolve(__dirname + '/contracts');
const express = require('express')
const bodyParser = require('body-parser')
const app = express()
const port = 3000
app.use(bodyParser.json())
const ethAirBalloonsProvider = ethAirBalloons('http://localhost:8545', savePath);
const 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