diff --git a/changelogs/unreleased/1368-dark64 b/changelogs/unreleased/1368-dark64 new file mode 100644 index 00000000..00fe5cf4 --- /dev/null +++ b/changelogs/unreleased/1368-dark64 @@ -0,0 +1 @@ +Fix staticcall input/output size in `addition` & `scalar_mul` \ No newline at end of file diff --git a/zokrates_proof_systems/src/solidity.rs b/zokrates_proof_systems/src/solidity.rs index f30e27f8..bc698548 100644 --- a/zokrates_proof_systems/src/solidity.rs +++ b/zokrates_proof_systems/src/solidity.rs @@ -456,7 +456,7 @@ library Pairing { input[3] = p2.Y; bool success; assembly { - success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60) + success := staticcall(sub(gas(), 2000), 6, input, 0x80, r, 0x40) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } } @@ -481,7 +481,7 @@ library Pairing { input[2] = s; bool success; assembly { - success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60) + success := staticcall(sub(gas(), 2000), 7, input, 0x60, r, 0x40) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } }