Skip to content

A reloadable and modularized clojurescript DApp.

Notifications You must be signed in to change notification settings

223kazuki/cljs-dapp

Repository files navigation

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.

About

A reloadable and modularized clojurescript DApp.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published