web3dart
web3dart copied to clipboard
eth_newFilter does not exist/is not available
i try to listen on some event and i got this error :
RPCError: got code -32601 with msg "The method eth_newFilter does not exist/is not available"
do you have an idea ?
i use the version 2.0.0-dev
in a cli tool.
Thanks for the report. What kind of rpc node are you connecting to (ganache / geth / infura / parity / ...)? Would be interesting to check why that node doesn't support filters or if it provides an alternative api.
infura atm. ok didn't see the event is only in the ws service and not the http one
i got that one
RPCError: got code -32601 with msg "The method eth_newBlockFilter does not exist/is not available".
Kleak, you need to specify ALL of the transaction arguments:
final txnHash = await ethClient.sendTransaction(
credentials1,
Transaction.callContract(
contract: instCtrt,
function: sendFunction,
parameters: [addrUser2, BigInt.from(10)],
from: EthereumAddress.fromHex(addrUser1.hex),
gasPrice: EtherAmount.fromUnitAndValue(EtherUnit.gwei, 20),
maxGas: 100000,
value: EtherAmount.fromUnitAndValue(EtherUnit.wei, 0),
),
chainId: 42,
fetchChainIdFromNetworkId: false,
); // balance1.first, I am using Kovan testnet
i am using web3dart: ^2.0.0-dev, i am trying to call transfer function of erc20 token i get RPCError: got code -32601 with msg "The method eth_uninstallFilter does not exist/is not available i pass all params for callContract as zidzid1234 suggested, still no luck
i tried with Ropsten and Rinkeby, and both give rpc error
however with ganache it works fine
i am using web3dart: ^2.0.0-dev, i am trying to call transfer function of erc20 token i get RPCError: got code -32601 with msg "The method eth_uninstallFilter does not exist/is not available i pass all params for callContract as zidzid1234 suggested, still no luck
i tried with Ropsten and Rinkeby, and both give rpc error
however with ganache it works fine
ok this issue was not due calling contract function, but it was due to :
await _client.addedBlocks().asyncMap((_) => _client.getTransactionReceipt(hash)).firstWhere((receipt) => receipt != null);
as i was trying to find if the tx was mined or not