block_results
curl --request GET \
--url https://rpc.cosmos.directory/cosmoshub/block_resultsimport requests
url = "https://rpc.cosmos.directory/cosmoshub/block_results"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://rpc.cosmos.directory/cosmoshub/block_results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rpc.cosmos.directory/cosmoshub/block_results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rpc.cosmos.directory/cosmoshub/block_results"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://rpc.cosmos.directory/cosmoshub/block_results")
.asString();require 'uri'
require 'net/http'
url = URI("https://rpc.cosmos.directory/cosmoshub/block_results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 0,
"result": {
"height": "12",
"txs_results": [
{
"code": "0",
"data": "",
"log": "not enough gas",
"info": "",
"gas_wanted": "100",
"gas_used": "100",
"events": [
{
"type": "app",
"attributes": [
{
"key": "action",
"value": "send",
"index": false
}
]
}
],
"codespace": "ibc"
}
],
"finalize_block_events": [
{
"type": "app",
"attributes": [
{
"key": "action",
"value": "send",
"index": false
}
]
}
],
"validator_updates": [
{
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"power": "300"
}
],
"consensus_param_updates": {
"block": {
"max_bytes": "22020096",
"max_gas": "1000",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Info
block_results
Get block results at a specified height
Get block_results.
If the height field is set to a non-default value, upon success, the
Cache-Control header will be set with the default maximum age.
GET
/
block_results
block_results
curl --request GET \
--url https://rpc.cosmos.directory/cosmoshub/block_resultsimport requests
url = "https://rpc.cosmos.directory/cosmoshub/block_results"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://rpc.cosmos.directory/cosmoshub/block_results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rpc.cosmos.directory/cosmoshub/block_results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rpc.cosmos.directory/cosmoshub/block_results"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://rpc.cosmos.directory/cosmoshub/block_results")
.asString();require 'uri'
require 'net/http'
url = URI("https://rpc.cosmos.directory/cosmoshub/block_results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 0,
"result": {
"height": "12",
"txs_results": [
{
"code": "0",
"data": "",
"log": "not enough gas",
"info": "",
"gas_wanted": "100",
"gas_used": "100",
"events": [
{
"type": "app",
"attributes": [
{
"key": "action",
"value": "send",
"index": false
}
]
}
],
"codespace": "ibc"
}
],
"finalize_block_events": [
{
"type": "app",
"attributes": [
{
"key": "action",
"value": "send",
"index": false
}
]
}
],
"validator_updates": [
{
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"power": "300"
}
],
"consensus_param_updates": {
"block": {
"max_bytes": "22020096",
"max_gas": "1000",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}{
"id": 0,
"jsonrpc": "2.0",
"error": "Description of failure"
}Was this page helpful?
⌘I