Skip to content

Commit

Permalink
added debug contracts option
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsunastya committed Oct 15, 2024
1 parent a69b3c3 commit 9507ffa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion skale/skale_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def __init__(
wallet: BaseWallet | None = None,
state_path: str | None = None,
ts_diff: int | None = None,
provider_timeout: int = 30):
provider_timeout: int = 30,
debug: bool = False):
logger.info('Initializing skale.py, endpoint: %s, wallet: %s',
endpoint, type(wallet).__name__)
self._endpoint = endpoint
Expand All @@ -65,6 +66,7 @@ def __init__(
self.instance = self.project.get_instance(alias_or_address)
self.__contracts: Dict[str, BaseContract[Self]] = {}
self.__contracts_info: Dict[str, ContractInfo[Self]] = {}
self.debug = debug
self.set_contracts_info()
if wallet:
self.wallet = wallet
Expand Down
2 changes: 1 addition & 1 deletion skale/skale_paymaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def project_name(self) -> str:
def contracts_info(self) -> List[ContractInfo[SkalePaymaster]]:
import skale.contracts.paymaster as contracts
return [
ContractInfo('paymaster', 'Paymaster',
ContractInfo('paymaster', 'FastForwardPaymaster' if self.debug else 'Paymaster',
contracts.Paymaster, ContractTypes.API, False)

]
Expand Down

0 comments on commit 9507ffa

Please sign in to comment.