Query the deployed contract to find the value stored for a given scalar.
(These values are the parameters submitted along side the proof for the
given scalar.)
Definition at line 22 of file get.py.
26 check: Optional[int]) ->
None:
28 Query the deployed contract to find the value stored for a given scalar.
29 (These values are the parameters submitted along side the proof for the
33 eth_network = ctx.obj[
"eth_network"]
36 with open(instance_file,
"r")
as instance_f:
37 instance_desc = InstanceDescription.from_json_dict(json.load(instance_f))
40 web3 = open_web3_from_network(eth_network)
41 app_contract = instance_desc.instantiate(web3)
42 result: int = app_contract.functions.get(scalar).call()
43 print(f
"{scalar}: {result}")
45 if (check
is not None)
and (result != check):
46 raise ClickException(
"state check failed")