Returns various bits of information about a TRC-20 token

get_trc20_token_description(
  contract_address,
  detailed_info = FALSE,
  max_attempts = 3L
)

Arguments

contract_address

(character): contract address of a TRC-20 token of interest, either in base58check or hex format.

detailed_info

(boolean): if FALSE (default), only basic information about the token is returned. If TRUE, an extended information is returned.

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 200). Additional attempts are implemented with an exponential backoff. Defaults to 3.

Value

A tibble, whose content depends on the detailed_info argument. If detailed_info = FALSE (default), the tibble will have the following 5 columns:

  • token_name (character): commont name of the token;

  • token_abbr (character): abbreviated name of the token ("symbol");

  • token_contract_address (character): address of the token's contract, in base58check format;

  • token_owner_address (character): address of the token's creator, in base58check format;

  • precision (integer): number of digits in the decimal part of the token's amount (see apply_decimal() for details).

If detailed_info = TRUE, the returned tibble will have the same 5 columns as above, and the following additional columns:

  • request_time (POSIXct): date and time when the query was made;

  • vip (boolean): indicator of whether this token is treated as a VIP asset on the blockchain;

  • description (character): a free-text field describing the token;

  • date_created (POSIXct): date and time of the token's creation;

  • url (character): URL of the token's project;

  • total_supply (double): total supply of the token;

  • number_of_holders (integer): current number of accounts that hold this token;

  • total_tx (integer): current cumulative number of transactions that involved this token;

  • price_in_trx (double): current price of this token expressed in TRX.

If no description for the requested token can be found, the function will return no data (NULL), with the respective console message.

Details

TRC-20 are tokens issued by smart contracts. See official documentation for details.

Examples

r1 <- get_trc20_token_description( contract_address = "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", detailed_info = TRUE ) r2 <- get_trc20_token_description( contract_address = "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", detailed_info = FALSE ) print(r1)
#> # A tibble: 1 x 14 #> request_time token_name token_abbr token_contract_ad… token_owner_addr… #> <dttm> <chr> <chr> <chr> <chr> #> 1 2021-07-12 22:04:01 WINkLink WIN TLa2f6VPqDgRE67v1… TKeyfKMAicwhWysv… #> # … with 9 more variables: vip <lgl>, description <chr>, date_created <dttm>, #> # url <chr>, total_supply <dbl>, precision <int>, number_of_holders <int>, #> # total_tx <int>, price_in_trx <dbl>
print(r2)
#> # A tibble: 1 x 5 #> token_name token_abbr token_contract_address token_owner_address precision #> <chr> <chr> <chr> <chr> <int> #> 1 WINkLink WIN TLa2f6VPqDgRE67v1736s7… TKeyfKMAicwhWysvgktW5… 6