Skip to content

Commit

Permalink
feat(docs): more docs in structs module (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Aug 30, 2024
1 parent 65506e2 commit 0af0bb9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions eth_portfolio/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class AccessListEntry(Struct, frozen=True):
Example:
>>> entry = AccessListEntry(
... address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
... address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
... storage_keys=(b'key1', b'key2')
... )
>>> entry.address
Expand Down Expand Up @@ -163,12 +163,12 @@ class Transaction(_LedgerEntryBase, kw_only=True, frozen=True):

block_hash: str
"""
The hash of the block that includes this transaction.
The hash of the block that includes this Transaction.
"""

nonce: int
"""
The sender's transaction count at the time of this transaction.
The sender's transaction count at the time of this Transaction.
"""

type: Optional[int]
Expand All @@ -179,7 +179,7 @@ class Transaction(_LedgerEntryBase, kw_only=True, frozen=True):

gas: int
"""
The maximum amount of gas the sender is willing to use for the transaction.
The maximum amount of gas the sender is willing to use for the Transaction.
"""

gas_price: int
Expand All @@ -199,22 +199,22 @@ class Transaction(_LedgerEntryBase, kw_only=True, frozen=True):

input: str
"""
The data payload sent with the transaction, often used for contract interactions.
The data payload sent with the Transaction, often used for contract interactions.
"""

r: str
"""
The R component of the transaction's ECDSA signature.
The R component of the Transaction's ECDSA signature.
"""

s: str
"""
The S component of the transaction's ECDSA signature.
The S component of the Transaction's ECDSA signature.
"""

v: int
"""
The V component of the transaction's ECDSA signature, used for replay protection.
The V component of the Transaction's ECDSA signature, used for replay protection.
"""

access_list: Optional[Tuple[AccessListEntry, ...]] = None
Expand Down Expand Up @@ -269,7 +269,7 @@ class InternalTransfer(_LedgerEntryBase, kw_only=True, frozen=True):

block_hash: str
"""
The hash of the block containing the transaction that includes this internal transfer.
The hash of the block containing the transaction that includes this InternalTransfer.
"""

type: str
Expand All @@ -280,7 +280,7 @@ class InternalTransfer(_LedgerEntryBase, kw_only=True, frozen=True):

trace_address: str
"""
The path of sub-calls to reach this internal transfer within the transaction.
The path of sub-calls to reach this InternalTransfer within the transaction.
Represented as period-separated integers, e.g., "0.1.2" for the third sub-call of the second sub-call
of the first top-level call.
"""
Expand All @@ -297,12 +297,12 @@ class InternalTransfer(_LedgerEntryBase, kw_only=True, frozen=True):

subtraces: int
"""
The number of sub-operations spawned by this internal transfer.
The number of sub-operations spawned by this InternalTransfer.
"""

call_type: Optional[str] = None
"""
The type of call made in this internal transfer (e.g., "call", "delegatecall", "staticcall").
The type of call made in this InternalTransfer (e.g., "call", "delegatecall", "staticcall").
"""

input: Optional[str] = None
Expand All @@ -322,12 +322,12 @@ class InternalTransfer(_LedgerEntryBase, kw_only=True, frozen=True):

address: Optional[str] = None
"""
The address of the account or contract involved in this internal transfer.
The address of the account or contract involved in this InternalTransfer.
"""

code: Optional[str] = None
"""
The code of the contract involved in this internal transfer, if applicable.
The code of the contract involved in this InternalTransfer, if applicable.
"""


Expand Down Expand Up @@ -367,7 +367,7 @@ class TokenTransfer(_LedgerEntryBase, kw_only=True, frozen=True):
log_index: int
"""
The index of this transfer event within the transaction logs.
Used to uniquely identify this token Transfer event within the transaction.
Used to uniquely identify the Transfer event associated with this TokenTransfer within the transaction.
"""

token: Optional[str]
Expand Down

0 comments on commit 0af0bb9

Please sign in to comment.