EtherscanLoader#

class langchain_community.document_loaders.etherscan.EtherscanLoader(account_address: str, api_key: str = 'docs-demo', filter: str = 'normal_transaction', page: int = 1, offset: int = 10, start_block: int = 0, end_block: int = 99999999, sort: str = 'desc')[source]#

Load transactions from Ethereum mainnet.

The Loader use Etherscan API to interact with Ethereum mainnet.

ETHERSCAN_API_KEY environment variable must be set use this loader.

Methods

__init__(account_address[, api_key, filter, ...])

alazy_load()

A lazy loader for Documents.

aload()

Load data into Document objects.

getERC1155Tx()

getERC20Tx()

getERC721Tx()

getEthBalance()

getInternalTx()

getNormTx()

lazy_load()

Lazy load Documents from table.

load()

Load data into Document objects.

load_and_split([text_splitter])

Load Documents and split into chunks.

Parameters:
  • account_address (str)

  • api_key (str)

  • filter (str)

  • page (int)

  • offset (int)

  • start_block (int)

  • end_block (int)

  • sort (str)

__init__(account_address: str, api_key: str = 'docs-demo', filter: str = 'normal_transaction', page: int = 1, offset: int = 10, start_block: int = 0, end_block: int = 99999999, sort: str = 'desc')[source]#
Parameters:
  • account_address (str)

  • api_key (str)

  • filter (str)

  • page (int)

  • offset (int)

  • start_block (int)

  • end_block (int)

  • sort (str)

async alazy_load() AsyncIterator[Document]#

A lazy loader for Documents.

Return type:

AsyncIterator[Document]

async aload() list[Document]#

Load data into Document objects.

Return type:

list[Document]

getERC1155Tx() List[Document][source]#
Return type:

List[Document]

getERC20Tx() List[Document][source]#
Return type:

List[Document]

getERC721Tx() List[Document][source]#
Return type:

List[Document]

getEthBalance() List[Document][source]#
Return type:

List[Document]

getInternalTx() List[Document][source]#
Return type:

List[Document]

getNormTx() List[Document][source]#
Return type:

List[Document]

lazy_load() Iterator[Document][source]#

Lazy load Documents from table.

Return type:

Iterator[Document]

load() list[Document]#

Load data into Document objects.

Return type:

list[Document]

load_and_split(text_splitter: TextSplitter | None = None) list[Document]#

Load Documents and split into chunks. Chunks are returned as Documents.

Do not override this method. It should be considered to be deprecated!

Parameters:

text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.

Returns:

List of Documents.

Return type:

list[Document]

Examples using EtherscanLoader