Go to file
HenryNguyen5 2a4ad180d3 ENS Resolving (#942)
* Refactor BaseNode to be an interface INode

* Initial contract commit

* Remove redundant fallback ABI function

* First working iteration of Contract generator to be used in ENS branch

* Hide abi to clean up logging output

* Strip 0x prefix from output decode

* Handle unnamed output params

* Implement ability to supply output mappings to ABI functions

* Fix null case in outputMapping

* Add flow typing

* Add .call method to functions

* Partial commit for type refactor

* Temp contract type fix -- waiting for NPM modularization

* Remove empty files

* Cleanup contract

* Add call request to node interface

* Fix output mapping types

* Revert destructuring overboard

* Add sendCallRequest to rpcNode class and add typing

* Use enum for selecting ABI methods

* Add transaction capability to contracts

* Cleanup privaite/public members

* Remove broadcasting step from a contract transaction

* Cleanup uneeded types

* Refactor ens-base to typescript and add typings for ENS smart contracts

* Migrate ens-name-search to TS

* Add IResolveDomainRequest

* Fix rest of TSC errors

* Add definition file for bn.js

* Remove types-bn

* Fix some typings

* make isBN a static property

* progress commit -- swap out bignumber.js for bn.js

* Swap out bignumber for bn in vendor

* Change modn to number return

* Start to strip out units lib for a string manipulation based lib

* Convert codebase to only base units

* Get rid of useless component

* Handle only wei in values

* Use unit conversion in sidebar

* Automatically strip hex prefix, and  handle decimal edge case

* Handle base 16 wei in transactions

* Make a render callback component for dealing with unit conversion

* Switch contracts to use bn.js, and get transaction values from signedTx instead of state

* Get send transaction  working with bn.js

* Remove redundant hex stripping,  return base value of tokens

* Cleanup unit file

* Re-implement toFixed for strings

* Use formatNumber in codebase

* Cleanup code

* Undo package test changes

* Update snapshot and remove console logs

* Use TokenValue / Wei more consistently where applicable

* Add typing to deterministicWallets, fix confirmation modal, make UnitDisplay more flexible

* Split different ENS modes into their own components

* Fix Abi typedef

* Remove redundant moment type package

* Add Aux helper component

* Split out resolve components

* Make 'to' parameter optional

* Change import type

* Change typing to be base domain request

* Split handling of resolving into object handler

* Fix countdown component

* Adjust element spacing

* Implement reveal search functionality

* Add unit display for highest bidder

* Fill out forbidden/NYA modes

* ENS wallet component skeleton

* Clean up prop handling in UnitDisplay

* Change instanceof to typeof check, change boolean of displayBalance

* Add ENS wallet component

* Cleanup spacing

* Convert ConfModal for bidding in ENS

* Make ui component for placing bids

* Fix destructure in placeBid

* Pass through entire wallet

* Remove text center

* Display inline notification ENS isValid & add some ENS tests

* Add export of Aux

* Reformat with prettier

* progress...

* Add ENSUnlockLayout

* Add RevealBid component

* organize NameResolve components

* Merge ENS with transaction-refactor changes

* Fix address resolution

* Update styles

* convert ens name to lowercase before checking

* Add overflow-y:scroll to table

* update ens snapshots & tests

* cast 'undefined' state argument as any for testing

* clean up components

* Connect unitconverter to redux state

* remove unnecessary type assertion

* fix spinner size

* remove old bidmodal

* validate bidmask before opening modal

* progress...

* Update styles

* Add saga / actions for placing a bid

* Update types & clean up dead code

* Delete old test

* Dispatch PlaceBidRequested acitons

* Progress commit -- get ENS bidding ready for tx generation via sagas

* Seperate ENS action creators and types

* Add reducer & actions for ENS fields

* Add preliminary sagas for bid mask and bid value

* Fix ts errors

* Get bidding fields connected with some validation

* Clean up generate bid

* Hook up generate bid to redux state

* Get bid data generation working

* Add support for bidding on already open auctions

* Move bid generation states to redux, improve default field values

* Remove generate bid component

* Throttle bid generation

* Progress commit -- Bid Modal

* Hook bidmodal component up to bidding component

* Update template modal to handle custom confirm behavior

* Remove old redux bidding actions, add new one for downloaded bids

* Save downloaded bids to local storage

* Finish bidding modal

* Fix gas estimation bug

* Fix typing

* Remove bidding related functionality

* Get passing unit tests

* Make previous test more comprehensive

* Fix ts errors

* Remove commented code

* Fix invalid return

* Remove implementation of revealing bid

* Update snapshot

* Fix tests

* Delegate bidding to V3
2018-02-05 13:40:33 -06:00
common ENS Resolving (#942) 2018-02-05 13:40:33 -06:00
electron-app MEW-01-009 & MEW-01-010: Electron security fixes (#910) 2018-01-26 13:53:51 -06:00
jest_config MEW-01-009 & MEW-01-010: Electron security fixes (#910) 2018-01-26 13:53:51 -06:00
spec ENS Resolving (#942) 2018-02-05 13:40:33 -06:00
static Manifest and Favicons (#69) 2017-07-22 15:55:59 -05:00
webpack_config MEW-01-004 - Stronger Keystores (#981) 2018-02-02 00:01:30 -06:00
.editorconfig update .editorconfig 2017-07-04 15:16:08 +04:00
.gitignore Update dependencies to enable Greenkeeper 🌴 (#344) 2017-11-07 15:59:27 -08:00
.npmrc Update dependencies to enable Greenkeeper 🌴 (#344) 2017-11-07 15:59:27 -08:00
.nvmrc Update Readme, bump nvmrc (#954) 2018-01-29 12:24:20 -06:00
.prettierrc Ensure CI fails on non-prettier compliant PRs (#693) 2018-01-01 17:51:18 -06:00
.travis.yml Improve CI Performance (#971) 2018-02-01 01:03:36 -06:00
LICENSE Initial commit 2016-12-04 02:35:28 +01:00
README.md Update dependencies to enable Greenkeeper 🌴 (#972) 2018-02-01 02:17:35 -06:00
package.json chore(package): update @types/lodash to version 4.14.101 (#992) 2018-02-05 10:53:36 -06:00
tsconfig.json MEW-01-009 & MEW-01-010: Electron security fixes (#910) 2018-01-26 13:53:51 -06:00
tslint.json MEW-01-005 Web - Remove all HTTP links (#978) 2018-02-01 16:51:14 -06:00

README.md

MyEtherWallet V4+ (ALPHA - VISIT V3 for the current site)
Just looking to download? Grab our latest release

Greenkeeper badge

Running the App

This codebase targets Node 8.9.4 (LTS). After npm installing all dependencies (You may be required to install additional system dependencies, due to some node modules relying on them) you can run various commands depending on what you want to do:

Development

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

Build Releases

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

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

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

Unit Tests:

# run unit tests with Jest
npm run test

Integration Tests:

# run integration tests with Jest
npm run test:int

Dev (HTTPS):

Some parts of the site, such as the Ledger wallet, require an HTTPS environment to work. To develop on HTTPS, do the following:

  1. Create your own SSL Certificate (Heroku has a nice guide here)
  2. Move the .key and .crt files into webpack_config/server.*
  3. Run the following command:
npm run dev:https

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.

npm run test:int

Folder structure:

│
├── common
│   ├── actions - Application actions
│   ├── 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"
│   ├── libs - Framework-agnostic libraries and business logic
│   ├── reducers - Redux reducers
│   ├── sagas - Redux sagas
│   ├── sass - SCSS styles, variables, mixins
│   ├── selectors - Redux selectors
│   ├── 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
│   └── store.ts - Redux reducer combiner and middleware injector
├── 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

More information is available on the Wiki Pages

Thanks & Support

Cross browser testing and debugging provided by the very lovely team at BrowserStack.