Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Cleaning up polluted namespaces #3143

Merged
merged 44 commits into from
Nov 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
dcc5dc7
Renaming ethcore_ to parity_
Nov 2, 2016
571a1e3
Renaming files
Nov 2, 2016
0a1c3cb
Merge branch 'master' into rpc-rename
Nov 3, 2016
fcffd4e
Renaming poluted EthSigning
Nov 3, 2016
c461d64
Tidy up the namespaces
Nov 3, 2016
369b681
Renaming files to match new structure
Nov 3, 2016
8400dc8
Splitting EthSigning into separate traits
Nov 3, 2016
9981196
Merge branch 'master' into rpc-rename
gavofyork Nov 5, 2016
1d0a5e3
jsapi move ethcore.* -> parity.*
jacogr Nov 5, 2016
84e870a
Move jsonrpc parity definitions
jacogr Nov 5, 2016
954062a
Update UI API calls for parity interfaces
jacogr Nov 5, 2016
6d707bd
Move jsapi signer interfaces from personal to signer
jacogr Nov 5, 2016
20a8c03
Update UI to use signer.* where applicable
jacogr Nov 5, 2016
d2e0cc2
Updsate jsapi subscriptions for signer
jacogr Nov 5, 2016
c45337d
Fix dodgy merge.
gavofyork Nov 5, 2016
5fe619d
Merge branch 'rpc-rename' of github.com:ethcore/parity into rpc-rename
gavofyork Nov 5, 2016
662a0b3
Update README.
gavofyork Nov 5, 2016
1b27fab
Fix some tests.
gavofyork Nov 5, 2016
a59b363
Move parity-only personal.* to parity.*
jacogr Nov 5, 2016
0b47d28
Update UI for personal -> parity API moves
jacogr Nov 5, 2016
75a52fe
Update subscription APIs after personal -> parity move
jacogr Nov 5, 2016
e0dd71e
Merge branch 'master' into rpc-rename
jacogr Nov 5, 2016
43b5000
personal. generateAuthorizationToken -> parity. generateAuthorization…
jacogr Nov 5, 2016
329f382
enode, dappsPort & signerPort (UI)
jacogr Nov 5, 2016
0adfad7
Update subscription tests (accountsInfo)
jacogr Nov 5, 2016
8008fdb
subscription update
jacogr Nov 5, 2016
bb10e53
personal -> parity
gavofyork Nov 5, 2016
24e3979
Additional error logging on method failures
jacogr Nov 5, 2016
83bed61
Merge branch 'rpc-rename' of github.com:ethcore/parity into rpc-rename
gavofyork Nov 5, 2016
774a2c8
move postTransaction to parity
jacogr Nov 5, 2016
6fce773
Additional debug info with method failures
jacogr Nov 5, 2016
cdfd271
Fix personal tests.
gavofyork Nov 5, 2016
a574007
Merge branch 'rpc-rename' of github.com:ethcore/parity into rpc-rename
gavofyork Nov 5, 2016
16d24b3
Console wrning shows parameters, error object does not
jacogr Nov 5, 2016
776768e
Include parity_ signing methods.
gavofyork Nov 5, 2016
6176518
Merge branch 'rpc-rename' of github.com:ethcore/parity into rpc-rename
gavofyork Nov 5, 2016
6be0a45
Console log http transport info
jacogr Nov 5, 2016
99f483b
Fix failing tests
jacogr Nov 5, 2016
03d4d7c
Add RPC stubs for parity_accounts.
gavofyork Nov 5, 2016
862e21a
Merge branch 'rpc-rename' of github.com:ethcore/parity into rpc-rename
gavofyork Nov 5, 2016
1260b76
Allow some secure built-in dapps
jacogr Nov 5, 2016
1a0a1c1
Use parity_accounts in place of accountsInfo
jacogr Nov 6, 2016
b520e7b
Improve error reporting
jacogr Nov 6, 2016
34eab92
Cleanup GHH error handling
jacogr Nov 6, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# [Parity](https://ethcore.io/parity.html)
### Fast, light, and robust Ethereum implementation

