Giter Site home page Giter Site logo

homemonitoroneth's Introduction

INSTALL GO

mkdir solidityLab
cd solidityLab
sudo apt install -y curl
sudo apt install -y build-essential
sudo apt install -y screen
curl -O https://dl.google.com/go/go1.9.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.9.1.linux-amd64.tar.gz 
export PATH=$PATH:/usr/local/go/bin 

CHECK GO VERSION

go version 
// if it's installed properly
>go version go1.10.1 linux/amd64
rm go1.9.linux-amd64.tar.gz 

BUILD ETHEREUM

git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
git checkout v1.8.3
make geth
sudo cp build/bin/geth /usr/local/bin/geth
make swarm
sudo cp build/bin/swarm /usr/local/bin/swarm

CONNECT TO PRIVATE NETWORK

geth --datadir "./iotChain" account new
// Copy genesis.json and staticnodes.json into bether
cd iotChain
geth --datadir "." init genesis.json
geth --rpc --rpcport "8000" --rpccorsdomain "*" --datadir "." --port "30303" --nodiscover --rpcapi "db,eth,net,web3,personal" --identity "one" --networkid 666 console
// console will be opened
net
// you must see peerCount as "1"

CONNECT TO SWARM

export BZZKEY=cc7b75f40efdeb554c20de9c8adc3339aabea0cd
swarm --bzzaccount $BZZKEY --datadir "." --ens-api "./geth.ipc" --bzznetworkid 666

Web3

sudo npm install --save web3 --unsafe-perm=true --allow-root

Install web3.js library Add to the main settings.js file under the functionGlobalContext property:

functionGlobalContext: {
//  osModule:require('os'),
    web3:require('web3')
}

go to ~/.node-red
npm i web3


"dependencies": {
"web3": "0.19.0"

}

npm install [email protected]



npm init
npm	install	–save	body-parser
npm	install	–save	ethereum.js
npm	install	–save	express
npm	install	–save	web3

Browserify

npm install -g browserify

Swarm

curl -s -L http://localhost:8500/bzz:/14ae03ce158150f6cbfe0d392ea18f3c664942c7c3fea7894cd7dc44dfcd9bda
swarm --bzzaccount $BZZKEY --datadir "."  --keystore "./keystore" --ens-api "./geth.ipc"

BZZKEY = Addres


get coinbase address
export address as BZZKEY
export BZZKEY=cc7b75f40efdeb554c20de9c8adc3339aabea0cd
echo -ne '\n' | swarm --bzzaccount $BZZKEY --datadir "." --ens-api "./geth.ipc" --bzznetworkid 666 &

ACKNOWLEDGEMENT

This project has been supported by Scientific Research Fund of Bogazici University under grant no: 13500

homemonitoroneth's People

Contributors

mdogan93 avatar

Watchers

Ehsan Momeni Bashusqeh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.