Decode logs and transactions
curl --request POST \
--url https://data-api.b3.fun/insights/v1/decode/{contractAddress} \
--header 'Content-Type: application/json' \
--data '
{
"transactions": [
{
"data": "<string>"
}
],
"logs": [
{
"topics": [
"<string>"
],
"data": "<string>"
}
]
}
'import requests
url = "https://data-api.b3.fun/insights/v1/decode/{contractAddress}"
payload = {
"transactions": [{ "data": "<string>" }],
"logs": [
{
"topics": ["<string>"],
"data": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
transactions: [{data: '<string>'}],
logs: [{topics: ['<string>'], data: '<string>'}]
})
};
fetch('https://data-api.b3.fun/insights/v1/decode/{contractAddress}', 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://data-api.b3.fun/insights/v1/decode/{contractAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transactions' => [
[
'data' => '<string>'
]
],
'logs' => [
[
'topics' => [
'<string>'
],
'data' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://data-api.b3.fun/insights/v1/decode/{contractAddress}"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"data\": \"<string>\"\n }\n ],\n \"logs\": [\n {\n \"topics\": [\n \"<string>\"\n ],\n \"data\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://data-api.b3.fun/insights/v1/decode/{contractAddress}")
.header("Content-Type", "application/json")
.body("{\n \"transactions\": [\n {\n \"data\": \"<string>\"\n }\n ],\n \"logs\": [\n {\n \"topics\": [\n \"<string>\"\n ],\n \"data\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.b3.fun/insights/v1/decode/{contractAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"transactions\": [\n {\n \"data\": \"<string>\"\n }\n ],\n \"logs\": [\n {\n \"topics\": [\n \"<string>\"\n ],\n \"data\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transactions": [
{
"data": "<string>",
"function_name": "<string>",
"args": [
null
]
}
],
"logs": [
{
"topics": [
"<string>"
],
"data": "<string>",
"event_name": "<string>",
"args": [
null
]
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}insights/decode
Decode logs and transactions
Decode logs and transactions
POST
/
insights
/
v1
/
decode
/
{contractAddress}
Decode logs and transactions
curl --request POST \
--url https://data-api.b3.fun/insights/v1/decode/{contractAddress} \
--header 'Content-Type: application/json' \
--data '
{
"transactions": [
{
"data": "<string>"
}
],
"logs": [
{
"topics": [
"<string>"
],
"data": "<string>"
}
]
}
'import requests
url = "https://data-api.b3.fun/insights/v1/decode/{contractAddress}"
payload = {
"transactions": [{ "data": "<string>" }],
"logs": [
{
"topics": ["<string>"],
"data": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
transactions: [{data: '<string>'}],
logs: [{topics: ['<string>'], data: '<string>'}]
})
};
fetch('https://data-api.b3.fun/insights/v1/decode/{contractAddress}', 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://data-api.b3.fun/insights/v1/decode/{contractAddress}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'transactions' => [
[
'data' => '<string>'
]
],
'logs' => [
[
'topics' => [
'<string>'
],
'data' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://data-api.b3.fun/insights/v1/decode/{contractAddress}"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"data\": \"<string>\"\n }\n ],\n \"logs\": [\n {\n \"topics\": [\n \"<string>\"\n ],\n \"data\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://data-api.b3.fun/insights/v1/decode/{contractAddress}")
.header("Content-Type", "application/json")
.body("{\n \"transactions\": [\n {\n \"data\": \"<string>\"\n }\n ],\n \"logs\": [\n {\n \"topics\": [\n \"<string>\"\n ],\n \"data\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.b3.fun/insights/v1/decode/{contractAddress}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"transactions\": [\n {\n \"data\": \"<string>\"\n }\n ],\n \"logs\": [\n {\n \"topics\": [\n \"<string>\"\n ],\n \"data\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transactions": [
{
"data": "<string>",
"function_name": "<string>",
"args": [
null
]
}
],
"logs": [
{
"topics": [
"<string>"
],
"data": "<string>",
"event_name": "<string>",
"args": [
null
]
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}Path Parameters
Example:
"vitalik.eth"
Query Parameters
Use chain_id instead
Example:
[20, 56, 1]
The chain ID(s) to request the data for. You can specify multiple chain IDs, up to a maximum of 55. Use repeated query parameters, e.g., ?chain_id=20&chain_id=56. Optional, because a single chain can as well be specified as a subdomain
Example:
[20, 56, 1]
Response
Success
Show child attributes
Show child attributes
HypeDuel