36 verification_key_hash: str,
37 dispatcher_instance_file: str,
38 instance_file: str) ->
None:
40 Deploy the contract for a dummy application.
43 eth_network = ctx.obj[
"eth_network"]
46 with open(dispatcher_instance_file,
"r")
as dispatcher_instance_f:
47 dispatcher_desc = InstanceDescription.from_json_dict(
48 json.load(dispatcher_instance_f))
51 verification_key_hash_evm = list(hex_to_uint256_list(verification_key_hash))
52 print(f
"verification_key_hash_evm = {verification_key_hash_evm}")
54 web3 = open_web3_from_network(eth_network)
55 eth_address = load_eth_address(ctx.obj[
"eth_addr"])
56 eth_private_key_data = load_eth_private_key(ctx.obj[
"eth_private_key"])
57 instance_desc = InstanceDescription.deploy(
59 DUMMY_APP_CONTRACT_FILE,
63 DUMMY_APP_CONTRACT_DEPLOY_GAS,
64 {
"allow_paths": CONTRACTS_DIR},
65 [dispatcher_desc.address, verification_key_hash_evm])
67 with open(instance_file,
"w")
as instance_file_f:
68 json.dump(instance_desc.to_json_dict(), instance_file_f)
70 print(f
"Instance file written to '{instance_file}'")