Zecale - Reconciling Privacy and Scalability on Smart-Contract Chains  0.5
Reference implementation of the Zecale protocol by Clearmatics
zecale_submit.py
Go to the documentation of this file.
1 # Copyright (c) 2015-2022 Clearmatics Technologies Ltd
2 #
3 # SPDX-License-Identifier: LGPL-3.0+
4 
5 from zecale.cli.utils import load_nested_transaction
6 from zecale.cli.command_context import CommandContext
7 from click import command, argument, pass_context, Context
8 
9 
10 @command()
11 @argument("tx_file")
12 @pass_context
13 def submit(ctx: Context, tx_file: str) -> None:
14  """
15  Submit a nested transaction to the aggregation server
16  """
17  cmd_ctx: CommandContext = ctx.obj
18 
19  # Load nested transaction and submit to the aggregation server
20  nested_snark = cmd_ctx.get_nested_snark()
21  nested_tx = load_nested_transaction(nested_snark, tx_file)
22  aggregator_client = cmd_ctx.get_aggregator_client()
23  aggregator_client.submit_nested_transaction(nested_snark, nested_tx)
zecale.cli.utils
Definition: utils.py:1
zecale.cli.utils.load_nested_transaction
NestedTransaction load_nested_transaction(IZKSnarkProvider zksnark, str tx_file)
Definition: utils.py:20
zecale.cli.command_context
Definition: command_context.py:1
zecale.cli.zecale_submit.submit
None submit(Context ctx, str tx_file)
Definition: zecale_submit.py:13