Skip to content

Commit 75202c1

Browse files
Merge branch 'main' into bapp-onboarding
2 parents 4e703ca + e05d732 commit 75202c1

16 files changed

+753
-747
lines changed

.gas-snapshot

Lines changed: 0 additions & 93 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Report gas diff
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
# Optionally configure to run only for changes in specific files. For example:
9+
# paths:
10+
# - src/**
11+
# - test/**
12+
# - foundry.toml
13+
# - remappings.txt
14+
# - .github/workflows/foundry-gas-diff.yml
15+
16+
jobs:
17+
compare_gas_reports:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- name: Install Foundry
25+
uses: foundry-rs/foundry-toolchain@v1
26+
with:
27+
version: nightly
28+
29+
# Add any step generating a gas report to a temporary file named gasreport.ansi. For example:
30+
- name: Run tests
31+
run: forge test --gas-report > gasreport.ansi # <- this file name should be unique in your repository!
32+
env:
33+
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
34+
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
35+
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
36+
37+
- name: Compare gas reports
38+
uses: Rubilmax/foundry-gas-diff@v3
39+
with:
40+
summaryQuantile: 0.9 # only display the 10% most significant gas diffs in the summary (defaults to 20%)
41+
sortCriteria: avg,max # sort diff rows by criteria
42+
sortOrders: desc,asc # and directions
43+
ignore: test-foundry/**/* # filter out gas reports from specific paths (test/ is included by default)
44+
id: gas_diff
45+
46+
- name: Add gas diff to sticky comment
47+
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
48+
uses: marocchino/sticky-pull-request-comment@v2
49+
with:
50+
# delete the comment in case changes no longer impact gas costs
51+
delete: ${{ !steps.gas_diff.outputs.markdown }}
52+
message: ${{ steps.gas_diff.outputs.markdown }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ package-lock.json
2020
# Coverage
2121
coverage/
2222
report/
23-
lcov.info
23+
lcov.info

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
&nbsp;
66

7-
## :office: _Architecture_
7+
## :page_facing_up: _Whitepaper_
88

9-
![alt text](images/architecture.png "Title")
9+
[Whitepaper](https://ssv.network/wp-content/uploads/2025/01/SSV2.0-Based-Applications-Protocol-1.pdf)
1010

1111
&nbsp;
1212

foundry.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ src = "src"
33
out = "out"
44
libs = ["lib"]
55
solc = "0.8.28"
6-
gas_reports = ["*"]
76
optimizer = true
8-
optimizer_runs = 200
7+
optimizer_runs = 2000
8+
gas_reports = ["BasedAppManager"]
99

1010
[fmt]
1111
bracket_spacing = false
1212
int_types = "long"
13-
line_length = 120
14-
multiline_func_header = "params_first"
13+
line_length = 130
14+
multiline_func_header = "attributes_first"
1515
number_underscore = "thousands"
1616
quote_style = "double"
1717
tab_width = 4

images/architecture.png

-167 KB
Binary file not shown.

script/DeployProxy.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ contract DeployProxy is Script {
1616
uint32 maxFeeIncrement = 500;
1717

1818
// 3. Encode initializer data for the proxy
19-
bytes memory initData = abi.encodeWithSignature("initialize(uint32)", maxFeeIncrement);
19+
bytes memory initData = abi.encodeWithSignature("initialize(address,uint32)", msg.sender, maxFeeIncrement);
2020

2121
// 4. Deploy the proxy and link it to the implementation
2222
ERC1967Proxy proxy = new ERC1967Proxy(address(implementation), initData);

0 commit comments

Comments
 (0)