flyingfishgetTx RPC copy
Updated 2024-10-08
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
/*
Failed transaction:
tx_id = '3d2ZhYpKm2dKaEM5YZa95h5hH7cDnsMgPKrdHFm8XVoWrsqn8U4Uof7tFmqTHAmTa5uZ6MMZHv2PhTXpmnn4n87Q'
block_id = 294223718
Sucessful transaction:
and block_id = 294292155
and tx_id = '63yRsjyaTcMA2UT1bucEGycoQHNVQrNQQdZYCHas84n2Ks911THPQ5ombV9GfDf3Mih71YP6LUUxDeTx8C7mJWt5'
*/
with tx_from_rpc as (
select
resp:data:result:slot as block_id
, resp:data:result:meta:computeUnitsConsumed as rpc_units_consumed
, '63yRsjyaTcMA2UT1bucEGycoQHNVQrNQQdZYCHas84n2Ks911THPQ5ombV9GfDf3Mih71YP6LUUxDeTx8C7mJWt5' as tx_id
from (
select
live.udf_api(
'POST',
'https://api.mainnet-beta.solana.com',
{ },
utils.udf_json_rpc_call(
'getTransaction'
, ['63yRsjyaTcMA2UT1bucEGycoQHNVQrNQQdZYCHas84n2Ks911THPQ5ombV9GfDf3Mih71YP6LUUxDeTx8C7mJWt5'
, {'encoding': 'json', 'maxSupportedTransactionVersion': 0}
]
)
) as resp
)
union all
select
resp:data:result:slot as block_id
QueryRunArchived: QueryRun has been archived