Definition at line 87 of file test_bw6_761_contract.py.
◆ setUpClass()
None test_contracts.test_bw6_761_contract.TestBW6_761Contract.setUpClass |
( |
| ) |
|
|
static |
Definition at line 90 of file test_bw6_761_contract.py.
90 def setUpClass() -> None:
91 print(
"Deploying TestBW6_761.sol")
92 _web3, eth = mock.open_test_web3()
93 _bw6_interface, bw6_instance = mock.deploy_contract(
99 BW6_INSTANCE = bw6_instance
◆ test_bw6_ecadd()
None test_contracts.test_bw6_761_contract.TestBW6_761Contract.test_bw6_ecadd |
( |
|
self | ) |
|
Check that [6] == [2] + [4]
Definition at line 101 of file test_bw6_761_contract.py.
101 def test_bw6_ecadd(self) -> None:
103 Check that [6] == [2] + [4]
105 result = BW6_INSTANCE.functions.testECAdd(G1_2 + G1_4).call()
106 self.assertEqual(G1_6, result)
◆ test_bw6_ecmul()
None test_contracts.test_bw6_761_contract.TestBW6_761Contract.test_bw6_ecmul |
( |
|
self | ) |
|
Check that [-8] == -2 * [4]
Definition at line 108 of file test_bw6_761_contract.py.
108 def test_bw6_ecmul(self) -> None:
110 Check that [-8] == -2 * [4]
112 result = BW6_INSTANCE.functions.testECMul(G1_4 + FR_MINUS_2).call()
113 self.assertEqual(G1_MINUS_8, result)
◆ test_bw6_ecpairing()
None test_contracts.test_bw6_761_contract.TestBW6_761Contract.test_bw6_ecpairing |
( |
|
self | ) |
|
Check that e([6], [4]) * e([3],[8]) * e([4],[4]) * e([-8], [8]) == 1
Definition at line 115 of file test_bw6_761_contract.py.
115 def test_bw6_ecpairing(self) -> None:
117 Check that e([6], [4]) * e([3],[8]) * e([4],[4]) * e([-8], [8]) == 1
121 points = G1_6 + G2_4 + G1_3 + G2_8 + G1_4 + G2_4 + G1_MINUS_8 + G2_8
122 result = BW6_INSTANCE.functions.testECPairing(points).call()
123 self.assertEqual(1, result)
125 points = G1_6 + G2_4 + G1_3 + G2_8 + G1_4 + G2_4 + G1_MINUS_8 + G2_4
126 result = BW6_INSTANCE.functions.testECPairing(points).call()
127 self.assertEqual(0, result)
The documentation for this class was generated from the following file: