Remove calls to invalid()

Gas estimation seems to work just fine without them?
This commit is contained in:
Mark Spanbroek 2024-01-30 09:09:59 +01:00 committed by markspanbroek
parent c3d7db3456
commit 80dfa41e32
1 changed files with 0 additions and 15 deletions

View File

@ -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;