-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,317 additions
and
1,134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import sys | ||
from abc import abstractmethod | ||
from typing import IO, Any, Dict, List, Optional, Sequence | ||
|
||
from ape.types import ContractFunctionPath | ||
from ape.types.trace import GasReport | ||
from ape.utils.basemodel import BaseInterfaceModel | ||
|
||
|
||
class TraceAPI(BaseInterfaceModel): | ||
""" | ||
The class returned from | ||
:meth:`~ape.api.providers.ProviderAPI.get_transaction_trace`. | ||
""" | ||
|
||
@abstractmethod | ||
def show(self, verbose: bool = False, file: IO[str] = sys.stdout): | ||
""" | ||
Show the enriched trace. | ||
""" | ||
|
||
@abstractmethod | ||
def get_gas_report( | ||
self, exclude: Optional[Sequence["ContractFunctionPath"]] = None | ||
) -> GasReport: | ||
""" | ||
Get the gas report. | ||
""" | ||
|
||
@abstractmethod | ||
def show_gas_report(self, verbose: bool = False, file: IO[str] = sys.stdout): | ||
""" | ||
Show the gas report. | ||
""" | ||
|
||
@property | ||
@abstractmethod | ||
def return_value(self) -> Any: | ||
""" | ||
The return value deduced from the trace. | ||
""" | ||
|
||
@property | ||
@abstractmethod | ||
def revert_message(self) -> Optional[str]: | ||
""" | ||
The revert message deduced from the trace. | ||
""" | ||
|
||
@abstractmethod | ||
def get_raw_frames(self) -> List[Dict]: | ||
""" | ||
Get raw trace frames for deeper analysis. | ||
""" | ||
|
||
@abstractmethod | ||
def get_raw_calltree(self) -> Dict: | ||
""" | ||
Get a raw calltree for deeper analysis. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.