Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
058cfc2
test: todos
riccardo-ssvlabs Dec 19, 2024
82c2050
test(strategy): deposit erc20
riccardo-ssvlabs Dec 19, 2024
9120a1a
feat(service): add supported tokens
riccardo-ssvlabs Dec 19, 2024
5fe10c0
test(strategy): <- deposit eth
riccardo-ssvlabs Dec 19, 2024
4ffbd8e
test(strategy): <- strategy-service supporting ETH obligation
riccardo-ssvlabs Dec 19, 2024
4d801ca
test(strategy): <- edge cases
riccardo-ssvlabs Dec 19, 2024
dd5c1fd
test(service): <- more fast withdraws
riccardo-ssvlabs Dec 19, 2024
0fd7fd0
test: complete initial
riccardo-ssvlabs Dec 19, 2024
7b3334b
chore: <- update lint config
riccardo-ssvlabs Dec 19, 2024
60f2b6b
chore(package.json): standardize
riccardo-ssvlabs Dec 19, 2024
04e1706
test(service): <- update tokens
riccardo-ssvlabs Dec 19, 2024
1455a23
chore: move events to interface
riccardo-ssvlabs Jan 7, 2025
7b67779
fix(core): obligations finalize update
riccardo-ssvlabs Jan 8, 2025
8450616
test(strategy): from 50% to 80% coverage
riccardo-ssvlabs Jan 8, 2025
fd7f47f
chore(gitignore): <- add coverage files
riccardo-ssvlabs Jan 8, 2025
553a014
fix(strategy): match tokens
riccardo-ssvlabs Jan 8, 2025
02b4016
test(strategy): from 80% to 90% coverage
riccardo-ssvlabs Jan 8, 2025
1487216
feat(package.json): <- coverage report script
riccardo-ssvlabs Jan 8, 2025
39c2db4
chore(service): <- remove slashing input param
riccardo-ssvlabs Jan 9, 2025
322e686
test(strategy): from 90% to 100%
riccardo-ssvlabs Jan 10, 2025
48610ac
chore: <- rename service to bApp
riccardo-ssvlabs Jan 13, 2025
9f7672f
feat(tools): slither test
riccardo-ssvlabs Jan 13, 2025
ab197bb
feat(tools): <- move slither to the main workflow
riccardo-ssvlabs Jan 13, 2025
edb29bf
feat(tools): <- comment sarif upload until repo is public
riccardo-ssvlabs Jan 13, 2025
e212b1f
feat: <- support and test custom error
riccardo-ssvlabs Jan 13, 2025
e733624
feat: <- support delegate balance custom errors
riccardo-ssvlabs Jan 13, 2025
c12fa5a
chore: <- complete rename service to bApp
riccardo-ssvlabs Jan 14, 2025
68401c5
chore: <- complete rename service to bApp interface
riccardo-ssvlabs Jan 14, 2025
faf42bd
feat: <- support custom errors and add missing branch tests
riccardo-ssvlabs Jan 14, 2025
518f83d
feat: <- support bring branch coverage from 60% to 80%
riccardo-ssvlabs Jan 14, 2025
ead65de
feat: <- support bring branch coverage from 80% to 98%
riccardo-ssvlabs Jan 15, 2025
9d51cc4
feat: <- support bring branch coverage from 98%% to 100%
riccardo-ssvlabs Jan 15, 2025
cdb1f26
feat: <- complete convertion to custom errors
riccardo-ssvlabs Jan 15, 2025
5e4646a
test: <- improve readability, checks, comments, structure WIP
riccardo-ssvlabs Jan 16, 2025
c86d2d3
test: <- improve remove more hardcoded values, add more fuzzing
riccardo-ssvlabs Jan 16, 2025
fc3934e
test: <- move todos to the bottom
riccardo-ssvlabs Jan 16, 2025
b4fa174
fix(obligation): use correct custom error
riccardo-ssvlabs Jan 16, 2025
25ec02e
fix: <- move away from global imports
riccardo-ssvlabs Jan 16, 2025
9c5133b
chore: <- update gas snapshot
riccardo-ssvlabs Jan 16, 2025
70ed5b4
feat(withdrawals): <- support withdraw eth
riccardo-ssvlabs Jan 17, 2025
f116d24
tests: <- complete obligation testing and updates
riccardo-ssvlabs Jan 17, 2025
ec76f00
tests: <- double check usedTokens updates correctly
riccardo-ssvlabs Jan 17, 2025
f6df09c
fix(ci): <- wrong format
riccardo-ssvlabs Jan 17, 2025
8dac4b2
feat: <- add GPL-3.0 license
riccardo-ssvlabs Jan 20, 2025
1391399
feat: <- make tests more readable
riccardo-ssvlabs Jan 20, 2025
5a150a9
feat: <- make tests more readable
riccardo-ssvlabs Jan 20, 2025
41797e7
feat: <- improve interface, maxFee in initializer, add data field to …
riccardo-ssvlabs Jan 21, 2025
3f29579
feat: <- support BApp Metadata URI
riccardo-ssvlabs Jan 22, 2025
16b8b86
test: <- BApp Metadata URI
riccardo-ssvlabs Jan 22, 2025
02f6ce0
chore: <- move SERVICE to BAPP in tests
riccardo-ssvlabs Jan 22, 2025
ecd8699
chore: <- event standard naming w/ past tense
riccardo-ssvlabs Jan 22, 2025
b3caf96
feat(withdrawal): <- prevent ETH as input for withdrawERC20
riccardo-ssvlabs Jan 22, 2025
7cd006f
feat: <- enhance comments and style
riccardo-ssvlabs Jan 23, 2025
d078766
test(bApp): <- registration with no tokens specified
riccardo-ssvlabs Jan 23, 2025
25414ca
feat(readme): <- add architecture schema
riccardo-ssvlabs Jan 23, 2025
21035d9
test: <- add high token number tests
riccardo-ssvlabs Jan 23, 2025
148ce99
test: <- add high token number tests for bapp
riccardo-ssvlabs Jan 23, 2025
33fdf1c
docs: add license
mtabasco Jan 28, 2025
adb9289
docs: sync package.json
mtabasco Jan 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,15 @@ jobs:
run: |
forge test -vvv
id: test

