MyEtherWallet/etherwallet

Can I run it on a private chain?

jiahaoc1993 opened this issue · 8 comments

Please help

Kvhnuke finished (?) his guide. Let me know if anything is confusing or there are missing steps or anything. (This is over my head)


MyEtherWallet: Use Your Own Server Guide

  1. Download the latest copy of MyEtherWallet at https://github.com/kvhnuke/etherwallet/releases. You are going to want the source code - not the gh-pages or chrome-extension release as they do not contain the relay.
  2. Extract it and navigate to json_relay_node
  3. Open the terminal or command prompt (windows) and navigate to that folder and runnpm install.
  4. Once npm install is done, open response.js file

response

  1. In response.js file you should see two different ip addresses, currently these are set to MEW servers. You have to change these to point them to your own parity node.
    • Response.client.host is for the ETH mainet and Response.clientClassic.host is for the EtherClassic node.
    • If you only have one node running feel free to set both to same ip addresses. If you have a local node running then you have to set them to 127.0.0.1.
  2. Once you configure response.js file, go back to terminal and run node runLocalServer.js
  3. Navigate to http://localhost/api.mew you should end up on a empty/white page. You shouldn't get any 404 or timeout errors.
  4. Navigate to dist/js and open etherwallet-master.js. If you are changing other items in MyEtherWallet, you are going to want to run gulp in command line and change the following in app/scripts/ajaxReq.js, and let it compile. Changing it in dist/js allows you to avoid gulp/compiling.

screen shot 2016-10-28 at 2 38 33 pm

  1. Set the line 26, ajaxReq.SERVERURL = “http://localhost/api.mew”;
  2. Now navigate back to dist folder and open index.html. Now you are using your own custom node!

Pretty good. Now, how hard would it be to replace these constant strings with user-configurable IP addresses so no coding is needed to make these changes?

(I am a programmer, but 99% of everybody else is not)

THANK YOU VERRRRRRRY MUCH!!!!

awesome guide and app, I got an instance of mew up and running in about half a day, the only part of the guide that is missing is to setup for testnet.

I've got it setup on my mew relay node so that I can switch SSH tunnels to talk to my mainnet or testnet node, however using testnet I am running into some issues (can't send a testnet tx but I can load wallet info).

I'm guessing there are some code changes to the site that need to be made?

Currently EIP155 Txs are hard coded for only mainet, for test net you have to change the chainId to 3 I believe. I'll merge the latest ethereumjs-tx as soon as I get a chance and let user easily configure the chainId. If you would like to configure it manually it is at https://github.com/kvhnuke/etherwallet/blob/mercury/app/scripts/ethFuncs.js#L66

thank you, I've been checking it out from a hosting perspective and love how MEW deploys. It was super easy to put up the relay node and get the site up and running, doesn't appear overly hard to scale either.

I'll wait for the update and play around with it then, cheers.

Great to hear! Feel free to open pull requests if you do something you think other people would find useful! I added a dropdown for switching nodes but it's not hooked up yet....I also think its hidden currently. Frontend code can be copy/pasted from here regardless:

d426365#diff-582204a0b3c29d1ad397a01c87c68dd8R56

d426365#diff-f8c3cb317df91bcd35b6a23bb2556633R89

Launching this tonight as well.