starknet_getEvents RPC Method
Parâmetros
fromBlock
cadeia de caracteres
OBRIGATÓRIO
A carregar...
toBlock
cadeia de caracteres
OBRIGATÓRIO
A carregar...
morada
cadeia de caracteres
A carregar...
keys
matriz
A carregar...
chunk_size
número inteiro
OBRIGATÓRIO
A carregar...
continuation_token
cadeia de caracteres
A carregar...
Devoluções
resultado
objeto
A carregar...
eventos
objeto
A carregar...
from_address
cadeia de caracteres
A carregar...
dados
matriz
A carregar...
keys
matriz
A carregar...
block_hash
cadeia de caracteres
A carregar...
block_number
número inteiro
A carregar...
transaction_hash
cadeia de caracteres
A carregar...
continuation_token
cadeia de caracteres
A carregar...
Pedido
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8' \4--header 'accept: application/json' \5--header 'content-type: application/json' \6--dados '{7"id": 1,8"jsonrpc": "2.0",9"method": "starknet_getEvents",10"params": [11{12"from_block": "latest",13"to_block": "latest",14"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",15"chunk_size": 1016}17]18}'
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8' \4--header 'accept: application/json' \5--header 'content-type: application/json' \6--dados '{7"id": 1,8"jsonrpc": "2.0",9"method": "starknet_getEvents",10"params": [11{12"from_block": "latest",13"to_block": "latest",14"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",15"chunk_size": 1016}17]18}'
1// Note: You can specify Starknet version in the URL path2// Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63const myHeaders = new Headers();4myHeaders.acrescentar("accept", "application/json");5myHeaders.append("content-type", "application/json");67const raw = JSON.stringify({8"id": 1,9"jsonrpc": "2.0",10"method": "starknet_getEvents",11"params": [12{13"from_block": "latest",14"to_block": "latest",15"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",16"chunk_size": 1017}18]19});2021const requestOptions = {22método: "POST",23cabeçalhos: myHeaders,24corpo: raw,25redirecionar: "seguir"26};2728fetch("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8", requestOptions)29.então((resposta) => resposta.texto())30.então((resultado) => console.log(resultado))31.catch((erro) => console.erro(erro));
1// Note: You can specify Starknet version in the URL path2// Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63const myHeaders = new Headers();4myHeaders.acrescentar("accept", "application/json");5myHeaders.append("content-type", "application/json");67const raw = JSON.stringify({8"id": 1,9"jsonrpc": "2.0",10"method": "starknet_getEvents",11"params": [12{13"from_block": "latest",14"to_block": "latest",15"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",16"chunk_size": 1017}18]19});2021const requestOptions = {22método: "POST",23cabeçalhos: myHeaders,24corpo: raw,25redirecionar: "seguir"26};2728fetch("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8", requestOptions)29.então((resposta) => resposta.texto())30.então((resultado) => console.log(resultado))31.catch((erro) => console.erro(erro));
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63import requests4import json56url = "https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8"78carga útil = json.dumps({9"id": 1,10"jsonrpc": "2.0",11"method": "starknet_getEvents",12"params": [13{14"from_block": "latest",15"to_block": "latest",16"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",17"chunk_size": 1018}19]20})21cabeçalhos = {22«aceitar»: 'application/json',23'content-type': 'application/json'24}2526resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)2728imprimir(resposta.texto)29
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63import requests4import json56url = "https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8"78carga útil = json.dumps({9"id": 1,10"jsonrpc": "2.0",11"method": "starknet_getEvents",12"params": [13{14"from_block": "latest",15"to_block": "latest",16"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",17"chunk_size": 1018}19]20})21cabeçalhos = {22«aceitar»: 'application/json',23'content-type': 'application/json'24}2526resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)2728imprimir(resposta.texto)29
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63require "uri"4require "json"5require "net/http"67url = URI("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8")89http = Net::HTTP.new(url.host, url.port);10pedido = Líquido::HTTP::POST.novo(url)11pedido["aceitar"] = "application/json"12request["content-type"] = "application/json"13pedido.corpo = JSON.dump({14"id": 1,15"jsonrpc": "2.0",16"method": "starknet_getEvents",17"params": [18{19"from_block": "latest",20"to_block": "latest",21"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",22"chunk_size": 1023}24]25})2627resposta = http.pedido(pedido)28insere a resposta.read_body29
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.63require "uri"4require "json"5require "net/http"67url = URI("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8")89http = Net::HTTP.new(url.host, url.port);10pedido = Líquido::HTTP::POST.novo(url)11pedido["aceitar"] = "application/json"12request["content-type"] = "application/json"13pedido.corpo = JSON.dump({14"id": 1,15"jsonrpc": "2.0",16"method": "starknet_getEvents",17"params": [18{19"from_block": "latest",20"to_block": "latest",21"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",22"chunk_size": 1023}24]25})2627resposta = http.pedido(pedido)28insere a resposta.read_body29
Ainda não tem uma conta?
Crie o seu ponto de extremidade Quicknode em segundos e comece a desenvolver
Comece gratuitamente