Skip to content

f-o-a-m/purescript-web3-example

Repository files navigation

purescript-web3-example

Build Status

Purescript Web3 Example

This is an example project using purescript-web3 and purescript-web3-generator to interact with a very simple smart contract -- just storing, updating, and querying a 256-bit unsigned integer. It uses Thermite and purescript-react for the ui.

It should be easy to clone this repo as a template for other web3 enabled applications. It has a Webpack configuration for introducing contract addresses as environment variables to your application, as well as all of the loaders one would need for a real world PureScript application.

Requirements

Note: In addition to the following requirements, because the example app now depends on being able to use uPort if the user desires, you must point your MetaMask account to a Rinkeby node

Run Instructions

Using npm

> npm install
> npm run generator
> env SIMPLE_STORAGE_ADDRESS=<your-contract-address> npm run webpack-dev-server

or by using Yarn

> yarn
> yarn generator
> env SIMPLE_STORAGE_ADDRESS=<your-contract-address> yarn webpack-dev-server