bumi 804060ad34 Pass ETH signer only if it can actually sign
We have seen an "no accounts" invalid operation getAddress when trying
to call a contract function in the init calls.
It seems ethers has a problem with a signer that does not have any
accounts - even though we don't try to sign an actual transaction and
only read data from the contract.

This change only passes the signer if we have an unlocked web3 provider
(metamask).
2018-06-14 15:00:43 +02:00
2018-04-16 18:11:52 +02:00
2017-02-07 21:12:08 +08:00
2018-04-21 11:34:41 +02:00
2018-04-01 03:16:22 +02:00
2018-04-16 19:14:37 +02:00
2018-04-16 18:11:52 +02:00
2018-04-16 18:11:52 +02:00
2018-04-16 18:11:52 +02:00
2018-06-04 14:13:46 +02:00
2018-04-16 18:11:52 +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: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 truffle-kredits repo/package.

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

truffle-kredits 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 in offline mode.

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

2. truffle-kredits

Get your local Ethereum development node running.

  • Clone truffle-kredits
  • npm install
  • npm run ganache - which is basically: ganache-cli -p 7545 -i 100 (we use the non-default port for local networks and a fixed network id)
  • npm run bootstrap - bootstrap runs fresh migrations, adds some seed data and writes the address/abi information to JSON that will be used by kredits-web
  • npm link - make the truffle-kredits module linkable as kredits-contracts on your machine

3. kredits-web

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

  • npm link kredits-contracts - link the local truffle-kredits package (it will become kredits-contracts soon)
  • npm run start:local - NETWORK_ID=100 and WEB3_PROVIDER_URL=http://localhost:7545 must be set for local settings

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"]'
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%