Skip to content

Commit 8a75067

Browse files
committed
Exact dependency from zeppelin 1.4 and truffle 4.0.1 && Readme Updated
1 parent 2bc61d7 commit 8a75067

File tree

2 files changed

+9
-119
lines changed

2 files changed

+9
-119
lines changed

README.md

Lines changed: 6 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -20,122 +20,12 @@ npm install
2020

2121
### Test
2222

23-
24-
25-
### Parity
26-
**Parity requires Rust version 1.19.0 to build**
27-
- Linux:
28-
```bash
29-
$ curl https://sh.rustup.rs -sSf | sh
30-
```
31-
32-
Parity also requires `gcc`, `g++`, `libssl-dev`/`openssl`, `libudev-dev` and `pkg-config` packages to be installed.
33-
- OSX:
34-
```bash
35-
$ curl https://sh.rustup.rs -sSf | sh
36-
```
37-
38-
##### Download and build Parity
39-
40-
```bash
41-
# download Parity code
42-
$ git clone https://github.com/paritytech/parity
43-
$ cd parity
44-
45-
# build in release mode
46-
$ cargo build --release
47-
```
48-
49-
This will produce an executable in the `./target/release` subdirectory.
50-
Note: if cargo fails to parse manifest try:
51-
52-
```bash
53-
$ ~/.cargo/bin/cargo build --release
54-
```
55-
56-
#### Start Parity
57-
To start Parity manually, just run
58-
```bash
59-
$ ./target/release/parity
60-
```
61-
and Parity will begin syncing the Ethereum blockchain.
62-
63-
##### Hint
64-
Add parity to your command list:
65-
```bash
66-
cp /target/release/parity /usr/local/bin
67-
```
68-
69-
## Usage
70-
71-
You can choose of using web3 with Python and Javascript
72-
73-
Python
74-
----------
75-
76-
Install web3
77-
78-
`pip install web3`
79-
80-
Using Web3
81-
82-
To use the web3 library you will need to instantiate an instance of the
83-
``Web3`` object.
84-
85-
86-
>>> from web3 import Web3, HTTPProvider, IPCProvider
87-
88-
# Note that you should create only one RPCProvider per
89-
# process, as it recycles underlying TCP/IP network connections between
90-
# your process and Ethereum node
91-
>>> web3 = Web3(HTTPProvider('http://localhost:8545'))
92-
93-
# or for an IPC based connection
94-
>>> web3 = Web3(IPCProvider())
95-
>>> web3.eth.blockNumber
96-
4000000
97-
98-
99-
This ``web3`` instance will now allow you to interact with the Ethereum
100-
blockchain.
101-
102-
103-
Javascript
104-
----------
105-
106-
`npm i -s web3`
107-
108-
Create in /app folder an index.js file
109-
110-
Use the `web3` object directly from global namespace:
111-
112-
```js
113-
console.log(web3); // {eth: .., shh: ...} // it's here!
114-
```
115-
116-
Set a provider (HttpProvider)
117-
118-
```js
119-
if (typeof web3 !== 'undefined') {
120-
web3 = new Web3(web3.currentProvider);
121-
} else {
122-
// set the provider you want from Web3.providers
123-
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
124-
}
125-
```
126-
127-
Set a provider (HttpProvider using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication))
128-
129-
```js
130-
web3.setProvider(new web3.providers.HttpProvider('http://host.url', 0, BasicAuthUsername, BasicAuthPassword));
131-
```
132-
133-
There you go, now you can use it:
134-
135-
```js
136-
var coinbase = web3.eth.coinbase;
137-
var balance = web3.eth.getBalance(coinbase);
23+
```bash
24+
npm run test
13825
```
13926

140-
You can find more examples in [`example`](https://github.com/ethereum/web3.js/tree/master/example) directory.
27+
or
14128

29+
```bash
30+
truffle test
31+
```

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"test": "test"
88
},
99
"scripts": {
10-
"test": "truffle test"
10+
"test": "node_modules/.bin/truffle test"
1111
},
1212
"author": "tiero",
1313
"license": "MIT",
1414
"dependencies": {
15-
"truffle": "^4.0.1",
15+
"truffle": "4.0.1",
1616
"truffle-hdwallet-provider": "0.0.3",
17-
"zeppelin-solidity": "^1.4.0"
17+
"zeppelin-solidity": "1.4.0"
1818
},
1919
"devDependencies": {
2020
"chai": "^4.1.2",

0 commit comments

Comments
 (0)