| 616 | |
| 617 | @dataclass |
| 618 | class Query: |
| 619 | # The block to start the query from |
| 620 | from_block: int |
| 621 | # Field selection. The user can select which fields they are interested in, requesting less fields will improve |
| 622 | # query execution time and reduce the payload size so the user should always use a minimal number of fields. |
| 623 | field_selection: FieldSelection |
| 624 | # The block to end the query at. If not specified, the query will go until the |
| 625 | # end of data. Exclusive, the returned range will be [from_block..to_block). |
| 626 | # The query will return before it reaches this target block if it hits the time limit |
| 627 | # configured on the server. The user should continue their query by putting the |
| 628 | # next_block field in the response into from_block field of their next query. This implements |
| 629 | # pagination. |
| 630 | to_block: Optional[int] = None |
| 631 | # List of log selections, these have an OR relationship between them, so the query will return logs |
| 632 | # that match any of these selections. |
| 633 | logs: Optional[list[LogSelection]] = None |
| 634 | # List of transaction selections, the query will return transactions that match any of these selections, and |
| 635 | # it will return transactions that are related to the returned logs. |
| 636 | transactions: Optional[list[TransactionSelection]] = None |
| 637 | # List of trace selections, the query will return traces that match any of these selections and |
| 638 | # it will re turn traces that are related to the returned logs. |
| 639 | traces: Optional[list[TraceSelection]] = None |
| 640 | # List of block selections, the query will return blocks that match any of these selections |
| 641 | blocks: Optional[list[BlockSelection]] = None |
| 642 | # Weather to include all blocks regardless of if they are related to a returned transaction or log. Normally |
| 643 | # the server will return only the blocks that are related to the transaction or logs in the response. But if this |
| 644 | # is set to true, the server will return data for all blocks in the requested range [from_block, to_block). |
| 645 | include_all_blocks: Optional[bool] = None |
| 646 | # Maximum number of blocks that should be returned, the server might return more blocks than this number but |
| 647 | # it won't overshoot by too much. |
| 648 | max_num_blocks: Optional[int] = None |
| 649 | # Maximum number of transactions that should be returned, the server might return more transactions than this |
| 650 | # number but it won't overshoot by too much. |
| 651 | max_num_transactions: Optional[int] = None |
| 652 | # Maximum number of logs that should be returned, the server might return more logs than this number but |
| 653 | # it won't overshoot by too much. |
| 654 | max_num_logs: Optional[int] = None |
| 655 | # Maximum number of traces that should be returned, the server might return more traces than this number but |
| 656 | # it won't overshoot by too much. |
| 657 | max_num_traces: Optional[int] = None |
| 658 | # Selects join mode for the query, |
| 659 | # Default: join in this order logs -> transactions -> traces -> blocks |
| 660 | # JoinAll: join everything to everything. For example if logSelection matches log0, we get the |
| 661 | # associated transaction of log0 and then we get associated logs of that transaction as well. Applites similarly |
| 662 | # to blocks, traces. |
| 663 | # JoinNothing: join nothing. |
| 664 | join_mode: Optional[JoinMode] = None |
| 665 | |
| 666 | |
| 667 | @dataclass |
no outgoing calls
no test coverage detected