eth_getUserOperationByHash
curl --request POST \
--url https://api.gelato.cloud/rpc/{chainId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getUserOperationByHash",
"params": [
"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9"
]
}
'import requests
url = "https://api.gelato.cloud/rpc/{chainId}"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getUserOperationByHash",
"params": ["0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9"]
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'eth_getUserOperationByHash',
params: ['0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9']
})
};
fetch('https://api.gelato.cloud/rpc/{chainId}', 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://api.gelato.cloud/rpc/{chainId}",
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([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'eth_getUserOperationByHash',
'params' => [
'0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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://api.gelato.cloud/rpc/{chainId}"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUserOperationByHash\",\n \"params\": [\n \"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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://api.gelato.cloud/rpc/{chainId}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUserOperationByHash\",\n \"params\": [\n \"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gelato.cloud/rpc/{chainId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUserOperationByHash\",\n \"params\": [\n \"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": {
"userOperation": {
"sender": "0x023fEF87894773DF227587d9B29af8D17b4dBB5A",
"nonce": "0x1",
"initCode": "0x",
"callData": "0x51945447000000000000000000000000d2d3248f89fd11117496b3258db161a834dbfb0b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d09de08a00000000000000000000000000000000000000000000000000000000",
"signature": "0x00000000fca6490c2d85724bac088250a72fb7fb81a5a91234b1617d75d072c79d8d7db0123c1f0d9fe4708c864d89b7cca659f2554807f81339f6dcee2ba2e5ebe46b2c1b",
"paymasterAndData": "0x",
"callGasLimit": "0x358e",
"verificationGasLimit": "0x148a6",
"preVerificationGas": "0x0",
"maxFeePerGas": "0x0",
"maxPriorityFeePerGas": "0x5f5e100"
},
"entryPoint": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
"blockNumber": "0x27fb22e",
"transactionHash": "0x0f9b0e5868beaf345d8d55895c8037ae85adb91c422c00badcdcae8a0bf247a1"
}
}{
"message": "<string>"
}Bundler API Endpoints
eth_getUserOperationByHash
Returns a UserOperation given a userOpHash.
POST
/
rpc
/
{chainId}
eth_getUserOperationByHash
curl --request POST \
--url https://api.gelato.cloud/rpc/{chainId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getUserOperationByHash",
"params": [
"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9"
]
}
'import requests
url = "https://api.gelato.cloud/rpc/{chainId}"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getUserOperationByHash",
"params": ["0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9"]
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'eth_getUserOperationByHash',
params: ['0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9']
})
};
fetch('https://api.gelato.cloud/rpc/{chainId}', 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://api.gelato.cloud/rpc/{chainId}",
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([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'eth_getUserOperationByHash',
'params' => [
'0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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://api.gelato.cloud/rpc/{chainId}"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUserOperationByHash\",\n \"params\": [\n \"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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://api.gelato.cloud/rpc/{chainId}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUserOperationByHash\",\n \"params\": [\n \"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gelato.cloud/rpc/{chainId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUserOperationByHash\",\n \"params\": [\n \"0xa501bf1cbb27adecb09aef8adb58ab5fe423be7975d5a4f687408525e4cabee9\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"jsonrpc": "2.0",
"result": {
"userOperation": {
"sender": "0x023fEF87894773DF227587d9B29af8D17b4dBB5A",
"nonce": "0x1",
"initCode": "0x",
"callData": "0x51945447000000000000000000000000d2d3248f89fd11117496b3258db161a834dbfb0b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d09de08a00000000000000000000000000000000000000000000000000000000",
"signature": "0x00000000fca6490c2d85724bac088250a72fb7fb81a5a91234b1617d75d072c79d8d7db0123c1f0d9fe4708c864d89b7cca659f2554807f81339f6dcee2ba2e5ebe46b2c1b",
"paymasterAndData": "0x",
"callGasLimit": "0x358e",
"verificationGasLimit": "0x148a6",
"preVerificationGas": "0x0",
"maxFeePerGas": "0x0",
"maxPriorityFeePerGas": "0x5f5e100"
},
"entryPoint": "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
"blockNumber": "0x27fb22e",
"transactionHash": "0x0f9b0e5868beaf345d8d55895c8037ae85adb91c422c00badcdcae8a0bf247a1"
}
}{
"message": "<string>"
}Headers
Gelato API key for higher rate limits. This must be provided if sponsoring off-chain via Gas Tank.
Path Parameters
Target network chain identifier.
Body
application/json
⌘I