diff --git a/README.md b/README.md
index 20f310a1e1..442e479826 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Check gh-pages files against live website at https://www.myetherwallet.com
| File Name| Status|
|---|---|
-| index.html |![embedded.html](https://filechecker.myetherwallet.com/check?localFile=https://raw.githubusercontent.com/kvhnuke/etherwallet/gh-pages/index.html&remoteFile=https://www.myetherwallet.com/index.html)|
+| index.html |![embedded.html](https://filechecker.myetherwallet.com/check?localFile=https://raw.githubusercontent.com/kvhnuke/etherwallet/gh-pages/index.html&remoteFile=https://www.myetherwallet.com/index.html)|
| embedded.html |![embedded.html](https://filechecker.myetherwallet.com/check?localFile=https://raw.githubusercontent.com/kvhnuke/etherwallet/gh-pages/embedded.html&remoteFile=https://www.myetherwallet.com/embedded.html)|
| helpers.html |![embedded.html](https://filechecker.myetherwallet.com/check?localFile=https://raw.githubusercontent.com/kvhnuke/etherwallet/gh-pages/helpers.html&remoteFile=https://www.myetherwallet.com/helpers.html)|
| signmsg.html |![signmsg.html](https://filechecker.myetherwallet.com/check?localFile=https://raw.githubusercontent.com/kvhnuke/etherwallet/gh-pages/signmsg.html&remoteFile=https://www.myetherwallet.com/signmsg.html)|
@@ -123,7 +123,6 @@ If you want to help contribute, here's what you need to know to get it up and ru
- We use angular and bootstrap. We used to use jQuery and Bootstrap until it was converted in April 2016. If you wonder why some things are set up funky, that's why.
- The mercury branch is currently the active development branch. We then push the dist folder live to gh-pages, which then gets served to MyEtherWallet.com.
- We use npm / gulp for compiling. There is a lot of stuff happening in the compilation.
-- Old node setups can be found in in `json_relay_node` (node.js) & `json_relay_php` (php). These are great resources for developers looking to get started and launch a public node on a $40 Linode instance.
**Getting Started**
diff --git a/app/scripts/controllers/decryptWalletCtrl.js b/app/scripts/controllers/decryptWalletCtrl.js
index 4c11ecd2b2..54755cf852 100644
--- a/app/scripts/controllers/decryptWalletCtrl.js
+++ b/app/scripts/controllers/decryptWalletCtrl.js
@@ -77,6 +77,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.ETHO:
$scope.HDWallet.dPath = $scope.HDWallet.hwEther1Path;
break;
+ case nodes.nodeTypes.EGEM:
+ $scope.HDWallet.dPath = $scope.HDWallet.hwEtherGemPath;
+ break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.ledgerPath;
}
diff --git a/app/scripts/directives/walletDecryptDrtv.html b/app/scripts/directives/walletDecryptDrtv.html
index 7cb833ee33..8988eafe84 100644
--- a/app/scripts/directives/walletDecryptDrtv.html
+++ b/app/scripts/directives/walletDecryptDrtv.html
@@ -35,7 +35,7 @@
+ ng-show="ajaxReq.type=='ETH'||ajaxReq.type=='ETC'||ajaxReq.type=='ROPSTEN ETH'||ajaxReq.type=='RINKEBY ETH'||ajaxReq.type=='KOVAN ETH'||ajaxReq.type=='EXP'||ajaxReq.type=='UBQ'||ajaxReq.type=='POA'||ajaxReq.type=='TOMO'||ajaxReq.type=='ESN'||ajaxReq.type=='AKROMA'||ajaxReq.type=='PIRL'||ajaxReq.type=='ETHO'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'">
-1) return true;
- return false;
-};
-app.use(bodyParser.urlencoded({
- extended: true
-}));
-app.get('/api.mew', function(req, res) {
- wait.launchFiber(handleRequest, req, res);
-});
-app.post('/api.mew', function(req, res) {
- wait.launchFiber(handleRequest, req, res);
-});
-var handleRequest = function(req, res) {
- res.header("Access-Control-Allow-Origin", "*");
- res.header('Content-Type', 'application/json');
- referer = req.header('Referer');
- req = req.body;
- if (req["isClassic"] === undefined || req["isClassic"] == "false") req["isClassic"] = false;
- if (phishingSites.contains(referer)) res.write(response.getErrorResponse("This is a phishing site, move your funds now"));
- else if ("balance" in req) res.write(response.getBalance(req["balance"], req["isClassic"]));
- else if ("rawtx" in req) res.write(response.sendRawTransaction(req["rawtx"], req["isClassic"]));
- else if ("txdata" in req) res.write(response.getTransactionData(req["txdata"], req["isClassic"]));
- else if ("estimatedGas" in req) res.write(response.getEstimatedGas(req["estimatedGas"], req["isClassic"]));
- else if ("ethCall" in req) res.write(response.getEthCall(req["ethCall"], req["isClassic"]));
- else if ("currentBlock" in req) res.write(response.getCurrentBlock(req["isClassic"]));
- else if ("traceCall" in req) res.write(response.getTraceCall(req["traceCall"],req["isClassic"]));
- else res.status(400).send();
- res.end();
-}
-exports.app = app;
\ No newline at end of file
diff --git a/json_relay_node/nodeIP.json b/json_relay_node/nodeIP.json
deleted file mode 100644
index de98c452b3..0000000000
--- a/json_relay_node/nodeIP.json
+++ /dev/null
@@ -1 +0,0 @@
-{"node_ip": "x.x.x.x", "node_classic_ip":"x.x.x.x"}
\ No newline at end of file
diff --git a/json_relay_node/package.json b/json_relay_node/package.json
deleted file mode 100644
index 3512e2163e..0000000000
--- a/json_relay_node/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "mew_rpc_relay",
- "version": "1.0.0",
- "description": "relay to connect between parity and web",
- "main": "runServer.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "kvhnuke",
- "license": "ISC",
- "dependencies": {
- "bignumber.js": "^2.4.0",
- "body-parser": "^1.15.2",
- "express": "^4.14.0",
- "http": "0.0.0",
- "https": "^1.0.0",
- "node-json-rpc": "0.0.1",
- "vhost": "^3.0.2",
- "wait.for": "^0.6.6"
- }
-}
diff --git a/json_relay_node/response.js b/json_relay_node/response.js
deleted file mode 100644
index 2a5719646d..0000000000
--- a/json_relay_node/response.js
+++ /dev/null
@@ -1,140 +0,0 @@
-'use strict';
-var rpc = require('node-json-rpc');
-var BN = require('bignumber.js');
-var wait = require('wait.for');
-var nodeInfo = require('./nodeIP.json');
-var Response = function() {}
-var clientConfigs = {
- client: {
- conns: 0,
- maxConns: 10000
- },
- clientClassic: {
- conns: 0,
- maxConns: 10000
- }
-};
-Response.client = new rpc.Client({
- port: 8545,
- host: nodeInfo.node_ip,
- path: '/',
- strict: true
-});
-Response.clientClassic = new rpc.Client({
- port: 8545,
- host: nodeInfo.node_classic_ip,
- path: '/',
- strict: true
-});
-Response.getResponse = function(method, data, isClassic, callback) {
- var client = isClassic ? "clientClassic" : "client";
- var timer = setInterval(function() {
- if (clientConfigs[client].conns < clientConfigs[client].maxConns) {
- clearInterval(timer);
- clientConfigs[client].conns++;
- Response[client].call({
- "jsonrpc": "2.0",
- "method": method,
- "params": data,
- "id": Math.floor(Math.random() * 10000000)
- }, function(err, res) {
- clientConfigs[client].conns--;
- if (err) callback(null, {
- error: true,
- data: err
- })
- else if (res && "error" in res) callback(null, {
- error: true,
- data: res.error.message
- });
- else callback(null, {
- error: false,
- data: res.result
- });
- });
- }
- }, 500);
-}
-Response.getResponseSync = function(method, data, isClassic) {
- var resp = wait.
- for (Response.getResponse, method, data, isClassic);
- if (resp.error) throw resp.data;
- return resp.data;
-}
-Response.getBalance = function(addr, isClassic) {
- return this.runInTryCatch(function(data) {
- addr = Response.formatAddress(addr);
- data.data = {
- address: addr,
- balance: new BN(Response.getResponseSync("eth_getBalance", [addr, "pending"], isClassic))
- };
- });
-}
-Response.getTraceCall = function(objCall, isClassic) {
- return this.runInTryCatch(function(data) {
- data.data = Response.getResponseSync("trace_call", [objCall, ["stateDiff", "trace", "vmTrace"]], isClassic);
- });
-}
-Response.getCurrentBlock = function(isClassic) {
- return this.runInTryCatch(function(data) {
- data.data = new BN(Response.getResponseSync("eth_blockNumber", [], isClassic));
- });
-}
-Response.getTransactionData = function(addr, isClassic) {
- var parent = this;
- return this.runInTryCatch(function(data) {
- addr = parent.formatAddress(addr);
- data.data = {
- address: addr,
- balance: new BN(Response.getResponseSync("eth_getBalance", [addr, "pending"], isClassic)),
- nonce: Response.getResponseSync("eth_getTransactionCount", [addr, "pending"], isClassic),
- gasprice: Response.getResponseSync("eth_gasPrice", [], isClassic)
- };
- });
-}
-Response.sendRawTransaction = function(rawTx, isClassic) {
- var parent = this;
- return this.runInTryCatch(function(data) {
- data.data = Response.getResponseSync("eth_sendRawTransaction", [rawTx], isClassic);
- });
-}
-Response.getEthCall = function(txObj, isClassic) {
- var parent = this;
- return this.runInTryCatch(function(data) {
- data.data = Response.getResponseSync("eth_call", [txObj, "pending"], isClassic);
- });
-}
-Response.getEstimatedGas = function(txObj, isClassic) {
- var parent = this;
- return this.runInTryCatch(function(data) {
- data.data = Response.getResponseSync("eth_estimateGas", [txObj], isClassic);
- });
-}
-Response.getErrorResponse = function(e) {
- var data = this.getDefaultResponse();
- data.error = true;
- data.msg = e;
- return JSON.stringify(data);
-}
-Response.getDefaultResponse = function() {
- return {
- "error": false,
- "msg": "",
- "data": ""
- };
-}
-Response.runInTryCatch = function(func) {
- var data = this.getDefaultResponse();
- try {
- func(data);
- } catch (e) {
- data.error = true;
- data.msg = e.toString();
- }
- return JSON.stringify(data);
-}
-Response.formatAddress = function(addr) {
- if (addr.substring(0, 2) == "0x") return addr;
- return "0x" + addr;
-}
-module.exports = Response;
\ No newline at end of file
diff --git a/json_relay_node/runLocalServer.js b/json_relay_node/runLocalServer.js
deleted file mode 100644
index fc332cf7b9..0000000000
--- a/json_relay_node/runLocalServer.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var fs = require('fs');
-var vhost = require('vhost');
-var express = require('express');
-var http = require('http');
-var app = express();
-app.use(vhost('localhost', require('./index.js').app));
-var httpServer = http.createServer(app);
-httpServer.listen(80);
\ No newline at end of file
diff --git a/json_relay_node/runServer.js b/json_relay_node/runServer.js
deleted file mode 100644
index 76257d8061..0000000000
--- a/json_relay_node/runServer.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var fs = require('fs');
-var vhost = require('vhost');
-var express = require('express');
-var http = require('http');
-var https = require('https');
-var privateKey = fs.readFileSync('/etc/ssl/private/ssl-cert-snakeoil.key', 'utf8');
-var certificate = fs.readFileSync('/etc/ssl/certs/ssl-cert-snakeoil.pem', 'utf8');
-var credentials = {key: privateKey, cert: certificate};
-var app = express();
-app.use(vhost('rpc.myetherwallet.com', require('./index.js').app));
-var httpServer = http.createServer(app);
-var httpsServer = https.createServer(credentials, app);
-httpServer.listen(80);
-httpsServer.listen(443);
\ No newline at end of file
diff --git a/json_relay_php/TheDAO/getDAOProposals.php b/json_relay_php/TheDAO/getDAOProposals.php
deleted file mode 100644
index e565effb82..0000000000
--- a/json_relay_php/TheDAO/getDAOProposals.php
+++ /dev/null
@@ -1,101 +0,0 @@
- $i,
- "data" => getProposal($i),
- );
- }
- file_put_contents(CACHE_FILE, json_encode($proposals, JSON_PRETTY_PRINT));
-}
-else if ($req == "update") {
- $proposals = json_decode(file_get_contents(CACHE_FILE), 1);
- $pCount = getProposalCount();
- if ($pCount != count($proposals) - 1) {
- for ($i = count($proposals); $i <= $pCount; $i++) {
- $proposals[] = array(
- "proposalID" => $i,
- "data" => getProposal($i),
- );
- }
- file_put_contents(CACHE_FILE, json_encode($proposals, JSON_PRETTY_PRINT));
- }
-}
-else {
- header('Content-Type: application/json');
- echo file_get_contents(CACHE_FILE);
-}
-function getProposal($id)
-{
- $getProposal = array(
- "data" => PROPOSAL_GET . str_pad(bcdechex($id), 64, "0", STR_PAD_LEFT),
- "to" => DAO_ADDR,
- );
- return json_decode(getEthCall($getProposal, $GLOBALS['gethRPC']), 1)['data'];
-}
-function getProposalCount()
-{
- $getCount = array(
- "data" => PROPOSAL_COUNT,
- "to" => DAO_ADDR,
- );
- return bchexdec(json_decode(getEthCall($getCount, $GLOBALS['gethRPC']), 1)['data']);
-}
-function getEthCall($txobj, $gethRPC)
-{
- $data = getDefaultResponse();
- try {
- $data['data'] = getRPCResponse($gethRPC->eth_call($txobj, "pending"));
- }
- catch (exception $e) {
- $data['error'] = true;
- $data['msg'] = $e->getMessage();
- }
- return json_encode($data);
-}
-function bchexdec($hex)
-{
- $dec = 0;
- $len = strlen($hex);
- for ($i = 1; $i <= $len; $i++) {
- $dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len -
- $i))));
- }
- return $dec;
-}
-function bcdechex($dec)
-{
- $hex = '';
- do {
- $last = bcmod($dec, 16);
- $hex = dechex($last) . $hex;
- $dec = bcdiv(bcsub($dec, $last), 16);
- } while ($dec > 0);
- return $hex;
-}
-function getDefaultResponse()
-{
- $data['error'] = false;
- $data['msg'] = "";
- $data['data'] = "";
- return $data;
-}
-function getRPCResponse($result)
-{
- if (isset($result['result'])) {
- return $result['result'];
- } else {
- throw new Exception($result['error']['message']);
- }
-}
-?>
\ No newline at end of file
diff --git a/json_relay_php/TheDAO/proposalCache b/json_relay_php/TheDAO/proposalCache
deleted file mode 100644
index 09acd51240..0000000000
--- a/json_relay_php/TheDAO/proposalCache
+++ /dev/null
@@ -1,50 +0,0 @@
-[
- {
- "proposalID": 0,
- "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- },
- {
- "proposalID": 1,
- "data": "0x00000000000000000000000013680fa2a60fd551894199f009cca20fb63a3e3100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000005752dfcb00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000f8fc53d03003f6ba1cf65bcbd73238e12045d5c8c92abe6e551cf186bf483ba20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000013a4f55f4ef9caff9630000000000000000000000000000000000000000000000b1caeac491501b8caf00000000000000000000000013680fa2a60fd551894199f009cca20fb63a3e310000000000000000000000000000000000000000000000000000000000000000"
- },
- {
- "proposalID": 2,
- "data": "0x000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c1894130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000575c47ed0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000008fc31bd95397edcaa43fbfee1f3552b4d55f8125dea525a959527bb819331410000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d346aba9d39c14949f0000000000000000000000000000000000000000000001d0d16fbc22a43c11190000000000000000000000005a8e70f2d75c1468db4a2241fdd70e5a84f028b80000000000000000000000000000000000000000000000000000000000000016446f20796f752062656c6965766520696e20676f643f00000000000000000000"
- },
- {
- "proposalID": 3,
- "data": "0x000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c1894130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000575c53e40000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000008fc31bd95397edcaa43fbfee1f3552b4d55f8125dea525a959527bb819331410000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000099b9b45fe2013466c100000000000000000000000000000000000000000000019fa0b4d092eda96f6d00000000000000000000000066756ae3ebe94cd4e5e95846fceefcd4f69f8a8d000000000000000000000000000000000000000000000000000000000000005e53686f756c642063757261746f7273206f6e6c792077686974656c6973742070726f6a656374732074686174206172652072656c6174656420746f2044414f20736563757269747920666f7220746865206e6578742034207765656b733f0000"
- },
- {
- "proposalID": 4,
- "data": "0x0000000000000000000000003d5507b53d1613d8491a606ecf5c9268301095dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000575324f800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000a4c212a943e73926a115f13aadb145ec1a0c78bda83f72a3f0319a2f9cc78b7b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000002dca8015bfae0e3550000000000000000000000000000000000000000000000b3df48ee999fb9abf90000000000000000000000003d5507b53d1613d8491a606ecf5c9268301095dd000000000000000000000000000000000000000000000000000000000000000573706c6974000000000000000000000000000000000000000000000000000000"
- },
- {
- "proposalID": 5,
- "data": "0x000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c1894130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000575c67160000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000008fc31bd95397edcaa43fbfee1f3552b4d55f8125dea525a959527bb819331410000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b73f3ce42e3864fb2e80000000000000000000000000000000000000000000000f7af632a874ae5edb0000000000000000000000000d68ba7734753e2ee54103116323aba2d94c78dc500000000000000000000000000000000000000000000000000000000000000d64d6f7261746f7269756d206f6e2070726f706f73616c7320756e74696c207468652044414f20636f6e74726163742069732075706772616465642028766961206e6577436f6e74726163742070726f706f73616c292c20666978696e67206d6f737420736572696f757320697373756573207769746820766f74696e6720616e642073706c697474696e672e2046756e64732063616e206265206d6f76656420746f20746865206e657720636f6e7472616374206772616475616c6c792c20766961206d756c7469706c652070726f706f73616c732e00000000000000000000"
- },
- {
- "proposalID": 6,
- "data": "0x000000000000000000000000beb0b93c01297146782a5581370489a36b24deca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000575cda00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002a0f2c427931f0794938d011a4e18d9f380ffd2e18370dc5c3c49f064821a7b8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000046b2f1cf07c000000000000000000000000000000000000000000000000018b05d2056088272f7000000000000000000000000beb0b93c01297146782a5581370489a36b24deca000000000000000000000000000000000000000000000000000000000000005e4f726967696e616c20696e74656e742c206e6f6e2d696e74657276656e74696f6e6973742063757261746f722e202053706c697420746f20726573746f7265206e6f6e6a7564676d656e74616c20726f6c65206f662063757261746f722e0000"
- },
- {
- "proposalID": 7,
- "data": "0x000000000000000000000000e82d5b10ad98d34df448b07a5a62c1affbef758f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000005753b8c10000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000099245eafab8c40ada04db31e08b13e6404e6bc40831ebddcdf232310ee492b7700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000038c26fa20f3778d0a8000000000000000000000000000000000000000000000017eb41216612848400000000000000000000000000e82d5b10ad98d34df448b07a5a62c1affbef758f000000000000000000000000000000000000000000000000000000000000000e4c65617665206d6520616c6f6e65000000000000000000000000000000000000"
- },
- {
- "proposalID": 8,
- "data": "0x000000000000000000000000a72ded5c1122312d9f4ed66bf4a396139eadaf56000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000057541e3400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000dc92ad24ee3e108534ecbb79ba16ebd651ad9d8b8c6d4dac7a3e159418f4d91c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000003635c952d2ce25c0000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000a72ded5c1122312d9f4ed66bf4a396139eadaf560000000000000000000000000000000000000000000000000000000000000000"
- },
- {
- "proposalID": 9,
- "data": "0x000000000000000000000000228d29ea776cb17ca0db0538562ecaacdc0a9e46000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000057542248000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008dbf047ec1ff4e0bfeb7093bfb7a5f013f0ec124f0bcc47802a45ea2c57c0f14000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000005a1e15e2e12c782e8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000228d29ea776cb17ca0db0538562ecaacdc0a9e460000000000000000000000000000000000000000000000000000000000000000"
- },
- {
- "proposalID": 10,
- "data": "0x000000000000000000000000374139a05ac55917badd3f934f1b93f5c8623ded000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000057543b09000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000005598d27116f00a902daf36ffc951e138e31d5db032bed3f8731d2a7c9483d9ea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000006788b7ce39cb57000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000374139a05ac55917badd3f934f1b93f5c8623ded0000000000000000000000000000000000000000000000000000000000000000"
- },
- {
- "proposalID": 11,
- "data": "0x000000000000000000000000da4a4626d3e16e094de3225a751aab7128e9652600000000000000000000000000000000000000000000010f0cf064dd59200000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000575dce9900000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000fcf2b1513095a22f504f28ea05308493e97babc2cb8c1d2cc6200c6a6dd1949e0000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000071744de37e18561c508082ea27aee707190c429b000000000000000000000000000000000000000000000000000000000000004c43757261746f72732c20706c65617365206869726520736f6d65626f647920746f20666978207468652044414f20636f646520616e6420616c6c6f77206d6f726520726563697069656e74730000000000000000000000000000000000000000"
- }
-]
\ No newline at end of file
diff --git a/json_relay_php/api.php b/json_relay_php/api.php
deleted file mode 100644
index 872f453514..0000000000
--- a/json_relay_php/api.php
+++ /dev/null
@@ -1,124 +0,0 @@
-eth_estimateGas($txobj));
- }
- catch (exception $e) {
- $data['error'] = true;
- $data['msg'] = $e->getMessage();
- }
- return json_encode($data);
-}
-function getEthCall($txobj, $gethRPC){
- $data = getDefaultResponse();
- try {
- $data['data'] = getRPCResponse($gethRPC->eth_call($txobj,
- "pending"));
- }
- catch (exception $e) {
- $data['error'] = true;
- $data['msg'] = $e->getMessage();
- }
- return json_encode($data);
-}
-function getTransactionData($addr, $gethRPC){
- $data = getDefaultResponse();
- try {
- $addr = formatAddress($addr);
- $balance = getRPCResponse($gethRPC->eth_getBalance($addr,
- "pending"));
- $nonce = getRPCResponse($gethRPC->eth_getTransactionCount($addr,
- "pending"));
- $gasprice = getRPCResponse($gethRPC->eth_gasPrice());
- $balance=bchexdec($balance);
- $tarr['address'] = $addr;
- $tarr['balance'] = $balance;
- $tarr['nonce'] = $nonce;
- $tarr['gasprice'] = $gasprice;
- $data['data'] = $tarr;
- }
- catch (exception $e) {
- $data['error'] = true;
- $data['msg'] = $e->getMessage();
- }
- return json_encode($data);
-}
-function getBalance($addr, $gethRPC)
-{
- $data = getDefaultResponse();
- try {
- $addr = formatAddress($addr);
- $balancehex = getRPCResponse($gethRPC->eth_getBalance($addr,
- "pending"));
- $balance=bchexdec($balancehex);
- $tarr['address'] = $addr;
- $tarr['balance'] = $balance;
- $tarr['balancehex'] = $balancehex;
- $data['data'] = $tarr;
- }
- catch (exception $e) {
- $data['error'] = true;
- $data['msg'] = $e->getMessage();
- }
- return json_encode($data);
-}
-function getRPCResponse($result){
- if(isset($result['result'])){
- return $result['result'];
- } else {
- throw new Exception($result['error']['message']);
- }
-}
-function sendRawTransaction($rawtx,$gethRPC){
- $data = getDefaultResponse();
- try {
- $data['data'] = getRPCResponse($gethRPC->eth_sendRawTransaction($rawtx));
- }
- catch (exception $e) {
- $data['error'] = true;
- $data['msg'] = $e->getMessage();
- }
- return json_encode($data);
-}
-function formatAddress($addr){
- if (substr($addr, 0, 2) == "0x")
- return $addr;
- else
- return "0x".$addr;
-}
-function getDefaultResponse(){
- $data['error'] = false;
- $data['msg'] = "";
- $data['data'] = "";
- return $data;
-}
-function bchexdec($hex)
-{
- $dec = 0;
- $len = strlen($hex);
- for ($i = 1; $i <= $len; $i++) {
- $dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i))));
- }
- return $dec;
-}
-?>
\ No newline at end of file
diff --git a/json_relay_php/index.html b/json_relay_php/index.html
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/json_relay_php/libs/jsonRPCClient.php b/json_relay_php/libs/jsonRPCClient.php
deleted file mode 100644
index 38cf29ced1..0000000000
--- a/json_relay_php/libs/jsonRPCClient.php
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-This file is part of JSON-RPC PHP.
-
-JSON-RPC PHP is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-JSON-RPC PHP is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with JSON-RPC PHP; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/**
- * The object of this class are generic jsonRPC 1.0 clients
- * http://json-rpc.org/wiki/specification
- *
- * @author sergio
- */
-class jsonRPCClient {
-
- /**
- * Debug state
- *
- * @var boolean
- */
- private $debug;
-
- /**
- * The server URL
- *
- * @var string
- */
- private $url;
- /**
- * The request id
- *
- * @var integer
- */
- private $id;
- /**
- * If true, notifications are performed instead of requests
- *
- * @var boolean
- */
- private $notification = false;
-
- /**
- * Takes the connection parameters
- *
- * @param string $url
- * @param boolean $debug
- */
- public function __construct($url,$debug = false) {
- // server URL
- $this->url = $url;
- // proxy
- empty($proxy) ? $this->proxy = '' : $this->proxy = $proxy;
- // debug state
- empty($debug) ? $this->debug = false : $this->debug = true;
- // message id
- $this->id = 1;
- }
-
- /**
- * Sets the notification state of the object. In this state, notifications are performed, instead of requests.
- *
- * @param boolean $notification
- */
- public function setRPCNotification($notification) {
- empty($notification) ?
- $this->notification = false
- :
- $this->notification = true;
- }
-
- /**
- * Performs a jsonRCP request and gets the results as an array
- *
- * @param string $method
- * @param array $params
- * @return array
- */
- public function __call($method,$params) {
-
- // check
- if (!is_scalar($method)) {
- throw new Exception('Method name has no scalar value');
- }
-
- // check
- if (is_array($params)) {
- // no keys
- $params = array_values($params);
- } else {
- throw new Exception('Params must be given as array');
- }
-
- // sets notification or request task
- if ($this->notification) {
- $currentId = NULL;
- } else {
- $currentId = $this->id;
- }
-
- // prepares the request
- $request = array(
- 'method' => $method,
- 'params' => $params,
- 'id' => $currentId
- );
- $request = json_encode($request);
- $this->debug && $this->debug.='***** Request *****'."\n".$request."\n".'***** End Of request *****'."\n\n";
-
- // performs the HTTP POST
- $opts = array ('http' => array (
- 'method' => 'POST',
- 'header' => 'Content-type: application/json',
- 'content' => $request
- ));
- $context = stream_context_create($opts);
- if ($fp = fopen($this->url, 'r', false, $context)) {
- $response = '';
- while($row = fgets($fp)) {
- $response.= trim($row)."\n";
- }
- $this->debug && $this->debug.='***** Server response *****'."\n".$response.'***** End of server response *****'."\n";
- $response = json_decode($response,true);
- } else {
- throw new Exception('Unable to connect to '.$this->url);
- }
-
- // debug output
- if ($this->debug) {
- echo nl2br($debug);
- }
-
- // final checks and return
- if (!$this->notification) {
- // check
- if ($response['id'] != $currentId) {
- throw new Exception('Incorrect response id (request id: '.$currentId.', response id: '.$response['id'].')');
- }
-
- return $response;
-
- } else {
- return true;
- }
- }
-}
-?>
\ No newline at end of file