Git Product home page Git Product logo

cljs-dapp's Introduction

cljs-dapp

This is a Ethereum dApp using re-frame and integrant.

Development

Development Mode

Deploy Smart Contract Locally:

  1. You need to install following commands.
  • truffle
  • ganache-cli
  • node/npm
  1. Open terminal and run ganache-cli.
ganache-cli -i 1533140371286
  1. Test contract.
npm install
truffle test
  1. Open other terminal window and run following commands.
truffle migrate --reset

Start Cider from Emacs:

Put this in your Emacs config file:

(setq cider-cljs-lein-repl
    "(do (require 'figwheel-sidecar.repl-api)
         (figwheel-sidecar.repl-api/start-figwheel!)
         (figwheel-sidecar.repl-api/cljs-repl))")

Navigate to a clojurescript file and start a figwheel REPL with cider-jack-in-clojurescript or (C-c M-J)

Run application:

lein dev

Figwheel will automatically push cljs changes to the browser.
Wait a bit, then browse to http://localhost:3449.

You need MetaMask to connect ethereum private network.
Install it and connect to http://localhost:8545 hosted by ganache-cli.

Run tests:

lein clean
lein doo phantom test once

The above command assumes that you have phantomjs installed. However, please note that doo can be configured to run cljs.test in many other JS environments (chrome, ie, safari, opera, slimer, node, rhino, or nashorn).

Production Build

Deploy contract to Rinkeby test network:

You need some eth in your address.

truffle migrate --reset --network=rinkeby

To compile clojurescript to javascript:

lein do clean, build

Then upload resources/public to heroku/IPFS.

cljs-dapp's People

Contributors

223kazuki avatar

Stargazers

David.Gao avatar  avatar Programming is fun avatar bitsikka avatar

Watchers

James Cloos avatar

Forkers

ovistoica

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.