Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify ways to communicate by RPC channel #61

Open
akolotov opened this issue Aug 10, 2018 · 0 comments
Open

Unify ways to communicate by RPC channel #61

akolotov opened this issue Aug 10, 2018 · 0 comments
Labels
enhancement New feature or request low priority

Comments

@akolotov
Copy link
Collaborator

At this moment there are two ways in the code to call JSON-RPC methods on the Ethereum node (web3 provider) side.

The first way is to call web3 functionality through the web3 object. Example,

https://github.com/poanetwork/bridge-nodejs/blob/c71f4a41b8616d4f158604874cc5cd9616d5e481/src/tx/web3.js#L1-L7

Another way is to send JSON REST query directly to the node:

https://github.com/poanetwork/bridge-nodejs/blob/c71f4a41b8616d4f158604874cc5cd9616d5e481/src/tx/sendTx.js#L38-L57

As it was discussed here: #28 (comment) it is possible to use the web3 object for all kind of operations. It could simplify some things especially the functionality to support failover RPC URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

1 participant