Skip to content

Commit 2d68908

Browse files
authored
chore: tidy up and clear boilerplate sample files (#4)
1 parent d05d06d commit 2d68908

19 files changed

Lines changed: 191 additions & 659 deletions

File tree

.github/workflows/tests.yml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-node@v4
2727
with:
2828
node-version: 20.x
29-
cache: 'yarn'
29+
cache: "yarn"
3030

3131
- name: Install dependencies
3232
run: yarn --frozen-lockfile --network-concurrency 1
@@ -53,7 +53,7 @@ jobs:
5353
uses: actions/setup-node@v4
5454
with:
5555
node-version: 20.x
56-
cache: 'yarn'
56+
cache: "yarn"
5757

5858
- name: Install dependencies
5959
run: yarn --frozen-lockfile --network-concurrency 1
@@ -64,48 +64,48 @@ jobs:
6464
- name: Run tests
6565
run: yarn test:integration
6666

67-
medusa-tests:
68-
name: Medusa Test
69-
runs-on: ubuntu-latest
70-
container: ghcr.io/trailofbits/eth-security-toolbox/ci:nightly-20241223
67+
# medusa-tests:
68+
# name: Medusa Test
69+
# runs-on: ubuntu-latest
70+
# container: ghcr.io/trailofbits/eth-security-toolbox/ci:nightly-20241223
7171

72-
steps:
73-
- name: Checkout repository
74-
uses: actions/checkout@v4
75-
with:
76-
submodules: recursive
72+
# steps:
73+
# - name: Checkout repository
74+
# uses: actions/checkout@v4
75+
# with:
76+
# submodules: recursive
7777

78-
- name: Install dependencies
79-
run: yarn --frozen-lockfile --network-concurrency 1
78+
# - name: Install dependencies
79+
# run: yarn --frozen-lockfile --network-concurrency 1
8080

81-
- name: Run Medusa
82-
run: medusa fuzz --test-limit 200000
81+
# - name: Run Medusa
82+
# run: medusa fuzz --test-limit 200000
8383

84-
halmos-tests:
85-
name: Run symbolic execution tests
86-
runs-on: ubuntu-latest
87-
steps:
88-
- uses: actions/checkout@v4
84+
# halmos-tests:
85+
# name: Run symbolic execution tests
86+
# runs-on: ubuntu-latest
87+
# steps:
88+
# - uses: actions/checkout@v4
8989

90-
- name: Install Foundry
91-
uses: foundry-rs/foundry-toolchain@v1
92-
with:
93-
version: stable
90+
# - name: Install Foundry
91+
# uses: foundry-rs/foundry-toolchain@v1
92+
# with:
93+
# version: stable
9494

95-
- name: Use Node.js
96-
uses: actions/setup-node@v4
97-
with:
98-
node-version: 20.x
99-
cache: 'yarn'
95+
# - name: Use Node.js
96+
# uses: actions/setup-node@v4
97+
# with:
98+
# node-version: 20.x
99+
# cache: 'yarn'
100100

101-
- name: Install dependencies
102-
run: yarn --frozen-lockfile --network-concurrency 1
101+
# - name: Install dependencies
102+
# run: yarn --frozen-lockfile --network-concurrency 1
103103

104-
- name: Precompile
105-
run: yarn build
104+
# - name: Precompile
105+
# run: yarn build
106106

107-
- name: Run tests
108-
run: yarn test:integration
107+
# - name: Run tests
108+
# run: yarn test:integration
109109

110110
lint:
111111
name: Static Analysis
@@ -127,7 +127,7 @@ jobs:
127127
uses: actions/setup-node@v4
128128
with:
129129
node-version: 20.x
130-
cache: 'yarn'
130+
cache: "yarn"
131131

132132
- name: Install dependencies
133133
run: yarn --frozen-lockfile --network-concurrency 1
@@ -138,4 +138,4 @@ jobs:
138138
- name: Install and run Bulloak
139139
uses: smol-ninja/bulloak-toolchain@v1
140140
with:
141-
test-dir: 'test/unit'
141+
test-dir: "test/unit"

README.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,8 @@
1-
<img src="https://raw.githubusercontent.com/defi-wonderland/brand/v1.0.0/external/solidity-foundry-boilerplate-banner.png" alt="wonderland banner" align="center" />
2-
<br />
1+
# L2Resolver
32

4-
<div align="center"><strong>Start your next Solidity project with Foundry in seconds</strong></div>
5-
<div align="center">A highly scalable foundation focused on DX and best practices</div>
3+
Minimal L2 Resolver system for ENS. It resolves ENS names to their corresponding [EIP-7930](https://eips.ethereum.org/EIPS/eip-7930)-formatted chain identifiers (as bytes) and maps these EIP-7930 chain identifiers back to their primary ENS names. The system is implemented as a single contract that manages storage, authorization, and resolution logic.
64

7-
<br />
8-
9-
## Features
10-
11-
<dl>
12-
<dt>Sample contracts</dt>
13-
<dd>Basic Greeter contract with an external interface.</dd>
14-
15-
<dt>Foundry setup</dt>
16-
<dd>Foundry configuration with multiple custom profiles and remappings.</dd>
17-
18-
<dt>Deployment scripts</dt>
19-
<dd>Sample scripts to deploy contracts on both mainnet and testnet.</dd>
20-
21-
<dt>Sample Integration, Unit, Property-based fuzzed and symbolic tests</dt>
22-
<dd>Example tests showcasing mocking, assertions and configuration for mainnet forking. As well it includes everything needed in order to check code coverage.</dd>
23-
<dd>Unit tests are built based on the <a href="https://twitter.com/PaulRBerg/status/1682346315806539776">Branched-Tree Technique</a>, using <a href="https://github.com/alexfertel/bulloak">Bulloak</a>.
24-
<dd>Formal verification and property-based fuzzing are achieved with <a href="https://github.com/a16z/halmos">Halmos</a> and <a href="https://github.com/crytic/medusa">Medusa</a> (resp.).
25-
26-
<dt>Linter</dt>
27-
<dd>Simple and fast solidity linting thanks to forge fmt.</dd>
28-
<dd>Find missing natspec automatically.</dd>
29-
30-
<dt>Github workflows CI</dt>
31-
<dd>Run all tests and see the coverage as you push your changes.</dd>
32-
<dd>Export your Solidity interfaces and contracts as packages, and publish them to NPM.</dd>
33-
</dl>
5+
The complete technical specification can be found [here](https://github.com/ethereum/L2-interop/blob/main/specs/addresses/L2Resolver.md).
346

357
## Setup
368

foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ multiline_func_header = 'params_first_multi'
99
sort_imports = true
1010

1111
[profile.default]
12-
solc_version = '0.8.23'
12+
solc_version = '0.8.30'
1313
libs = ['node_modules', 'lib']
1414
optimizer_runs = 10_000
1515

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"lint:sol": "solhint 'src/**/*.sol' 'script/**/*.sol' 'test/**/*.sol'",
2323
"prepare": "husky",
2424
"test": "forge test -vvv",
25+
"test:bulloak:fix": "bulloak check --fix ./**/*.tree",
26+
"test:bulloak:scaffold": "bulloak scaffold -wS ./**/*.tree",
2527
"test:fuzz": "medusa fuzz",
2628
"test:integration": "forge test --match-contract Integration -vvv",
2729
"test:symbolic": "halmos",
2830
"test:unit": "forge test --match-contract Unit -vvv",
29-
"test:unit:deep": "FOUNDRY_FUZZ_RUNS=5000 yarn test:unit",
30-
"test:bulloak:fix": "bulloak check --fix ./**/*.tree",
31-
"test:bulloak:scaffold": "bulloak scaffold -wS ./**/*.tree"
31+
"test:unit:deep": "FOUNDRY_FUZZ_RUNS=5000 yarn test:unit"
3232
},
3333
"lint-staged": {
3434
"*.{js,css,md,ts,sol}": "forge fmt",
@@ -43,7 +43,7 @@
4343
"forge-std": "github:foundry-rs/forge-std#1.9.2",
4444
"halmos-cheatcodes": "github:a16z/halmos-cheatcodes#c0d8655",
4545
"husky": ">=9",
46-
"lint-staged": ">=10",
46+
"lint-staged": ">=16",
4747
"solhint-community": "4.0.1",
4848
"solhint-config-wonderland": "0.0.1",
4949
"sort-package-json": "2.10.0"

script/Deploy.sol

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/contracts/Greeter.sol

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/interfaces/IGreeter.sol

Lines changed: 0 additions & 74 deletions
This file was deleted.

test/integration/Greeter.t.sol

Lines changed: 0 additions & 16 deletions
This file was deleted.

test/integration/IntegrationBase.sol

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)