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
매개변수
객체
객체
로딩 중...
fromBlock
문자열
필수
로딩 중...
toBlock
문자열
필수
로딩 중...
주소
문자열
필수
로딩 중...
주제
문자열
로딩 중...
반품
결과
로딩 중...
요청
1curlsei\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}'
1curlsei\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}'
1필수 'eth'23클라이언트 = Eth::클라이언트.생성 'sei'4페이로드 = {5"jsonrpc": "2.0",6"method": "eth_newFilter",7"params": [{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b","topics": []}],8"id": "1"9}1011답변 = 클라이언트.전송(페이로드.to_json)12응답을 반환합니다
1필수 'eth'23클라이언트 = Eth::클라이언트.생성 'sei'4페이로드 = {5"jsonrpc": "2.0",6"method": "eth_newFilter",7"params": [{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b","topics": []}],8"id": "1"9}1011답변 = 클라이언트.전송(페이로드.to_json)12응답을 반환합니다
1import { ethers } from "ethers";2const filter = {3fromBlock: "0xe20360",4toBlock: "0xe20411",5address: "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",6topics: [],7};8(async () => {9const provider = new ethers.JsonRpcProvider("sei");10const response = await provider.send("eth_newFilter", [filter]);11콘솔.log(응답);12})();
1import { ethers } from "ethers";2const filter = {3fromBlock: "0xe20360",4toBlock: "0xe20411",5address: "0x1B9AAeB01aecFD0a7Dcc11f3295Ca43f73f8325b",6topics: [],7};8(async () => {9const provider = new ethers.JsonRpcProvider("sei");10const response = await provider.send("eth_newFilter", [filter]);11콘솔.log(응답);12})();
1var myHeaders = new Headers();2myHeaders.추가("Content-Type", "application/json");34var raw = JSON.stringify({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 = {19메서드: 'POST',20헤더: myHeaders,21본문: raw,22리디렉션: 'follow'23};2425가져오기("sei", requestOptions)26.그런 다음(응답 => 응답.text())27.그런 다음(결과 => console.log(result))28.catchcatch (오류 => console.log('error', error));29
1var myHeaders = new Headers();2myHeaders.추가("Content-Type", "application/json");34var raw = JSON.stringify({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 = {19메서드: 'POST',20헤더: myHeaders,21본문: raw,22리디렉션: 'follow'23};2425가져오기("sei", requestOptions)26.그런 다음(응답 => 응답.text())27.그런 다음(결과 => console.log(result))28.catchcatch (오류 => console.log('error', error));29
1import 요청2import json34url = "sei"56페이로드 = json.dumps({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})19헤더 = {20'Content-Type': 'application/json'21}2223답변 = 요청.요청("POST", url, 헤더=헤더, 데이터=페이로드)2425인쇄(응답.text)26
1import 요청2import json34url = "sei"56페이로드 = json.dumps({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})19헤더 = {20'Content-Type': 'application/json'21}2223답변 = 요청.요청("POST", url, 헤더=헤더, 데이터=페이로드)2425인쇄(응답.text)26
1require "uri"2require "json"3require "net/http"45url = URI("sei")67https = Net::HTTP.new(url.호스트, url.포트)8https.use_ssl = true910요청 = 순::HTTP::POST.새(URL)11요청["Content-Type"] = "application/json"12요청.본문 = 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})2526답변 = https.요청(요청)27응답을 반환합니다.read_body28
1require "uri"2require "json"3require "net/http"45url = URI("sei")67https = Net::HTTP.new(url.호스트, url.포트)8https.use_ssl = true910요청 = 순::HTTP::POST.새(URL)11요청["Content-Type"] = "application/json"12요청.본문 = 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})2526답변 = https.요청(요청)27응답을 반환합니다.read_body28
1출처: 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
1출처: 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