-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: specialize deploy scripts per artifact #324
Conversation
Summary by OctaneNew Contracts
Updated Contracts
🔗 Commit Hash: 9121316 |
OverviewOctane AI analysis has finished. No vulnerabilities were found. Cheers! 🎉🎉🎉 🔗 Commit Hash: 9121316 |
Contract sizes: | Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) |
-| AccountFactory | 6,121 | 6,595 | 18,455 | 42,557 |
+| AccountFactory | 6,661 | 7,135 | 17,915 | 42,017 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| AllowlistModule | 9,602 | 9,629 | 14,974 | 39,523 |
+| AllowlistModule | 10,262 | 10,289 | 14,314 | 38,863 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
| ExecutionInstallDelegate | 5,947 | 5,993 | 18,629 | 43,159 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| ModularAccount | 21,923 | 22,322 | 2,653 | 26,830 |
+| ModularAccount | 23,273 | 23,672 | 1,303 | 25,480 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| NativeTokenLimitModule | 4,583 | 4,610 | 19,993 | 44,542 |
+| NativeTokenLimitModule | 5,093 | 5,120 | 19,483 | 44,032 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| PaymasterGuardModule | 1,827 | 1,854 | 22,749 | 47,298 |
+| PaymasterGuardModule | 2,097 | 2,124 | 22,479 | 47,028 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| SemiModularAccount7702 | 23,153 | 23,545 | 1,423 | 25,607 |
+| SemiModularAccount7702 | 23,741 | 24,133 | 835 | 25,019 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| SemiModularAccountBytecode | 23,635 | 24,034 | 941 | 25,118 |
+| SemiModularAccountBytecode | 24,223 | 24,622 | 353 | 24,530 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| SemiModularAccountStorageOnly | 24,168 | 24,567 | 408 | 24,585 |
+| SemiModularAccountStorageOnly | 24,756 | 25,155 | -180 | 23,997 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| SingleSignerValidationModule | 3,646 | 3,673 | 20,930 | 45,479 |
+| SingleSignerValidationModule | 3,976 | 4,003 | 20,600 | 45,149 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| TimeRangeModule | 2,204 | 2,231 | 22,372 | 46,921 |
+| TimeRangeModule | 2,504 | 2,531 | 22,072 | 46,621 |
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
|-------------------------------+------------------+-------------------+--------------------+---------------------|
-| WebAuthnValidationModule | 7,854 | 7,881 | 16,722 | 41,271 |
+| WebAuthnValidationModule | 9,462 | 9,489 | 15,114 | 39,663 | Code coverage: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. curious - why are we using a separate script for sma storage?
SMA-storage is ~500 bytes larger than the other variants, so I split it up to be able to bump up the optimizer runs on the other implementations |
899c959
to
9121316
Compare
Motivation
Solution
ExecutionInstallDelegate
to the same script as the module deployments, and rename toDeployStandalones
(i.e. not having dependencies).optimized-build
.Alternative considered
At first, I tried to make use of the new compilation restrictions feature in foundry, but it created duplicate compilation artifacts for the scripts, and there wasn't a mechanism to control which instance was used in the script. If this feature stabilizes, we should switch to it: foundry-rs/foundry#8668