Skip to content

Commit

Permalink
docs(fix): fixed example prints
Browse files Browse the repository at this point in the history
  • Loading branch information
nvy-0x authored and BobTheBuidler committed Aug 30, 2024
1 parent 8f3df13 commit 248025b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eth_portfolio/_loaders/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ async def get_nonce_at_block(address: Address, block: Block) -> int:
ValueError: If there is an issue retrieving the nonce, or if the block is invalid.
Example:
>>> nonce = await get_nonce_at_block(address="0x1234567890abcdef1234567890abcdef12345678", block=12345678); print(f"The nonce at block {block} is {nonce}.")
>>> nonce = await get_nonce_at_block(address="0x1234567890abcdef1234567890abcdef12345678", block=12345678)
>>> print(f"The nonce at block {block} is {nonce}.")
"""
try:
Expand Down Expand Up @@ -190,7 +191,8 @@ async def _get_block_transactions(block: Block) -> List[TxData]:
A list of transaction data objects from the block.
Example:
>>> transactions = await _get_block_transactions(block=12345678); [print(tx['hash']) for tx in transactions]
>>> transactions = await _get_block_transactions(block=12345678)
>>> [print(tx['hash']) for tx in transactions]
"""
block = await dank_mids.eth.get_block(block, full_transactions=True)
return block.transactions
Expand All @@ -206,5 +208,6 @@ async def _get_block_transactions(block: Block) -> List[TxData]:
This queue processes the retrieval of block transactions using a large number of workers to handle potentially high throughput in blockchain environments. It wraps the _get_block_transactions function to provide efficient concurrent processing.
Example:
>>> transactions = await get_block_transactions.process(block=12345678); [print(tx['hash']) for tx in transactions]
>>> transactions = await get_block_transactions.process(block=12345678)
>>> [print(tx['hash']) for tx in transactions]
"""

0 comments on commit 248025b

Please sign in to comment.