@@ -19,6 +19,7 @@ import {ECUtils} from "./ECUtils.sol";
19
19
*/
20
20
contract BLSSigCheckOperatorStateRetriever is OperatorStateRetriever {
21
21
using ECUtils for BN254.G1Point;
22
+ using BN254 for BN254.G1Point;
22
23
using BitmapUtils for uint256 ;
23
24
24
25
/// @dev Thrown when the signature is not on the curve.
@@ -146,12 +147,9 @@ contract BLSSigCheckOperatorStateRetriever is OperatorStateRetriever {
146
147
147
148
// Trim the nonSignerOperatorIds array to the actual count
148
149
bytes32 [] memory trimmedNonSignerOperatorIds = new bytes32 [](nonSignerOperatorsCount);
149
- for (uint256 i = 0 ; i < nonSignerOperatorsCount; i++ ) {
150
- trimmedNonSignerOperatorIds[i] = nonSignerOperatorIds[i];
151
- }
152
-
153
150
BN254.G1Point[] memory nonSignerPubkeys = new BN254.G1Point [](nonSignerOperatorsCount);
154
151
for (uint256 i = 0 ; i < nonSignerOperatorsCount; i++ ) {
152
+ trimmedNonSignerOperatorIds[i] = nonSignerOperatorIds[i];
155
153
address nonSignerOperator =
156
154
registryCoordinator.getOperatorFromId (trimmedNonSignerOperatorIds[i]);
157
155
(nonSignerPubkeys[i],) = m.blsApkRegistry.getRegisteredPubkey (nonSignerOperator);
@@ -189,7 +187,7 @@ contract BLSSigCheckOperatorStateRetriever is OperatorStateRetriever {
189
187
address operator = registryCoordinator.getOperatorFromId (operatorIds[i]);
190
188
BN254.G1Point memory operatorPk;
191
189
(operatorPk.X, operatorPk.Y) = blsApkRegistry.operatorToPubkey (operator);
192
- apk = BN254 .plus (apk, operatorPk);
190
+ apk = apk .plus (operatorPk);
193
191
}
194
192
return apk;
195
193
}
0 commit comments