Retrieves events that belong to a given block
get_events_by_block_number( block_number, only_confirmed = NULL, max_attempts = 3L )
block_number | (character): number of the block of interest. |
---|---|
only_confirmed | (boolean or |
max_attempts | (integer, positive): specifies the
maximum number of additional attempts to call a URL if the
first attempt fails (i.e. its call status is different from
|
A nested tibble where each row corresponds to an event associated with the block of interest. This tibble contains the following columns:
tx_id
(character): transaction ID;
block_number
(character): same as the argument block_number
;
block_timestamp
(POSIXct, UTC timezone);
contract_address
(character): adress of the smart contract that triggered
the event;
event_name
(character): possible values of this column are contract-
and event-specific;
event_data
(list): each element of this list contains a named list with
additional attributes of the event.
If no events are found for the specified combination of query
parameters, nothing (NULL
) is returned, with a console message
"No data found"
.
The exact content of event_data
in the tibble returned by this
function will be contract- and event-specific. Thus, these data are
returned in the form of a named R list as-is, i.e. without any
processing. Users are advised to develop their own, task-specific, logic
to process event attributes.
#> # A tibble: 23 x 6 #> tx_id block_number timestamp contract_address event_name event_data #> <chr> <chr> <dttm> <chr> <chr> <list> #> 1 ba39… 15354550 2019-12-14 10:05:30 TFRLPB1kiCyKRSM… RingCreate <named li… #> 2 0f81… 15354550 2019-12-14 10:05:30 TUezhPtdMYByMLt… Transfer <named li… #> 3 dd7a… 15354550 2019-12-14 10:05:30 TFRLPB1kiCyKRSM… RingCreate <named li… #> 4 24e0… 15354550 2019-12-14 10:05:30 TWmhXhXjgXTj87t… DiceResult <named li… #> 5 5d7e… 15354550 2019-12-14 10:05:30 TUCwcEhuAzPUrde… Transfer <named li… #> 6 7834… 15354550 2019-12-14 10:05:30 TWmhXhXjgXTj87t… DiceCreate <named li… #> 7 8f0d… 15354550 2019-12-14 10:05:30 TCt3U4qRxJy4nCW… DiceResul… <named li… #> 8 6dce… 15354550 2019-12-14 10:05:30 THeo5hYWegUqbNS… PayedEvent <named li… #> 9 2970… 15354550 2019-12-14 10:05:30 TVRqMwBZU13c4wx… GetToken <named li… #> 10 0f82… 15354550 2019-12-14 10:05:30 TFRLPB1kiCyKRSM… RingCreate <named li… #> # … with 13 more rows