Etherscan Api

getGasOracle

SafeGasPrice, ProposeGasPrice And FastGasPrice returned in string-Gwei

Parameters

  • baseUrl string The etherscan node url.
  • apiKey string The etherscan API key. (optional)

Returns GasOracleResponse LastBlock, SafeGasPrice, ProposeGasPrice, FastGasPrice

getTokenBalance

Get token balance

Parameters

  • $0 Object
    • $0.baseUrl
    • $0.address
    • $0.assetAddress
    • $0.apiKey
  • baseUrl string The etherscan node url.
  • address string The address.
  • assetAddress string The token contract address.
  • apiKey string The etherscan API key. (optional)

Returns BigNumberish The token balance

getETHTransactionHistory

Get ETH transaction history

Parameters

  • $0 Object
    • $0.baseUrl
    • $0.address
    • $0.page
    • $0.offset
    • $0.startblock
    • $0.endblock
    • $0.apiKey
  • baseUrl string The etherscan node url.
  • address string The address.
  • params TransactionHistoryParam The search options.
  • apiKey string The etherscan API key. (optional)

Returns Array<ETHTransactionInfo> The ETH transaction history

getTokenTransactionHistory

Get token transaction history

Parameters

  • $0 Object
    • $0.baseUrl
    • $0.address
    • $0.assetAddress
    • $0.page
    • $0.offset
    • $0.startblock
    • $0.endblock
    • $0.apiKey
  • baseUrl string The etherscan node url.
  • address string The address.
  • params TransactionHistoryParam The search options.
  • apiKey string The etherscan API key. (optional)

Returns Array<Tx> The token transaction history