Skip to content

Commit 3c9eaae

Browse files
committed
T
1 parent 2df70dc commit 3c9eaae

File tree

7 files changed

+26
-17
lines changed

7 files changed

+26
-17
lines changed

foundry.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ remappings = [
4747

4848
[fmt]
4949
line_length = 100 # While we allow up to 120, we lint at 100 for readability.
50+
ignore = ["src/accounts/EIP7702Proxy.sol"]
5051

5152
[profile.default.fuzz]
5253
runs = 256

src/accounts/EIP7702Proxy.sol

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.24;
3-
43
// solc: 0.8.28, optimization runs: 200, evm version: cancun.
54

65
/// @notice Relay proxy for EIP7702 delegations.
@@ -58,10 +57,8 @@ contract EIP7702Proxy {
5857
// to aid proxy detection on block explorers.
5958
sstore(_ERC1967_IMPLEMENTATION_SLOT, initialImplementation)
6059
sstore(_ERC1967_ADMIN_SLOT, initialAdmin)
61-
defaultImplementation := mul(
62-
lt(initialAdmin, iszero(iszero(initialImplementation))),
63-
initialImplementation
64-
)
60+
defaultImplementation :=
61+
mul(lt(initialAdmin, iszero(iszero(initialImplementation))), initialImplementation)
6562
}
6663
_defaultImplementation = defaultImplementation;
6764
}
@@ -143,12 +140,7 @@ contract EIP7702Proxy {
143140
if iszero(
144141
and( // The arguments of `and` are evaluated from right to left.
145142
delegatecall(
146-
gas(),
147-
mload(calldatasize()),
148-
0x00,
149-
calldatasize(),
150-
0x00,
151-
0x00
143+
gas(), mload(calldatasize()), 0x00, calldatasize(), 0x00, 0x00
152144
),
153145
// Fetch the implementation from the proxy.
154146
staticcall(gas(), s, 0x00, 0x00, calldatasize(), 0x20)

src/utils/FixedPointMathLib.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,11 @@ library FixedPointMathLib {
350350
/// See: https://en.wikipedia.org/wiki/Lambert_W_function
351351
/// a.k.a. Product log function. This is an approximation of the principal branch.
352352
/// Note: This function is an approximation. Monotonically increasing.
353-
function lambertW0Wad(int256 x) internal pure returns (int256 w) {
353+
function lambertW0Wad(int256 x)
354+
internal
355+
pure
356+
returns (int256 w)
357+
{
354358

355359
// forgefmt: disable-next-item
356360
unchecked {

src/utils/JSONParserLib.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,10 @@ library JSONParserLib {
688688
if eq(chr(_pOut), 46) { _pOut := skip0To9s(add(_pOut, 1), end_, 1) } // '.'.
689689
let t_ := mload(_pOut)
690690
// 'E', 'e'.
691-
if eq(or(0x20, byte(0, t_)), 101) {
691+
if eq(
692+
or(0x20, byte(0, t_)),
693+
101
694+
) {
692695

693696
// forgefmt: disable-next-item
694697
_pOut := skip0To9s(add(byte(sub(byte(1, t_), 14), 0x010001), // '+', '-'.

src/utils/MerkleProofLib.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ library MerkleProofLib {
206206
// If the number of flags is correct.
207207
for {} eq(add(leaves.length, proof.length), add(flags.length, 1)) {} {
208208
// For the case where `proof.length + leaves.length == 1`.
209-
if iszero(flags.length) {
209+
if iszero(
210+
flags.length
211+
) {
210212

211213
// `isValid = (proof.length == 1 ? proof[0] : leaves[0]) == root`.
212214
// forgefmt: disable-next-item

src/utils/g/JSONParserLib.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,10 @@ library JSONParserLib {
692692
if eq(chr(_pOut), 46) { _pOut := skip0To9s(add(_pOut, 1), end_, 1) } // '.'.
693693
let t_ := mload(_pOut)
694694
// 'E', 'e'.
695-
if eq(or(0x20, byte(0, t_)), 101) {
695+
if eq(
696+
or(0x20, byte(0, t_)),
697+
101
698+
) {
696699

697700
// forgefmt: disable-next-item
698701
_pOut := skip0To9s(add(byte(sub(byte(1, t_), 14), 0x010001), // '+', '-'.

test/LibString.t.sol

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@ contract LibStringTest is SoladyTest {
530530
assertEq(LibString.replace("abc", "d", "x"), "abc");
531531
}
532532

533-
function testStringReplaceMedium() public {
533+
function testStringReplaceMedium()
534+
public
535+
{
534536

535537
// forgefmt: disable-next-item
536538
string memory subject = "70708741044725766535585242414884609539555049888764130733849700923779599488691391677696419266840";
@@ -541,7 +543,9 @@ contract LibStringTest is SoladyTest {
541543
assertEq(LibString.replace(subject, search, replacement), expectedResult);
542544
}
543545

544-
function testStringReplaceLong() public {
546+
function testStringReplaceLong()
547+
public
548+
{
545549

546550
// forgefmt: disable-next-item
547551
string memory subject = "01234567890123456789012345678901_search_search_search_search_search_search_23456789012345678901234567890123456789_search_search_search_search_search_search";

0 commit comments

Comments
 (0)