feature(node): ERC20 and ETH support#2325
Merged
Merged
Conversation
e6e485b to
5f5eae6
Compare
Merged
Can now sync ETH and get wallet history for ERC20 tokens
5f5eae6 to
d08ea9d
Compare
justinkook
suggested changes
Aug 15, 2019
justinkook
reviewed
Aug 16, 2019
ETH blocks were using the BTC transforms, fixed that
| stream: res | ||
| }; | ||
| return ChainStateProvider.streamMissingWalletAddresses(payload); | ||
| return await ChainStateProvider.streamMissingWalletAddresses(payload); |
Member
There was a problem hiding this comment.
if this is streaming why does it await?
| res | ||
| }; | ||
| return ChainStateProvider.streamWalletAddresses(payload); | ||
| return await ChainStateProvider.streamWalletAddresses(payload); |
Member
There was a problem hiding this comment.
if this is streaming why does it await?
| let { chain, network } = req.params; | ||
| try { | ||
| return ChainStateProvider.streamWalletTransactions({ | ||
| return await ChainStateProvider.streamWalletTransactions({ |
Member
There was a problem hiding this comment.
if this is streaming why does it await?
Contributor
Author
There was a problem hiding this comment.
So interesting thing I learned. If there's a throw inside of an async method that streams, then you'll get an unhandled promise rejection if you don't await that method.
micahriggan
commented
Aug 23, 2019
|
|
||
| onConnect() { | ||
| super.onConnect(); | ||
| this.collection.createIndex({ chain: 1, network: 1, to: 1 }, { background: true }); |
002b129 to
e12cc24
Compare
e12cc24 to
a031a9b
Compare
justinkook
reviewed
Aug 26, 2019
| if (!initialSyncComplete) { | ||
| return; | ||
| } | ||
| let prunedTxs = {}; |
Contributor
There was a problem hiding this comment.
fix pruneTxs always empty object
2e33d95 to
e9bec10
Compare
3c73bb3 to
478ea8d
Compare
1002638 to
f8dac47
Compare
f8dac47 to
38081bf
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Can now sync ETH and get wallet history for ERC20 tokens
Refactoring currency support into a module system. This allows the creation of 3rd party modules, and arbitrary currency support without forking.
ETH Syncing via
Testing
I've been testing with this local development node
alias parity-dev="/Users/micah/blockchains/eth/parity2.4.2 --config dev --base-path '/Users/micah/blockchains/eth/dev' --db-compaction ssd --cache-size 8192 --jsonrpc-cors=all --ws-origins=all --ws-apis=all"and this private key
0x4d5db4107d237df6a3d58ee5f70ae63d73d7658d4026f2eefd2f204c81682cb7imported into metamask