8000 GitHub - lumodon/CashbetAppathon: Making an Ethereum based distributed blogging app
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lumodon/CashbetAppathon

 
 

Repository files navigation

Installation

  1. npm i
  2. Install ganache GUI from http://truffleframework.com/ganache/
  3. npm i -g truffle
  4. Install docker
  5. Install IPFS

Setup

  1. Run Ganachi GUI application
  2. truffle compile && truffle migrate --reset --network development
  3. Open ethconfig.json and set address to the address specefied from previous command.
  4. Copy 12 word recovery phrase from ganache, paste into metamask login using recover account
  5. docker create
  6. ipfs init && ipfs daemon

Note that everytime you close and open Ganache, you'll be creating a whole new blockchain. Your truffle migration for Dedium.sol will have a different address that you'll have to enter into ethconfig.json, and you'll need to login with a new metamask account.

Metamask should be set to Custom RPC and the url from Ganache entered in, then click Save.

If you've already run these, you'll be using docker run [name] where [name] is replaced with name of created docker container, you can find this by using docker images

Will eventually upgrade to docker-compose to create container for all microservices. Eventually will be deployed to DigitalOcean at https://cloud.digitalocean.com/droplets/91344674/graphs?i=ff6648 at ubuntu-s-1vcpu-1gb-sfo2-01 at 159.89.128.7

Ganache hosts the localhost simulation of blockchain, Truffle compiles the Solidity contract Dedium.sol to it, docker wraps our entire app into containers so they can be microservices, DigitalOcean is a VPS (Virtual Private Server) that hosts our docker containers.

web3 is the JS connection to our Solidity dApp which hosts our IPFS hashes on the blockchain. IPFS is our file storage.

For the moment, truffle will not allow input from other folders. Also output using migrations is not functioning (see sc-forks/solidity-coverage#184), because of this we have all the truffle folders sitting at root.

Truffle can access the solidity contract via truffle console --network development then Dedium.deployed().then(i => {DediumInstance = i}) and can access with DediumInstance.create or DediumInstance.getAddressByTitle

Common Problems and how to resolve them

  • If truffle migrate responds with "network up to date" and doesn't give you an address then try running truffle migrate --reset

About

Making an Ethereum based distributed blogging app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0