From b6157d3cb07027d0197ae4e5af7a908681ba29bd Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Mon, 8 Jul 2019 16:20:25 +0200 Subject: [PATCH 1/2] Fix in3/web3 example in README --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fb3396a..ea3cdd9 100644 --- a/README.md +++ b/README.md @@ -32,18 +32,24 @@ npm install --save in3 // import in3-Module import In3Client from 'in3' -import * as web3 from 'web3' +const Web3 = require('web3'); // use the In3Client as Http-Provider const web3 = new Web3(new In3Client({ - proof : 'standard', - signatureCount: 1, - requestCount : 2, - chainId : 'mainnet' + proof: 'standard', + signatureCount: 1, + requestCount: 2, + chainId: 'mainnet' }).createWeb3Provider()) // use the web3 -const block = await web.eth.getBlockByNumber('latest') +async function main() { + // Check Vitalik's networth. + const block = await web3.eth.getBlock('latest'); + console.log(block); +} + +main(); ... From 2bbc91be2f295b52c50ecbb39580787b83eb3b7b Mon Sep 17 00:00:00 2001 From: ielashi Date: Mon, 8 Jul 2019 16:23:40 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ea3cdd9..cf863c6 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ const web3 = new Web3(new In3Client({ // use the web3 async function main() { - // Check Vitalik's networth. const block = await web3.eth.getBlock('latest'); console.log(block); } @@ -328,4 +327,4 @@ services: - --auto-update=none # do not automatically update the client - --pruning=archive - --pruning-memory=30000 # limit storage -``` \ No newline at end of file +```