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