GithubHelp home page GithubHelp logo

loom-hackathon-02-teamd's Introduction

Truffle DappChain Example

Simple example of Truffle interacting with Loom DappChain, this example uses loom-truffle-provider (check LoomTruffleProvider repository for more details)

Requirements

Node >= 8

Install

In order to download the Truffle DAppChain Example there're two methods Git or Unbox

Git method

git clone https://github.com/loomnetwork/truffle-dappchain-example
cd truffle-dappchain-example

yarn install
# or
npm install

Unbox method

# Install Truffle if not installed
npm install -g truffle

mkdir truffle-dappchain-example
cd truffle-dappchain-example

truffle unbox loomnetwork/truffle-dappchain-example

Start DappChain

# Download
wget https://private.delegatecall.com/loom/osx/build-330/loom
chmod +x loom

# Run
./loom init
./loom run

Deploy Truffle

# On second terminal

# Deploy Migrations.sol and SimpleStore.sol
yarn deploy

# Running test on directory /test
yarn test

In order to correctly redeploy the contracts there's a command "yarn deploy:reset"

Also is possible to call truffle command directly by call "yarn truffle"

We're not versioning the build directory for this particular example, although is recommended to versioning, the limitation can be removed by editing .gitignore

Web interface

The web interface is build with React using webpack to compile and generate the page

# On a third terminal

yarn serve

The eb interface will be available on http://localhost:8080

Current limitations

  • Events declared on smart contracts should have an named parameter like NewValueSet(uint _value) in the contract SimpleStore.sol. Also it helps to dealing with events

Loom Network

https://loomx.io

License

BSD 3-Clause License

loom-hackathon-02-teamd's People

Contributors

odanado avatar waku-waku avatar

Watchers

James Cloos avatar  avatar  avatar  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.