Skip to content

New session key validator #23

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
9 changes: 9 additions & 0 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BenchmarkDefaultValidatorNewTest:test_createSessionKeyForSigner_100CallPolicies() (gas: 2467172)
BenchmarkDefaultValidatorNewTest:test_createSessionKeyForSigner_100TransferPolicies() (gas: 2209520)
BenchmarkDefaultValidatorNewTest:test_createSessionKeyForSigner_50Call50TransferPolicies() (gas: 2336380)
BenchmarkDefaultValidatorNewTest:test_createSessionKeyForSigner_50CallPolicies() (gas: 2259810)
BenchmarkDefaultValidatorNewTest:test_createSessionKeyForSigner_50TransferPolicies() (gas: 2134968)
BenchmarkDefaultValidatorNewTest:test_execute_100CallPolicies() (gas: 2760504)
BenchmarkDefaultValidatorNewTest:test_execute_100TransferPolicies() (gas: 1317589)
BenchmarkDefaultValidatorNewTest:test_execute_50CallPolicies() (gas: 1471450)
BenchmarkDefaultValidatorNewTest:test_execute_50TransferPolicies() (gas: 743908)
4 changes: 4 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ src = "src"
out = "out"
libs = ["lib"]

gas_reports = [
"BenchmarkDefaultValidatorNew",
]

ignored_warnings_from = ["lib", "test"]

[fmt]
Expand Down
26 changes: 26 additions & 0 deletions gasreport.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
No files changed, compilation skipped

Ran 9 tests for test/BenchmarkDefaultValidatorNew.t.sol:BenchmarkDefaultValidatorNewTest
[PASS] test_createSessionKeyForSigner_100CallPolicies() (gas: 2470875)
[PASS] test_createSessionKeyForSigner_100TransferPolicies() (gas: 2213038)
[PASS] test_createSessionKeyForSigner_50Call50TransferPolicies() (gas: 2339958)
[PASS] test_createSessionKeyForSigner_50CallPolicies() (gas: 2263389)
[PASS] test_createSessionKeyForSigner_50TransferPolicies() (gas: 2138379)
[PASS] test_execute_100CallPolicies() (gas: 210125)
[PASS] test_execute_100TransferPolicies() (gas: 175656)
[PASS] test_execute_50CallPolicies() (gas: 210126)
[PASS] test_execute_50TransferPolicies() (gas: 175641)
Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 14.13ms (71.45ms CPU time)


Ran 1 test suite in 16.52ms (14.13ms CPU time): 9 tests passed, 0 failed, 0 skipped (9 total tests)
test_createSessionKeyForSigner_100CallPolicies() (gas: 3703 (0.150%))
test_createSessionKeyForSigner_50Call50TransferPolicies() (gas: 3578 (0.153%))
test_createSessionKeyForSigner_50CallPolicies() (gas: 3579 (0.158%))
test_createSessionKeyForSigner_100TransferPolicies() (gas: 3518 (0.159%))
test_createSessionKeyForSigner_50TransferPolicies() (gas: 3411 (0.160%))
test_execute_50TransferPolicies() (gas: -568267 (-76.389%))
test_execute_50CallPolicies() (gas: -1261324 (-85.720%))
test_execute_100TransferPolicies() (gas: -1141933 (-86.668%))
test_execute_100CallPolicies() (gas: -2550379 (-92.388%))
Overall gas change: -5504114 (-31.094%)
2 changes: 1 addition & 1 deletion lib/solady
Submodule solady updated 293 files
2 changes: 1 addition & 1 deletion src/DefaultValidator.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.26;

import "account-abstraction-v0.7/core/Helpers.sol";
Expand Down
Loading
Loading