Skip to content

Demo app for running TTN application on a private ethereum blockchain

Notifications You must be signed in to change notification settings

async-la/ttn-eth

Repository files navigation

React Truffle TTN Application Demo

Configuration

  1. Install Truffle globally.

    npm install -g truffle
  2. Clone repository

    git clone https://github.com/async-la/ttn-eth
    cd ttn-eth
  3. Set Data directory

    DATADIR=/path/to/mydataDir
  4. Create an account

    geth --datadir $DATADIR account new

    NOTE: Replace <ACCOUNT_ADDRESS> in genesis.json with the address of your newly created account.

  5. Create Genesis Block

    geth --datadir $DATADIR init ./genesis.json
  6. Start Geth in console mode with RPC - NOTE: --rpccorsdomain is a wildcard for DEMO purposes only

    geth --datadir $DATADIR --rpc --rpccorsdomain '*' console

    In the development console, unlock your wallet and start mining

    > personal.unlockAccount(eth.coinbase)
    > miner.start()
  7. Start Swarm

    swarm --bzzaccount <WALLET_ADDRESS> --datadir $DATADIR --ens-api '' -corsdomain '*'   

    In the development console, unlock your wallet and start mining

    > personal.unlockAccount(eth.coinbase)
    > miner.start()
  8. In a new terminal window, compile and migrate the smart contracts.

    truffle compile
    truffle migrate
  9. Start backend service

    node server.js

    NOTE: Updated app-id and key in server.js to match your TTN application

  10. Start front end app

    npm start

About

Demo app for running TTN application on a private ethereum blockchain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •