2020-09-29 17:59:00 +02:00
2019-07-12 12:04:29 +02:00
2020-09-29 17:59:00 +02:00
2020-07-09 23:53:06 +02:00
2020-06-02 11:55:29 +02:00
2020-09-29 17:58:38 +02:00
2020-05-09 17:07:35 +02:00
2018-04-01 03:16:22 +02:00
2019-06-12 16:27:01 +02:00
2019-03-26 22:10:30 +01:00
2020-05-09 17:07:35 +02:00

Build Status

kredits-web

This README outlines the details of collaborating on this Ember application. A short introduction of this app could easily go here.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone git@github.com:67P/kredits-web.git this repository
  • cd kredits-web
  • npm install

Running / Development

See working with locally deployed contracts for details on how to develop with locally deployed contracts.

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

  • ember test
  • ember test --server

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Building

  • ember build (development)
  • ember build --environment production (production)

Deploying

(You need collaborator permissions on the 5apps Deploy project.)

npm run deploy

Working with locally deployed contracts

The smart contracts and their JavaScript wrapper library are developed in the kredits-contracts repo/package.

You can run kredits-web on your machine, against a local, simulated Ethereum network, provided e.g. by ganache.

kredits-contracts holds all the tools to start and set up such a simulated network, as well as to deploy smart contracts to it.

These are the basic steps to get up and running:

1. IPFS

Run a local IPFS deamon.

  • Make sure CORS headers are configured. See IPFS for more info.
  • ipfs daemon

2. kredits-contracts

Get your local Ethereum development node running. (See kredits-contracts README for details.

  • Clone kredits-contracts
  • npm install
  • npm run devchain - runs a local development chain
  • npm run bootstrap - bootstrap runs deploys all the contracts
  • npm link - make the kredits-contracts module linkable as kredits-contracts on your machine (currently broken :( )

3. kredits-web

With IPFS and Ethereum/ganache running, you can now start this Ember app.

  • npm link kredits-contracts - link the local kredits-contracts package
  • npm run start:local - WEB3_PROVIDER_URL=http://localhost:7545 must be set for local settings

If you restart the devchain your network ID changes. So kredits-contracts does not find the correct DAO address. If that is the case the DAO address must be provided as KREDITS_DAO_ADDRESS environment variable.

  • npm run dao:address in the kredits-contracts repo to find your address
  • KREDITS_DAO_ADDRESS=<0xYOURADDRESS> npm run start:local

4. Metamask network

Switch the network in Metamask to "Custom RPC" with the RPC URL http://localhost:7545.

IPFS

Install IPFS with your favorite package manager and run

ipfs init (on initial installation)
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["localhost:4200"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8080
2.3.0 Latest
2025-02-17 06:35:52 +00:00
Languages
JavaScript 97.8%
Handlebars 1.4%
SCSS 0.7%
HTML 0.1%