Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Functions
zeth.cli.zeth_wait Namespace Reference

Functions

None wait (Context ctx, str transaction_id)
 

Function Documentation

◆ wait()

None zeth.cli.zeth_wait.wait ( Context  ctx,
str  transaction_id 
)
Wait for a mix transaction and dump all log data. Does not update the
wallet. Use sync to scan the chain for new notes.

Definition at line 13 of file zeth_wait.py.

13 def wait(ctx: Context, transaction_id: str) -> None:
14  """
15  Wait for a mix transaction and dump all log data. Does not update the
16  wallet. Use sync to scan the chain for new notes.
17  """
18  client_ctx = ctx.obj
19  mixer_desc = load_mixer_description_from_ctx(client_ctx)
20  instance_desc = mixer_desc.mixer
21 
22  # Retrieve the tx receipt and dump logs
23  web3 = open_web3_from_ctx(client_ctx) # type: ignore
24  instance = instance_desc.instantiate(web3)
25  tx_receipt = web3.eth.waitForTransactionReceipt(transaction_id, 10000) \
26  # pylint: disable=no-member
27 
28  print("LogDebug events:")
29  logs = get_event_logs_from_tx_receipt(instance, "LogDebug", tx_receipt)
30  for log in logs:
31  print(
32  f" {log.args['message']}: {log.args['value']} "
33  f"({hex(log.args['value'])})")
34 
35  print("LogMix events:")
36  logs = get_event_logs_from_tx_receipt(instance, "LogMix", tx_receipt)
37  for log in logs:
38  print(f" {log}")
Here is the call graph for this function:
Here is the caller graph for this function:
zeth.cli.utils.open_web3_from_ctx
Any open_web3_from_ctx(ClientConfig ctx)
Definition: utils.py:135
zeth.cli.utils.load_mixer_description_from_ctx
MixerDescription load_mixer_description_from_ctx(ClientConfig ctx)
Definition: utils.py:220
zeth.cli.zeth_wait.wait
None wait(Context ctx, str transaction_id)
Definition: zeth_wait.py:13
zeth.core.contracts.get_event_logs_from_tx_receipt
Iterator[Any] get_event_logs_from_tx_receipt(Any instance, str event_name, Any tx_receipt)
Definition: contracts.py:226