ethscore/man/address_net_on_chain.Rd
charlieflipside e4fa72d128 update-README
2022-08-30 10:46:26 -04:00

58 lines
2.1 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/address_token_net_onchain.R
\name{address_net_on_chain}
\alias{address_net_on_chain}
\title{Address Token Net Onto-Chain}
\usage{
address_net_on_chain(
token_address,
block_min = 0,
block_max,
decimal_reduction = 18,
min_tokens = 1,
api_key
)
}
\arguments{
\item{token_address}{ERC20 token contract address to assess change in balance.}
\item{block_min}{Initial block to start scoring balances over time, default 0 (genesis block).}
\item{block_max}{The block height to assess balance at (for reproducibility).}
\item{decimal_reduction}{Most ERC20 have 18 decimals, but stablecoins often have only 6.}
\item{min_tokens}{Minimum amount of tokens acknowledged. Already decimal adjusted, useful for
ignoring dust balances. Default 0.0001. Use -Inf to include net sellers (but note: API max is 1M rows.).}
\item{api_key}{Flipside Crypto ShroomDK API Key to create and access SQL queries.}
}
\value{
A data frame of the form:\tabular{lc}{
\tab \cr
ADDRESS \tab The EOA or contract that holds the balance \cr
TOKEN_ADDRESS \tab ERC20 address provided \cr
NET_ONTO_CHAIN \tab net amount of token taken from central exchanges between block_min and block_max \cr
ADDRESS_TYPE \tab If ADDRESS is known to be 'contract address' or 'gnosis safe address'. \cr
If neither it is assumed to be an 'EOA'. Some EOAs may have a balance but have never initiated a transaction \tab \cr
These are noted as 'EOA-0tx' Note: contracts, including gnosis safes may not have consistent owners across different EVM chains. \tab \cr
}
}
\description{
Net transfer amount of tokens from a central exchange between two block heights.
By default excludes net sellers. Alice net received 200 UNI from central exchanges
between blocks 10,000,000 and 15,000,000.
}
\examples{
\dontrun{
address_net_on_chain(
token_address = tolower("0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"), #UNI token
block_min = 10000000,
block_max = 15000000,
decimal_reduction = 18,
min_tokens = 1,
api_key = readLines("api_key.txt")
)
}
}