Definition at line 21 of file test_mimc_contract.py.
◆ setUpClass()
None test_contracts.test_mimc_contract.TestMiMCContract.setUpClass |
( |
| ) |
|
|
static |
Definition at line 24 of file test_mimc_contract.py.
24 def setUpClass() -> None:
27 contract_instance_desc = InstanceDescription.deploy(
29 join(contracts_dir,
"TestMiMC.sol"),
34 {
"allow_paths": contracts_dir})
35 global CONTRACT_INSTANCE
36 CONTRACT_INSTANCE = contract_instance_desc.instantiate(web3)
◆ test_mimc_alt_bn128()
None test_contracts.test_mimc_contract.TestMiMCContract.test_mimc_alt_bn128 |
( |
|
self | ) |
|
Definition at line 38 of file test_mimc_contract.py.
38 def test_mimc_alt_bn128(self) -> None:
40 x =
int(28948022309329048855892746252171976963317496166410141009864396001978282409983).to_bytes(32,
'big')
41 y =
int(14220067918847996031108144435763672811050758065945364308986253046354060608451).to_bytes(32,
'big')
43 h = MiMCAltBN128().hash(x, y)
45 result = CONTRACT_INSTANCE.functions.testMimcAltBN128(x, y).call()
46 self.assertEqual(h, result)
◆ test_mimc_bls12_377()
None test_contracts.test_mimc_contract.TestMiMCContract.test_mimc_bls12_377 |
( |
|
self | ) |
|
Definition at line 48 of file test_mimc_contract.py.
48 def test_mimc_bls12_377(self) -> None:
50 x =
int(28948022309329048855892746252171976963317496166410141009864396001978282409983).to_bytes(32,
'big')
51 y =
int(14220067918847996031108144435763672811050758065945364308986253046354060608451).to_bytes(32,
'big')
53 h = MiMCBLS12_377().hash(x, y)
55 result = CONTRACT_INSTANCE.functions.testMimcBLS12_377(x, y).call()
56 self.assertEqual(h, result)
The documentation for this class was generated from the following file: