Skip to content
MyCrypto is an open-source, client-side tool for generating ether wallets, handling ERC-20 tokens, and interacting with the blockchain more easily.
TypeScript CSS JavaScript Other
Branch: develop
Clone or download
wtzb Merge pull request #2723 from julien51/develop
using .unlock-protocol.config.json instead of URL to keep lock config
Latest commit 7ca14a9 Sep 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github using .unlock-protocol.config.json instead of URL to keep lock config Aug 26, 2019
common Merge branch 'develop' into rsk-testnet-token-fix Aug 1, 2019
electron-app Merge branch 'feature/shapeshift-on-desktop' into feature/new-swap Nov 22, 2018
jenkins Jenkins - use yarn for building (#2067) Jul 14, 2018
jest_config Fix yarn test Mar 19, 2019
scripts Added old rep token to exclusion list. Oct 26, 2018
shared add Auxilium crypto support Jun 22, 2019
spec Use Unix line endings Mar 15, 2019
static Updated contact to h1 program Feb 27, 2019
travis-scripts Refactor redux pattern from top-level to ducks (#1936) Jun 18, 2018
webpack_config fix path to electron build config May 17, 2019
.babelrc activate RHL with webpack-dev-server May 9, 2019
.drawbridgerc fix drawbridge Mar 30, 2019
.editorconfig Fix editor config (#1458) Apr 6, 2018
.gitattributes Newline at end of file Aug 30, 2018
.gitignore Mnemonic Redesign (#1501) Apr 13, 2018
.npmrc Update dependencies to enable Greenkeeper 🌴 (#344) Nov 7, 2017
.nvmrc .nvmrc use lts/carbon May 9, 2019
.prettierignore update prettier and formatAll Jun 10, 2019
.prettierrc Ensure CI fails on non-prettier compliant PRs (#693) Jan 1, 2018
.travis.yml travis slack integration Jun 6, 2019
.unlock-protocol.config.json using .unlock-protocol.config.json instead of URL to keep lock config Aug 26, 2019
LICENSE Change 2018 -> 2019 in Core. Dec 18, 2018
README.md Update README.md Aug 21, 2019
SECURITY.md Create SECURITY.md Jun 11, 2019
package.json release 1.7.1 Aug 1, 2019
tsconfig.json TypeScript to 3.0.1 Dec 6, 2018
tslint.json update tslint Jun 10, 2019
yarn.lock Merge pull request #2673 from MyCryptoHQ/dependabot/npm_and_yarn/loda… Jul 19, 2019

README.md

MyCrypto Web & Desktop Apps

Build Status Coverage Status

Verifying our releases

You can find how to do this on our support document

Development / Build Requirements

  • Node 8.16.0*
  • Yarn >= 1.7.0**
  • Python 2.7.X***

*Higher versions should work fine, but may cause inconsistencies. It's suggested you run 8.16.0 using nvm.
**npm is NOT supported for package management. MyCrypto uses yarn.lock to ensure sub-dependency versions are pinned, so yarn is required to install node_modules
***Python 3 is not supported, since our dependencies use node-gyp.
***For users trying to build with WSL, you'll need to have install libpng via sudo apt-get install libpng16-dev.

Running the App

First, you must run yarn to grab all the dependencies. If you are ever having trouble with something, a good place to start is by trying rm -rf node_modules/ && yarn which will completely clear all your previously installs dependencies and re-install them from scratch.

Then, you can run various commands depending on what you want to do:

Development

# run app in dev mode in browser, rebuild on file changes
yarn start

A development server will be available on https://localhost:3000 If you're using Chrome, you will get a net::ERR_CERT_AUTHORITY_INVALID warning. To disable it you can your settings in chrome: chrome://flags/#allow-insecure-localhost

# run app in dev mode in electron, rebuild on file changes
yarn dev:electron

Build Releases

# builds the production server app
yarn build
# builds the downloadable version of the site
yarn build:downloadable
# builds the electron apps
yarn build:electron

# builds only one OS's electron app
yarn build:electron:(osx|linux|windows)

All of these builds are output to a folder in dist/.

Unit Tests:

# run unit tests with Jest
yarn test

Integration Tests:

# run integration tests with Jest
yarn test:int

Address Derivation Checker:

EthereumJS-Util previously contained a bug that would incorrectly derive addresses from private keys with a 1/128 probability of occurring. A summary of this issue can be found here.

As a reactionary measure, the address derivation checker was created.

To test for correct address derivation, the address derivation checker uses multiple sources of address derivation (EthereumJS and PyEthereum) to ensure that multiple official implementations derive the same address for any given private key.

The derivation checker utility assumes that you have:
  1. Docker installed/available
  2. dternyak/eth-priv-to-addr pulled from DockerHub
Docker setup instructions:
  1. Install docker (on macOS, Docker for Mac is suggested)
  2. docker pull dternyak/eth-priv-to-addr
Run Derivation Checker

The derivation checker utility runs as part of the integration test suite.

yarn test:int

Folder structure:

│
├── common
│   ├── api - Services and XHR utils
│   ├── assets - Images, fonts, etc.
│   ├── components - Components according to "Redux philosophy"
│   ├── config - Various config data and hard-coded json
│   ├── containers - Containers according to "Redux philosophy"
|   ├── features - State management and async operations, organized per "feature", follows "ducks" philosophy, see: https://github.com/MyCryptoHQ/MyCrypto/issues/1435
│   ├── libs - Framework-agnostic libraries and business logic
|       ├── contracts - Takes in a contract interface ABI and returns an object with keys equivalent to the ABI function names that each have `.encodeInput`,  `.decodeInput`, `decodeOutput` methods.
|       ├── ens - Basic ENS functions for getting a name hash and mapping returned ENS contract values to human-readable strings
|       ├── nodes - Configures Shepherd (https://github.com/MyCryptoHQ/shepherd) and exports a singleton provider
|       ├── scheduling - Functionality for enabling Ethereum Alarm Clock usage for scheduled transactions. See https://github.com/MyCryptoHQ/MyCrypto/pull/1343
|       ├── transaction - Utilities for signing / parsing / validating transactions
|       ├── wallet - Wallet implementations for deterministic (hw wallets, mnemonic wallets, etc), and non-deterministic (web3, parity signer, etc.) wallets.
|       ├── web-workers - Web-worker implementation of generateKeystore + fromV3 for non-blocking encrypt/decryption
|       ├── erc20 - `libs/contracts` instance of erc20 abi
|       ├── formatters - Hex string formatters
|       ├── signing - Message signing and signature verification
|       ├── units - Helper functions for working with Ethereum / Token units in both base and unit form. Use these instead of using bn.js directly
|       ├── validators - Validation functions for addresses, hex strings, keys, numbers, derivation paths, EAC values, Ethereum values, etc.
|       ├── values - Functions for building EIP681 requests, numerical sanitization, string padding, bn.js conversion
│   ├── sass - SCSS styles, variables, mixins
│   ├── translations - Language JSON dictionaries
│   ├── typescript - Typescript definition files
│   ├── utils - Common use utility functions
│   ├── index.tsx - Entry point for app
│   ├── index.html - Html template file for html-webpack-plugin
│   ├── Root.tsx - Root component for React
├── electron-app - Code for the native electron app
├── jest_config - Jest testing configuration
├── spec - Jest unit tests, mirror's common's structure
├── static - Files that don't get compiled, just moved to build
└── webpack_config - Webpack configuration

Typescript Resources:

More information is available on the Wiki Pages

Branching Model

MyCrypto is open-source and encourages pull-requests from third-parties. Our branching model is described below.

To start, fork this repository and have your own remote repository on GitHub.

Naming Convention

Your branch name must meet our naming conventions to help with administration and identify what type of branch it is.

We name our branches like <type>/<name> - examples below;

  • feature/foo - A feature branch for a feature to do with foo.
  • enhancement/foo - An enhancement branch to an already built feature called foo.
  • hotfix/foo - A hotfix branch called foo (something affecting current production)
  • bugfix/foo - A bugfix branch called foo (something affecting current staging)
  • release/1.4.2 - A release branch for tag 1.4.2
  • revert/foo - A branch to revert a logic to do with foo.

Feature branches

Feature branches are used to implement new enhancements for upcoming releases. A feature branch should be ephemeral (only lasting as long as the feature itself is in development. Once the feature is completed, it must be merged back into the develop branch and/or discarded.)

We begin on the latest develop branch and branch off with the naming convention of feature/foo.

Please also make yourself familiar with our Contributor Guidelines.

$ git checkout -b feature/foo develop

You should use feature/foo to implement and commit all changed required for your new feature.

  • Make many small commits so that the history of development for you feature branch is clear and so that it is easy to pinpoint and edit or cherry-pick specific commits if necessary.
  • Avoid merging your feature branch with out feature branches being developed in parallel.
  • Add neccessary unit tests for your features code.

When your feature is complete, push it to your remote repo and prepare it for a pull request.

When you are creating a pull request, make sure the base is MyCryptoHQ/mycrypto/develop and compare to feature/foo.

You can’t perform that action at this time.