Skip to content

Commit 0d78d29

Browse files
committed
Fixed lint
1 parent d576641 commit 0d78d29

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

contracts/utils/math/Math.sol

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,7 @@ library Math {
412412
* - modulus can't be zero
413413
* - result should be obtained succesfully
414414
*/
415-
function modExp(
416-
uint256 b,
417-
uint256 e,
418-
uint256 m
419-
) internal view returns (uint256) {
415+
function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {
420416
require(m != 0, "ModularExponentiation: Can't calculate for modulus equal to zero");
421417
bool success;
422418
bytes memory result;

test/utils/math/Math.t.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,13 @@ contract MathTest is Test {
186186
// However, we can repeatedly multiply and reduce modulo m
187187

188188
uint256 expected = 1;
189-
for(uint i = 0; i < e; i++) {
189+
for (uint i = 0; i < e; i++) {
190190
expected = _mulmod(expected, b, m);
191191
}
192192

193193
assertEq(result, expected);
194194
}
195195

196-
197196
// External call
198197
function muldiv(uint256 x, uint256 y, uint256 d) external pure returns (uint256) {
199198
return Math.mulDiv(x, y, d);
@@ -211,8 +210,6 @@ contract MathTest is Test {
211210
}
212211
}
213212

214-
215-
216213
function _mulHighLow(uint256 x, uint256 y) private pure returns (uint256 high, uint256 low) {
217214
(uint256 x0, uint256 x1) = (x & type(uint128).max, x >> 128);
218215
(uint256 y0, uint256 y1) = (y & type(uint128).max, y >> 128);

test/utils/math/Math.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ contract('Math', function () {
243243
const modulus = new BN('0');
244244
await expectRevert(
245245
this.math.modExp.call(base, exponent, modulus),
246-
'ModularExponentiation: Can\'t calculate for modulus equal to zero',
246+
"ModularExponentiation: Can't calculate for modulus equal to zero",
247247
);
248248
});
249249
});

0 commit comments

Comments
 (0)