- name: Run Slither
uses: crytic/slither-action@v0.4.0
id: slither
with:
sarif: results.sarif
fail-on: none

# - name: Upload SARIF file
# uses: github/codeql-action/upload-sarif@v3
# with:
# sarif_file: ${{ steps.slither.outputs.sarif }}
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ docs/
.env

node_modules/
package-lock.json
package-lock.json

# Coverage
coverage/
report/
lcov.info
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
npm run format

solhint 'src/**/*.sol'
npm run lint:solhint

npm run test-coverage
16 changes: 14 additions & 2 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{
"extends": "solhint:default"
}
"extends": "solhint:recommended",
"rules": {
"compiler-version": ["error", "0.8.28"],
"no-inline-assembly": "off",
"no-unused-import": "error",
"func-named-parameters": "off",
"func-visibility": ["error", { "ignoreConstructors": true }],
"reason-string": ["warn", { "maxLength": 64 }],
"immutable-vars-naming": ["error", { "immutablesAsConstants": true }],
"var-name-mixedcase": "error",
"custom-errors": "error",
"func-name-mixedcase": "error"
}
}
32 changes: 20 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"name": "based-applications",
"version": "0.0.0",
"description": "Based Applications Contracts SSV",
"scripts": {
"build": "forge fmt && forge build",
"deploy": "forge script script/DeployProxy.s.sol --rpc-url $HOLESKY_RPC_URL --private-key $PRIVATE_KEY --broadcast",
"format": "forge fmt",
"gas-report": "forge test -vvvv --gas-report",
"generate-docs": "solc --include-path node_modules --base-path . --combined-json userdoc,devdoc src/BasedAppManager.sol --output-dir ./docs --overwrite",
"prepare": "husky",
"test": "forge test -vvvv",
"test-coverage": "forge coverage",
"verify-implementation": "forge verify-contract --chain holesky $IMPLEMENTATION_ADDRESS src/BasedAppManager.sol:BasedAppManager --etherscan-api-key $ETHERSCAN_API_KEY"
"description": "SSV Based Applications",
"author": "SSV.Network",
"repository": {
"type": "git",
"url": "https://github.com/ssvlabs/based-applications.git"
},
"license": "UNLICENSED",
"keywords": [
"Based",
"BApps",
Expand All @@ -22,8 +17,21 @@
"Marco Tabasco <marco@ssvlabs.io>",
"Riccardo Persiani <r.persiani92@gmail.com>"
],
"license": "UNLICENSED",
"scripts": {
"build": "forge fmt && forge build",
"deploy": "forge script script/DeployProxy.s.sol --rpc-url $HOLESKY_RPC_URL --private-key $PRIVATE_KEY --broadcast",
"format": "forge fmt",
"gas-report": "forge test -vvvv --gas-report",
"generate-docs": "solc --include-path node_modules --base-path . --combined-json userdoc,devdoc src/BasedAppManager.sol --output-dir ./docs --overwrite",
"prepare": "husky",
"lint:solhint": "solhint './src/**/*.sol'",
"test": "forge test -vvvv",
"test-coverage": "forge coverage --no-match-coverage \"(script|test)\"",
"test-coverage-report": "forge coverage --no-match-coverage \"(script|test)\" --report lcov && genhtml lcov.info -o report --branch-coverage",
"verify-implementation": "forge verify-contract --chain holesky $IMPLEMENTATION_ADDRESS src/BasedAppManager.sol:BasedAppManager --etherscan-api-key $ETHERSCAN_API_KEY"
},
"devDependencies": {
"@openzeppelin/contracts-upgradeable": "^5.1.0",
"husky": "^9.1.7"
}
}
Loading
Loading