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

Functions

None deploy (Context ctx, str verification_key_file)
 

Variables

 default
 
 help
 

Function Documentation

◆ deploy()

None zecale.cli.zecale_deploy.deploy ( Context  ctx,
str  verification_key_file 
)
Deploy the zecale dispatcher contract.

Definition at line 20 of file zecale_deploy.py.

20 def deploy(
21  ctx: Context,
22  verification_key_file: str) -> None:
23  """
24  Deploy the zecale dispatcher contract.
25  """
26 
27  cmd_ctx: CommandContext = ctx.obj
28  aggregator_config = cmd_ctx.get_aggregator_configuration()
29  snark = aggregator_config.wrapper_snark
30  pp = aggregator_config.wrapper_pairing_parameters
31  (eth_addr, eth_private_key) = cmd_ctx.get_eth_key_and_address()
32 
33  # Load verification key
34  vk = load_verification_key(snark, verification_key_file)
35 
36  # Deploy contract, passing the encoded key to the constructor
37  web3 = cmd_ctx.get_web3()
38  _dispatcher, dispatcher_instance = DispatcherContract.deploy(
39  web3, snark, pp, vk, eth_addr, eth_private_key)
40 
41  # Save the contract instance description
42  with open(cmd_ctx.instance_file, "w") as instance_f:
43  json.dump(dispatcher_instance.to_json_dict(), instance_f)
Here is the call graph for this function:

Variable Documentation

◆ default

zecale.cli.zecale_deploy.default

Definition at line 16 of file zecale_deploy.py.

◆ help

zecale.cli.zecale_deploy.help

Definition at line 17 of file zecale_deploy.py.

zecale.cli.utils.load_verification_key
IVerificationKey load_verification_key(IZKSnarkProvider zksnark, str vk_file)
Definition: utils.py:11
zecale.cli.zecale_deploy.deploy
None deploy(Context ctx, str verification_key_file)
Definition: zecale_deploy.py:20