[![Join the chat at https://gitter.im/ethcore/parity.js](https://badges.gitter.im/ethcore/parity.js.svg)](https://gitter.im/ethcore/parity.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status][travis-image]][travis-url] [![build status](https://gitlab.ethcore.io/Mirrors/ethcore-parity/badges/master/build.svg)](https://gitlab.ethcore.io/Mirrors/ethcore-parity/commits/master) [![Coverage Status][coveralls-image]][coveralls-url] [![GPLv3][license-image]][license-url]

[![Build Status][travis-image]][travis-url] [![build status](https://gitlab.ethcore.io/Mirrors/ethcore-parity/badges/master/build.svg)](https://gitlab.ethcore.io/Mirrors/ethcore-parity/commits/master) [![Coverage Status][coveralls-image]][coveralls-url] [![Join the chat at https://gitter.im/ethcore/parity][gitter-image]][gitter-url] [![GPLv3][license-image]][license-url]
### Join the chat!

Parity [![Join the chat at https://gitter.im/ethcore/parity][gitter-image]][gitter-url] and
parity.js [![Join the chat at https://gitter.im/ethcore/parity.js](https://badges.gitter.im/ethcore/parity.js.svg)](https://gitter.im/ethcore/parity.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[Internal Documentation][doc-url]

Expand All @@ -21,7 +24,7 @@ Be sure to check out [our wiki][wiki-url] for more information.
[doc-url]: https://ethcore.github.io/parity/ethcore/index.html
[wiki-url]: https://github.com/ethcore/parity/wiki

**Requires Rust version 1.12.0 to build**
**Parity requires Rust version 1.12.0 to build**

----

Expand All @@ -31,12 +34,15 @@ Be sure to check out [our wiki][wiki-url] for more information.
Parity's goal is to be the fastest, lightest, and most secure Ethereum client. We are developing Parity using the sophisticated and
cutting-edge Rust programming language. Parity is licensed under the GPLv3, and can be used for all your Ethereum needs.

By default, Parity will run a JSONRPC server on `127.0.0.1:8545`. This is fully configurable and supports a number
of RPC APIs.
Parity comes with a built-in wallet. To access [Parity Wallet](http://127.0.0.1:8080/) this simply go to http://127.0.0.1:8080/. It
includes various functionality allowing you to:
- create and manage your Ethereum accounts;
- manage your Ether and any Ethereum tokens;
- create and register your own tokens;
- and much more.

Parity also runs a server for running decentralized apps, or "Dapps", on `http://127.0.0.1:8080`.
This includes a few useful Dapps, including Ethereum Wallet, Maker OTC, and a node status page.
In a near-future release, it will be easy to install Dapps and use them through this web interface.
By default, Parity will also run a JSONRPC server on `127.0.0.1:8545`. This is fully configurable and supports a number
of RPC APIs.

If you run into an issue while using parity, feel free to file one in this repository
or hop on our [gitter chat room][gitter-url] to ask a question. We are glad to help!
Expand Down
3 changes: 2 additions & 1 deletion js/src/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ APIs implement the calls as exposed in the [Ethcore JSON Ethereum RPC](https://g

- [ethapi.db](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#db)
- [ethapi.eth](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#eth)
- [ethapi.ethcore](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#ethcore)
- [ethapi.parity](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#parity)
- [ethapi.net](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#net)
- [ethapi.personal](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#personal)
- [ethapi.shh](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#shh)
- [ethapi.signer](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#signer)
- [ethapi.trace](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#trace)
- [ethapi.web3](https://github.com/ethcore/ethereum-rpc-json/blob/master/interfaces.md#web3)

Expand Down
13 changes: 9 additions & 4 deletions js/src/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { Http, Ws } from './transport';
import Contract from './contract';

import { Db, Eth, Ethcore, Net, Personal, Shh, Trace, Web3 } from './rpc';
import { Db, Eth, Parity, Net, Personal, Shh, Signer, Trace, Web3 } from './rpc';
import Subscriptions from './subscriptions';
import util from './util';
import { isFunction } from './util/types';
Expand All @@ -32,10 +32,11 @@ export default class Api {

this._db = new Db(transport);
this._eth = new Eth(transport);
this._ethcore = new Ethcore(transport);
this._net = new Net(transport);
this._parity = new Parity(transport);
this._personal = new Personal(transport);
this._shh = new Shh(transport);
this._signer = new Signer(transport);
this._trace = new Trace(transport);
this._web3 = new Web3(transport);

Expand All @@ -50,8 +51,8 @@ export default class Api {
return this._eth;
}

get ethcore () {
return this._ethcore;
get parity () {
return this._parity;
}

get net () {
Expand All @@ -66,6 +67,10 @@ export default class Api {
return this._shh;
}

get signer () {
return this._signer;
}

get trace () {
return this._trace;
}
Expand Down
6 changes: 3 additions & 3 deletions js/src/api/contract/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default class Contract {
options.gas = gas.toFixed(0);

setState({ state: 'postTransaction', gas });
return this._api.eth.postTransaction(this._encodeOptions(this.constructors[0], options, values));
return this._api.parity.postTransaction(this._encodeOptions(this.constructors[0], options, values));
})
.then((requestId) => {
setState({ state: 'checkRequest', requestId });
Expand Down Expand Up @@ -166,7 +166,7 @@ export default class Contract {
}

_pollCheckRequest = (requestId) => {
return this._api.pollMethod('eth_checkRequest', requestId);
return this._api.pollMethod('parity_checkRequest', requestId);
}

_pollTransactionReceipt = (txhash, gas) => {
Expand Down Expand Up @@ -208,7 +208,7 @@ export default class Contract {

if (!func.constant) {
func.postTransaction = (options, values = []) => {
return this._api.eth
return this._api.parity
.postTransaction(this._encodeOptions(func, this._addOptionsTo(options), values));
};

Expand Down
22 changes: 11 additions & 11 deletions js/src/api/contract/contract.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ describe('api/contract/Contract', () => {
before(() => {
scope = mockHttp([
{ method: 'eth_estimateGas', reply: { result: 1000 } },
{ method: 'eth_postTransaction', reply: { result: '0x678' } },
{ method: 'eth_checkRequest', reply: { result: null } },
{ method: 'eth_checkRequest', reply: { result: '0x890' } },
{ method: 'parity_postTransaction', reply: { result: '0x678' } },
{ method: 'parity_checkRequest', reply: { result: null } },
{ method: 'parity_checkRequest', reply: { result: '0x890' } },
{ method: 'eth_getTransactionReceipt', reply: { result: null } },
{ method: 'eth_getTransactionReceipt', reply: { result: RECEIPT_PEND } },
{ method: 'eth_getTransactionReceipt', reply: { result: RECEIPT_DONE } },
Expand All @@ -266,7 +266,7 @@ describe('api/contract/Contract', () => {
});

it('passes the options through to postTransaction (incl. gas calculation)', () => {
expect(scope.body.eth_postTransaction.params).to.deep.equal([
expect(scope.body.parity_postTransaction.params).to.deep.equal([
{ data: '0x123', gas: '0x4b0' }
]);
});
Expand All @@ -280,8 +280,8 @@ describe('api/contract/Contract', () => {
it('fails when gasUsed == gas', () => {
mockHttp([
{ method: 'eth_estimateGas', reply: { result: 1000 } },
{ method: 'eth_postTransaction', reply: { result: '0x678' } },
{ method: 'eth_checkRequest', reply: { result: '0x789' } },
{ method: 'parity_postTransaction', reply: { result: '0x678' } },
{ method: 'parity_checkRequest', reply: { result: '0x789' } },
{ method: 'eth_getTransactionReceipt', reply: { result: RECEIPT_EXCP } }
]);

Expand All @@ -295,8 +295,8 @@ describe('api/contract/Contract', () => {
it('fails when no code was deployed', () => {
mockHttp([
{ method: 'eth_estimateGas', reply: { result: 1000 } },
{ method: 'eth_postTransaction', reply: { result: '0x678' } },
{ method: 'eth_checkRequest', reply: { result: '0x789' } },
{ method: 'parity_postTransaction', reply: { result: '0x678' } },
{ method: 'parity_checkRequest', reply: { result: '0x789' } },
{ method: 'eth_getTransactionReceipt', reply: { result: RECEIPT_DONE } },
{ method: 'eth_getCode', reply: { result: '0x' } }
]);
Expand Down Expand Up @@ -360,15 +360,15 @@ describe('api/contract/Contract', () => {

describe('postTransaction', () => {
beforeEach(() => {
scope = mockHttp([{ method: 'eth_postTransaction', reply: { result: ['hashId'] } }]);
scope = mockHttp([{ method: 'parity_postTransaction', reply: { result: ['hashId'] } }]);
});

it('encodes options and mades an eth_postTransaction call', () => {
it('encodes options and mades an parity_postTransaction call', () => {
return func
.postTransaction({ someExtras: 'foo' }, VALUES)
.then(() => {
expect(scope.isDone()).to.be.true;
expect(scope.body.eth_postTransaction.params[0]).to.deep.equal({
expect(scope.body.parity_postTransaction.params[0]).to.deep.equal({
someExtras: 'foo',
to: ADDR,
data: ENCODED
Expand Down
10 changes: 0 additions & 10 deletions js/src/api/rpc/eth/eth.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ export default class Eth {
.execute('eth_call', inOptions(options), inBlockNumber(blockNumber));
}

checkRequest (requestId) {
return this._transport
.execute('eth_checkRequest', inNumber16(requestId));
}

coinbase () {
return this._transport
.execute('eth_coinbase')
Expand Down Expand Up @@ -267,11 +262,6 @@ export default class Eth {
.execute('eth_pendingTransactions');
}

postTransaction (options) {
return this._transport
.execute('eth_postTransaction', inOptions(options));
}

protocolVersion () {
return this._transport
.execute('eth_protocolVersion');
Expand Down
Loading