Skip to content

feat: add existence check to account factory, consolidate to one factory - #354

Merged
dancoombs merged 1 commit into
developfrom
danc/factory-check
Dec 19, 2025
Merged

dancoombs merged 1 commit into
developfrom
danc/factory-check

Conversation

@dancoombs

Copy link
Copy Markdown

Motivation

Solution

@dancoombs
dancoombs marked this pull request as ready for review December 18, 2025 23:35
Base automatically changed from danc/bump-minor-2 to develop December 19, 2025 00:39
@github-actions

Copy link
Copy Markdown

Contract sizes:

 | Contract                     | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
 |------------------------------|------------------|-------------------|--------------------|---------------------|
-| AccountFactory               | 6,604            | 7,071             | 17,972             | 42,081              |
+| AccountFactory               | 6,604            | 7,161             | 17,972             | 41,991              |
 | Address                      | 16               | 44                | 24,560             | 49,108              |
 | AllowlistModule              | 10,148           | 10,174            | 14,428             | 38,978              |
 | Base64                       | 16               | 44                | 24,560             | 49,108              |
 | Create2                      | 16               | 44                | 24,560             | 49,108              |
 | ECDSA                        | 16               | 44                | 24,560             | 49,108              |
 | ERC165Checker                | 16               | 44                | 24,560             | 49,108              |
 | ERC1967Utils                 | 16               | 44                | 24,560             | 49,108              |
 | ExecutionInstallDelegate     | 5,835            | 5,880             | 18,741             | 43,272              |
 | FCL_Elliptic_ZZ              | 16               | 44                | 24,560             | 49,108              |
 | FCL_ecdsa                    | 16               | 44                | 24,560             | 49,108              |
 | Math                         | 16               | 44                | 24,560             | 49,108              |
 | MessageHashUtils             | 16               | 44                | 24,560             | 49,108              |
 | ModularAccount               | 22,935           | 23,323            | 1,641              | 25,829              |
 | NativeTokenLimitModule       | 4,917            | 4,943             | 19,659             | 44,209              |
 | PaymasterGuardModule         | 2,028            | 2,054             | 22,548             | 47,098              |
 | SafeERC20                    | 16               | 44                | 24,560             | 49,108              |
 | SemiModularAccount7702       | 23,336           | 23,717            | 1,240              | 25,435              |
 | SemiModularAccountBytecode   | 23,812           | 24,200            | 764                | 24,952              |
 | SignatureChecker             | 16               | 44                | 24,560             | 49,108              |
 | SignedMath                   | 16               | 44                | 24,560             | 49,108              |
 | SingleSignerValidationModule | 3,853            | 3,879             | 20,723             | 45,273              |
 | StorageSlot                  | 16               | 44                | 24,560             | 49,108              |
 | Strings                      | 16               | 44                | 24,560             | 49,108              |
 | TimeRangeModule              | 2,435            | 2,461             | 22,141             | 46,691              |
 | WebAuthn                     | 16               | 44                | 24,560             | 49,108              |
-| WebAuthnFactory              | 4,318            | 4,741             | 20,258             | 44,411              |
 | WebAuthnValidationModule     | 9,277            | 9,303             | 15,299             | 39,849              |

Code coverage:

File % Lines % Statements % Branches % Funcs
src/account/AccountBase.sol 100.00% (12/12) 100.00% (7/7) 100.00% (2/2) 100.00% (4/4)
src/account/AccountStorageInitializable.sol 100.00% (21/21) 100.00% (26/26) 100.00% (5/5) 100.00% (2/2)
src/account/ModularAccount.sol 100.00% (6/6) 100.00% (6/6) 100.00% (0/0) 100.00% (3/3)
src/account/ModularAccountBase.sol 99.09% (328/331) 96.51% (359/372) 77.59% (45/58) 100.00% (36/36)
src/account/ModularAccountView.sol 100.00% (32/32) 100.00% (31/31) 100.00% (3/3) 100.00% (5/5)
src/account/ModuleManagerInternals.sol 94.03% (63/67) 95.06% (77/81) 63.64% (7/11) 100.00% (4/4)
src/account/SemiModularAccount7702.sol 0.00% (0/9) 0.00% (0/6) 0.00% (0/1) 0.00% (0/3)
src/account/SemiModularAccountBase.sol 90.48% (76/84) 91.92% (91/99) 64.71% (11/17) 100.00% (16/16)
src/account/SemiModularAccountBytecode.sol 100.00% (8/8) 100.00% (7/7) 100.00% (1/1) 100.00% (2/2)
src/account/SemiModularAccountStorageOnly.sol 55.56% (5/9) 50.00% (5/10) 100.00% (0/0) 33.33% (1/3)
src/account/TokenReceiver.sol 33.33% (2/6) 33.33% (1/3) 100.00% (0/0) 33.33% (1/3)
src/factory/AccountFactory.sol 81.43% (57/70) 89.04% (65/73) 70.00% (7/10) 62.50% (10/16)
src/helpers/ExecutionInstallDelegate.sol 89.39% (59/66) 89.47% (68/76) 25.00% (2/8) 100.00% (7/7)
src/libraries/ExecutionLib.sol 99.66% (297/298) 98.89% (268/271) 90.91% (30/33) 100.00% (24/24)
src/libraries/KnownSelectorsLib.sol 100.00% (18/18) 100.00% (34/34) 100.00% (0/0) 100.00% (2/2)
src/libraries/LinkedListSetLib.sol 95.52% (64/67) 95.12% (78/82) 62.50% (5/8) 100.00% (8/8)
src/libraries/MemManagementLib.sol 100.00% (66/66) 100.00% (70/70) 100.00% (0/0) 100.00% (12/12)
src/libraries/ModuleInstallCommonsLib.sol 64.71% (11/17) 61.54% (8/13) 62.50% (5/8) 100.00% (3/3)
src/libraries/ValidationLocatorLib.sol 70.87% (73/103) 72.04% (67/93) 47.83% (11/23) 85.00% (17/20)
src/modules/ModuleBase.sol 76.92% (20/26) 73.08% (19/26) 66.67% (2/3) 100.00% (4/4)
src/modules/permissions/AllowlistModule.sol 80.19% (85/106) 86.21% (100/116) 79.17% (19/24) 50.00% (9/18)
src/modules/permissions/NativeTokenLimitModule.sol 82.76% (48/58) 87.10% (54/62) 92.31% (12/13) 66.67% (8/12)
src/modules/permissions/PaymasterGuardModule.sol 75.00% (15/20) 77.78% (14/18) 33.33% (1/3) 71.43% (5/7)
src/modules/permissions/TimeRangeModule.sol 88.46% (23/26) 84.62% (22/26) 100.00% (5/5) 87.50% (7/8)
src/modules/validation/SingleSignerValidationModule.sol 82.93% (34/41) 82.05% (32/39) 62.50% (5/8) 90.00% (9/10)
src/modules/validation/WebAuthnValidationModule.sol 63.64% (21/33) 66.67% (18/27) 100.00% (3/3) 60.00% (6/10)
Total 90.25% (1444/1600) 91.22% (1527/1674) 73.28% (181/247) 84.71% (205/242)

@dancoombs
dancoombs merged commit ab9c0c2 into develop Dec 19, 2025
7 checks passed
@dancoombs
dancoombs deleted the danc/factory-check branch December 19, 2025 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants