Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Public Member Functions | Static Public Member Functions | List of all members
test_contracts.test_groth16_bls12_377_contract.TestGroth16BLS12_377Contract Class Reference
Inheritance diagram for test_contracts.test_groth16_bls12_377_contract.TestGroth16BLS12_377Contract:
Inheritance graph
[legend]
Collaboration diagram for test_contracts.test_groth16_bls12_377_contract.TestGroth16BLS12_377Contract:
Collaboration graph
[legend]

Public Member Functions

None test_groth16_bls12_377_valid (self)
 
None test_groth16_bls12_377_invalid (self)
 

Static Public Member Functions

None setUpClass ()
 

Detailed Description

Definition at line 69 of file test_groth16_bls12_377_contract.py.

Member Function Documentation

◆ setUpClass()

None test_contracts.test_groth16_bls12_377_contract.TestGroth16BLS12_377Contract.setUpClass ( )
static

Definition at line 72 of file test_groth16_bls12_377_contract.py.

72  def setUpClass() -> None:
73  web3: Any = open_web3_from_network(get_eth_network(None))
74  contracts_dir = get_contracts_dir()
75  contract_instance_desc = InstanceDescription.deploy(
76  web3,
77  join(contracts_dir, "TestGroth16BLS12_377.sol"),
78  "TestGroth16BLS12_377",
79  web3.eth.accounts[0], # pylint: disable=no-member
80  None,
81  500000,
82  {"allow_paths": contracts_dir})
83  global CONTRACT_INSTANCE # pylint: disable=global-statement
84  CONTRACT_INSTANCE = contract_instance_desc.instantiate(web3)
85 
Here is the call graph for this function:

◆ test_groth16_bls12_377_invalid()

None test_contracts.test_groth16_bls12_377_contract.TestGroth16BLS12_377Contract.test_groth16_bls12_377_invalid (   self)

Definition at line 102 of file test_groth16_bls12_377_contract.py.

102  def test_groth16_bls12_377_invalid(self) -> None:
103  self.assertFalse(self._invoke_groth16_bls12_377_verify(
104  VERIFICATION_KEY, PROOF, INPUTS_INVALID))
Here is the call graph for this function:

◆ test_groth16_bls12_377_valid()

None test_contracts.test_groth16_bls12_377_contract.TestGroth16BLS12_377Contract.test_groth16_bls12_377_valid (   self)

Definition at line 98 of file test_groth16_bls12_377_contract.py.

98  def test_groth16_bls12_377_valid(self) -> None:
99  self.assertTrue(self._invoke_groth16_bls12_377_verify(
100  VERIFICATION_KEY, PROOF, INPUTS_VALID))
101 
Here is the call graph for this function:

The documentation for this class was generated from the following file:
zeth.cli.utils.get_eth_network
NetworkConfig get_eth_network(Optional[str] eth_network)
Definition: utils.py:84
zeth.cli.utils.open_web3_from_network
Any open_web3_from_network(NetworkConfig eth_net)
Definition: utils.py:114
zeth.core.utils.get_contracts_dir
str get_contracts_dir()
Definition: utils.py:255