Tengo una cuenta de Infura y tengo el siguiente código:
...
web3 = Web3(HTTPProvider("https://ropsten.infura.io/mytoken") )
web3_pending_filter = web3.eth.filter('pending')
...
cuando se web3_pending_filter = web3.eth.filter('pending')
ejecuta la línea, aparece el error:
solicitudes.excepciones.HTTPError: 405 Error del cliente: método no permitido para la URL: https://ropsten.infura.io/mytoken
¿Cómo puedo solucionar este problema?
Infura no admite filtros.
Según https://api.infura.io/v1/jsonrpc/ropsten/methods (de la documentación , estos son los métodos compatibles:
{
"get": [
"web3_clientVersion",
"net_version",
"net_listening",
"net_peerCount",
"eth_protocolVersion",
"eth_syncing",
"eth_mining",
"eth_hashrate",
"eth_gasPrice",
"eth_accounts",
"eth_blockNumber",
"eth_getBalance",
"eth_getStorageAt",
"eth_getTransactionCount",
"eth_getBlockTransactionCountByHash",
"eth_getBlockTransactionCountByNumber",
"eth_getUncleCountByBlockHash",
"eth_getUncleCountByBlockNumber",
"eth_getCode",
"eth_call",
"eth_estimateGas",
"eth_getBlockByHash",
"eth_getBlockByNumber",
"eth_getTransactionByHash",
"eth_getTransactionByBlockHashAndIndex",
"eth_getTransactionByBlockNumberAndIndex",
"eth_getTransactionReceipt",
"eth_getUncleByBlockHashAndIndex",
"eth_getUncleByBlockNumberAndIndex",
"eth_getCompilers",
"eth_getLogs",
"eth_getWork"
],
"post": [
"eth_sendRawTransaction",
"eth_call",
"eth_estimateGas",
"eth_submitWork",
"eth_submitHashrate"
]
}