-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(quorum/api): use Web3 HTTP Provider by default (#66)
* fix(quorum/api): use Web3 HTTP Provider by default It is deprecated because it does not support subscriptions, but we do not use that feature anyway and just need the examples to work so it seems like an okay trade-off to use HTTP instead of WS. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> * fix(quorum/platform): RPC API in docker-compose Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> * fix(quorum/platform): opens port 8545 on node1 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> * fix(quorum/platform): ports in config.js, .env Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information
Showing
4 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
const Web3 = require('web3'); | ||
const config = require('../config/config'); | ||
|
||
const option = `ws://${config.web3.host[`${process.platform}`]}:${config.web3.port}`; | ||
const web3 = new Web3(option); | ||
|
||
const rpcApiHost = `http://${config.web3.host[`${process.platform}`]}:${config.web3.rpcPort}`; | ||
const web3Provider = new Web3.providers.HttpProvider(rpcApiHost); | ||
const web3 = new Web3(web3Provider); | ||
web3.eth.defaultAccount = config.web3.ethKey; | ||
|
||
module.exports = web3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters