Retrieves information on a block and its transactions
get_block_info(latest = TRUE, block_number = NULL, max_attempts = 3L)
latest | (boolean): indicator of whether the latest block's information
should be retrieved ( |
---|---|
block_number | (character): number of the block to retrieve the
information for ( |
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 with the following columns:
block_number
(integer): number of the block;
timestamp
(POSIXct): date and time when the block was created;
hash
(character): hash ID of the block;
parent_hash
(character): hash ID of the parent block;
tx_trie_root
(character): hash ID of the
trie root of the block creation
transaction;
confirmed
(boolean): an indicator of whether this block has been
confirmed;
size
(integer): size of the block (in bytes);
witness_address
(character): address of the block's creator;
tx_count
(integer): number of transactions associated with this block;
tx
(list): a list with one element that contains a tibble with basic
info on transactions associated with this block: tx_id
(character) -
transaction ID, contract_type
(character) - type of the contract that
performed this transaction, from_address
(character) - address of the account
that initiated the transaction, and to_address
(character) - address of the
recieving account. All addresses are presented in the base58check
format.
Additional details on the block producing process can be found in the official documentation.
# latest block r1 <- get_block_info(latest = TRUE)#>#>#>#>#>#>#> # A tibble: 1 x 11 #> request_time block_number timestamp hash parent_hash #> <dttm> <chr> <dttm> <chr> <chr> #> 1 2021-07-12 22:03:51 31884267 2021-07-12 22:02:45 000000000… 0000000001e68… #> # … with 6 more variables: tx_trie_root <chr>, confirmed <lgl>, size <int>, #> # witness_address <chr>, tx_count <int>, tx <list># specific block: r2 <- get_block_info(latest = FALSE, block_number = "26810333")#>#>#>#>#>#>#> # A tibble: 1 x 11 #> request_time block_number timestamp hash parent_hash #> <dttm> <chr> <dttm> <chr> <chr> #> 1 2021-07-12 22:03:52 26810333 2021-01-16 15:15:03 000000000… 0000000001991… #> # … with 6 more variables: tx_trie_root <chr>, confirmed <lgl>, size <int>, #> # witness_address <chr>, tx_count <int>, tx <list>