Zecale - Reconciling Privacy and Scalability on Smart-Contract Chains  0.5
Reference implementation of the Zecale protocol by Clearmatics
Functions
zecale.cli.zecale_wait Namespace Reference

Functions

None wait (Context ctx, str transaction_id)
 

Function Documentation

◆ wait()

None zecale.cli.zecale_wait.wait ( Context  ctx,
str  transaction_id 
)
Wait for a dispatcher transaction and print the result.

Definition at line 12 of file zecale_wait.py.

12 def wait(
13  ctx: Context,
14  transaction_id: str) -> None:
15  """
16  Wait for a dispatcher transaction and print the result.
17  """
18  cmd_ctx: CommandContext = ctx.obj
19 
20  # TODO: Remove some of the verbosity in this command.
21 
22  # Get dispatcher contract information
23  dispatcher_contract = cmd_ctx.get_dispatcher_contract()
24  print(f"dispatcher_contract={dispatcher_contract}")
25 
26  # Retrieve the tx receipt and dump logs
27  tx_receipt = cmd_ctx.get_web3().eth.waitForTransactionReceipt(
28  transaction_id, 10000)
29 
30  gas_used = tx_receipt.gasUsed
31  status = tx_receipt.status
32  print(f"(gasUsed={gas_used}, status={status})")
33  print(f"tx_receipt={tx_receipt}")
34 
35  # This is kept for convenience during contract development. It can be
36  # removed once the contract code is stable.
37  dispatcher_contract.dump_logs(tx_receipt)
zecale.cli.zecale_wait.wait
None wait(Context ctx, str transaction_id)
Definition: zecale_wait.py:12