Skip to content

Commit

Permalink
🚸 Improve data representation in deployment tx confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Dec 12, 2024
1 parent b7e3bb9 commit bb7737b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions wake/deployment/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
check_connected,
fix_library_abi,
)
from wake.development.globals import chain_interfaces_manager, get_config
from wake.development.globals import chain_interfaces_manager, get_config, get_verbosity
from wake.development.json_rpc.communicator import JsonRpcError
from wake.development.transactions import (
Eip1559Transaction,
Expand Down Expand Up @@ -404,7 +404,15 @@ def _confirm_transaction(self, tx: TxParams) -> None:
config = get_config()
if config.deployment.silent:
return
pprint(tx, console=console, max_string=200)

tx_copy = tx.copy()
if "data" in tx_copy:
tx_copy["data"] = "0x" + tx_copy["data"].hex()

if get_verbosity() > 0:
pprint(tx_copy, console=console, max_string=None)
else:
pprint(tx_copy, console=console, max_string=1024)

if config.deployment.confirm_transactions:
confirm = Confirm.ask("Sign and send transaction?")
Expand Down

0 comments on commit bb7737b

Please sign in to comment.