Open fwhappy opened 1 year ago
There is eth_getAccountPendingTransactions
to do the job. You could check the core space document cfx_getaccountpendingtransactions for its usage since they are almost the same except the address format.
@peilun-conflux
I saw this message in release v2.2.2 change logs
_Add filter RPCs for cfx core space (including cfx_newFilter, cfx_newBlockFilter, cfx_newPendingTransactionFilter, cfx_getFilterChanges, cfx_getFilterLogs, and cfx_uninstallFilter).
How can i use cfx_newPendingTransactionFilter and cfx_getFilterChanges,
You should be able to call them directly from the core space RPC endpoint of a running v2.2.2
node.
BTW, I just realize that eth_newPendingTransactionFilter
has been supported on the node. Are you accessing them from your local node?
@fwhappy
Hi, you can try the eSpace filter API through our confura
service:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params":[],"id":73}' -H "Content-Type: application/json" https://evm.confluxrpc.com
Please be minded core space filter API support with Confura is still under progress, so you might have to try with you local node.
Yes, I'm running a full Node.
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params":[],"id":73}' -H "Content-Type: application/json" http://127.0.0.1:8545
{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found"},"id":73}
Is the local full node not supported yet?
@peilun-conflux @wanliqun
My conflux version: Current Version: conflux-rust/v2.2.2-c30c359-20230314/x86_64-linux-gnu/rustc1.62.0
Is there an error config in my hydra.toml ?
@peilun-conflux @wanliqun
Add filter RPCs in eSpace including eth_newFilter, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_getFilterChanges, eth_getFilterLogs, eth_uninstallFilter. Note that you need to set poll_lifetime_in_seconds in the configuration to enable these RPCs.
I found this in v2.2.0 release logs.
But what does "poll_lifetime_in_seconds" means, and how value should i set?
@fwhappy
yes, you should config poll_lifetime_in_seconds
to some non-zero time duration to turn on the filter API. You can config this parameter like tcp timeout as how long the established filter shall persist if no polling action in that time.
@wanliqun
Thanks a lot, My full node is already working.
I had two other questions
eth_newPendingTransactionFilter eth_newPendingTransactions
Neither of these two methods is supported