Skip to content

Conversation

@zkToha
Copy link
Collaborator

@zkToha zkToha commented May 7, 2019

This fixes #188

  • More convenience methods
  • Fixed some errors
  • No need to write delay between connection and subscribing

@zkToha zkToha merged commit e17d6b1 into develop May 7, 2019
@barrasso
Copy link
Contributor

barrasso commented May 7, 2019

Hey @BaldyAsh, I got the pending transactions socket working, and it lists ALL pending transactions.

Is there a specific method that will get pending transactions for ONE specific address?

I've already tried both of these:

try! socketProvider!.setFilterAndGetChanges(method: .newFilter, address: EthereumAddress(address)!, fromBlock: .earliest, toBlock: .latest, topics: nil)
try! socketProvider!.subscribeOnLogs(addresses: [EthereumAddress(address)!], topics: nil)

@zkToha
Copy link
Collaborator Author

zkToha commented May 8, 2019

Hi @barrasso . Seems it isn't possible with Infura. Its eth_newPendingTransactionFilter and newPendingTransactions subscription do not use additional parameters. Some contracts have logs that indicate that the contract had received some tx and you can use them to get txs notifications

@barrasso
Copy link
Contributor

barrasso commented May 9, 2019

OK @BaldyAsh. Is there a way to get a balance update for a given address?

I see there is a way to get this with parity_subscribe like so:

// subscribe to eth_getBalance
>{"jsonrpc":"2.0", "id":1, "method":"parity_subscribe", "params":["eth_getBalance",["0x004702bdcC3C7dbFfd943136107E70B827028600", "latest"]]}

@zkToha
Copy link
Collaborator Author

zkToha commented May 10, 2019

@barrasso Infura supports parity_subscribe only on the Kovan network

@zkToha zkToha deleted the websocketsFix branch February 23, 2020 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SocketProvider does not receive messages

3 participants