intellidegentSession 4
Updated 2022-12-07
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
›
⌄
select
tx_hash, input_data
from ethereum.core.fact_transactions
where block_timestamp::date = '2022-08-15'
and tx_hash = '0x32844e66c41bf08a8c3d249d1dd53a404831bc486e094342dc4b79ae9c7aa8d3'
order by block_timestamp desc
limit 10
select
substr (input_data, 1, 10),
input_data
from ethereum.core.fact_transactions
where block_timestamp::date = '2022-08-15'
and tx_hash = '0x32844e66c41bf08a8c3d249d1dd53a404831bc486e094342dc4b79ae9c7aa8d3'
order by block_timestamp desc
limit 10
-- events table == logs tab in etherscan
-- event is a basic level event that can be done. e.g. approval of contract to spend token. Transfer of a token. Etc.
-- Event Index - an arbitrary list of numbers in ascending order. They never skip a number. Same event index shown in etherscan. Order in which the events occurred.
--
select *
from ethereum.core.fact_event_logs
where block_timestamp::date = '2022-08-15'
and tx_hash = '0x32844e66c41bf08a8c3d249d1dd53a404831bc486e094342dc4b79ae9c7aa8d3'
-- wad = means 18 decimal places
--codebeautify.org/jsonviewer
select
event_index,
contract_address,
event_inputs:from,
event_inputs:to,
event_inputs:value / pow(10, 18), ---divides by 10 to the power of 18
event_inputs:value / 1e18,
Run a query to Download Data