diff --git a/contracts/Groth16Verifier.sol b/contracts/Groth16Verifier.sol index 54565c3..cb84825 100644 --- a/contracts/Groth16Verifier.sol +++ b/contracts/Groth16Verifier.sol @@ -45,11 +45,6 @@ library Pairing { // solhint-disable-next-line no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60) - // Use "invalid" to make gas estimation work - switch success - case 0 { - invalid() - } } require(success, "pairing-add-failed"); } @@ -68,11 +63,6 @@ library Pairing { // solhint-disable-next-line no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60) - // Use "invalid" to make gas estimation work - switch success - case 0 { - invalid() - } } require(success, "pairing-mul-failed"); } @@ -109,11 +99,6 @@ library Pairing { out, 0x20 ) - // Use "invalid" to make gas estimation work - switch success - case 0 { - invalid() - } } require(success, "pairing-opcode-failed"); return out[0] != 0;