eth_newFilter RPC Method
Please be aware that the block range limit for this RPC method is 5 blocks for users on the Free Trial plan and 10,000 blocks for those on paid plans. Consider dividing your queries into smaller segments to enhance response times and manage errors more effectively. For further details on the block range limit and strategies for mitigating it, please consult the FAQ
Parámetros
objeto
objeto
Cargando...
fromBlock
cadena
OBLIGATORIO
Cargando...
toBlock
cadena
OBLIGATORIO
Cargando...
dirección
cadena
OBLIGATORIO
Cargando...
temas
cadena
Cargando...
Devoluciones
resultado
Cargando...
Solicitud
1curl https://docs-demo.sei-pacific.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b","topics": []}],"id":1}'
1curl https://docs-demo.sei-pacific.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b","topics": []}],"id":1}'
1require 'eth'23client = Eth::Client.create 'https://docs-demo.sei-pacific.quiknode.pro/'4carga útil = {5"jsonrpc": "2.0",6"method": "eth_newFilter",7"params": [{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b","topics": []}],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1require 'eth'23client = Eth::Client.create 'https://docs-demo.sei-pacific.quiknode.pro/'4carga útil = {5"jsonrpc": "2.0",6"method": "eth_newFilter",7"params": [{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b","topics": []}],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1import { ethers } from "ethers";2const filter = {3fromBlock: "0xe20360",4toBlock: "0xe20411",5address: "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",6topics: [],7};8(async () => {9const provider = new ethers.JsonRpcProvider("https://docs-demo.sei-pacific.quiknode.pro/");10const response = await provider.send("eth_newFilter", [filter]);11console.log(response);12})();
1import { ethers } from "ethers";2const filter = {3fromBlock: "0xe20360",4toBlock: "0xe20411",5address: "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",6topics: [],7};8(async () => {9const provider = new ethers.JsonRpcProvider("https://docs-demo.sei-pacific.quiknode.pro/");10const response = await provider.send("eth_newFilter", [filter]);11console.log(response);12})();
1var myHeaders = new Headers();2myHeaders.añadir(«Content-Type», "application/json");34var sin procesar = JSON.convertir a cadena({5«jsonrpc»: «2.0»,6"method": "eth_newFilter",7«params»: [8{9"fromBlock": "0xe20360",10"toBlock": "0xe20411",11"address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",12"topics": []13}14],15«id»: 116});1718var requestOptions = {19método: 'POST',20encabezados: myHeaders,21cuerpo: sin procesar,22redirigir: «seguir»23};2425fetch("https://docs-demo.sei-pacific.quiknode.pro/", requestOptions)26.entonces(respuesta => respuesta.texto())27.entonces(resultado => console.log(resultado))28.captura(error => console.log('error', error));29
1var myHeaders = new Headers();2myHeaders.añadir(«Content-Type», "application/json");34var sin procesar = JSON.convertir a cadena({5«jsonrpc»: «2.0»,6"method": "eth_newFilter",7«params»: [8{9"fromBlock": "0xe20360",10"toBlock": "0xe20411",11"address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",12"topics": []13}14],15«id»: 116});1718var requestOptions = {19método: 'POST',20encabezados: myHeaders,21cuerpo: sin procesar,22redirigir: «seguir»23};2425fetch("https://docs-demo.sei-pacific.quiknode.pro/", requestOptions)26.entonces(respuesta => respuesta.texto())27.entonces(resultado => console.log(resultado))28.captura(error => console.log('error', error));29
1importar solicitudes2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/"56carga útil = json.volcados({7«jsonrpc»: «2.0»,8"method": "eth_newFilter",9«params»: [10{11"fromBlock": "0xe20360",12"toBlock": "0xe20411",13"address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",14"topics": []15}16],17«id»: 118})19encabezados = {20«Content-Type»: 'application/json'21}2223respuesta = solicitudes.solicitud(«POST», url, encabezados=encabezados, datos=carga útil)2425imprimir(respuesta.texto)26
1importar solicitudes2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/"56carga útil = json.volcados({7«jsonrpc»: «2.0»,8"method": "eth_newFilter",9«params»: [10{11"fromBlock": "0xe20360",12"toBlock": "0xe20411",13"address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",14"topics": []15}16],17«id»: 118})19encabezados = {20«Content-Type»: 'application/json'21}2223respuesta = solicitudes.solicitud(«POST», url, encabezados=encabezados, datos=carga útil)2425imprimir(respuesta.texto)26
1requiere «uri»2require «json»3requiere «net/http»45url = URI("https://docs-demo.sei-pacific.quiknode.pro/")67https = Net::HTTP.nuevo(url.host, url.puerto)8https.use_ssl = true910solicitud = Neto::HTTP::POST.nuevo(URL)11solicitud[«Content-Type»] = «application/json»12solicitud.cuerpo = JSON.dump({13«jsonrpc»: «2.0»,14"method": "eth_newFilter",15«params»: [16{17"fromBlock": "0xe20360",18"toBlock": "0xe20411",19"address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",20"topics": []21}22],23«id»: 124})2526respuesta = https.solicitud(solicitud)27muestra la respuesta.read_body28
1requiere «uri»2require «json»3requiere «net/http»45url = URI("https://docs-demo.sei-pacific.quiknode.pro/")67https = Net::HTTP.nuevo(url.host, url.puerto)8https.use_ssl = true910solicitud = Neto::HTTP::POST.nuevo(URL)11solicitud[«Content-Type»] = «application/json»12solicitud.cuerpo = JSON.dump({13«jsonrpc»: «2.0»,14"method": "eth_newFilter",15«params»: [16{17"fromBlock": "0xe20360",18"toBlock": "0xe20411",19"address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",20"topics": []21}22],23«id»: 124})2526respuesta = https.solicitud(solicitud)27muestra la respuesta.read_body28
1de web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.sei-pacific.quiknode.pro/'))3newFilterId = w3.eth.filter({4'fromBlock': "0xe20360",5'toBlock': "0xe20411",6'address': '0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b',7'topics': []8})9print(newFilterId)10
1de web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.sei-pacific.quiknode.pro/'))3newFilterId = w3.eth.filter({4'fromBlock': "0xe20360",5'toBlock': "0xe20411",6'address': '0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b',7'topics': []8})9print(newFilterId)10
¿Aún no tienes una cuenta?
Crea tuendpoint Quicknode endpoint segundos y empieza a desarrollar
Empieza gratis