-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a GitHub Actions workflow for automated analysis of Solidity smart contracts using the Slither tool. - Added a new configuration file for Slither analysis to manage detector exclusions and filter paths. - **Bug Fixes** - Updated import paths to reference specific versions of libraries, ensuring compatibility and stability. - **Chores** - Added entries to `.gitignore` to exclude unnecessary files and directories. - Removed obsolete remapping directives and subproject references to streamline the codebase. - Enhanced the testing process in the GitHub Actions workflow for improved contract testing. - Updated deployment scripts to ensure dependencies are up to date before deployment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
15 changed files
with
102 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Contracts - Slither | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "contracts/src/**" | ||
pull_request: | ||
paths: | ||
- "contracts/src/**" | ||
|
||
defaults: | ||
run: | ||
working-directory: ./contracts | ||
|
||
jobs: | ||
slither: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "21.1.0" | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
|
||
- name: Install dependencies | ||
run: forge soldeer update | ||
|
||
- name: Build contracts | ||
run: forge build | ||
|
||
- name: Install Slither | ||
run: pip3 install slither-analyzer | ||
|
||
- name: Run Slither | ||
run: slither . --sarif output.sarif | ||
|
||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: contracts/output.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,8 @@ docs/ | |
|
||
# Dotenv file | ||
.env | ||
|
||
# Soldeer | ||
/dependencies | ||
|
||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options | ||
[profile.default] | ||
auto_detect_solc = true | ||
src = "src" | ||
out = "out" | ||
libs = ["lib"] | ||
libs = ["dependencies"] | ||
gas_reports = ["*"] | ||
optimizer = true | ||
optimizer_runs = 10_000 | ||
|
||
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options | ||
[soldeer] | ||
recursive_deps = true | ||
|
||
solc = "0.8.28" | ||
[dependencies] | ||
forge-std = "1.9.4" | ||
"@openzeppelin-contracts" = "5.1.0" |
Submodule openzeppelin-contracts
deleted from
8b591b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ | ||
@openzeppelin-contracts-5.1.0/=dependencies/@openzeppelin-contracts-5.1.0/ | ||
forge-std-1.9.4/=dependencies/forge-std-1.9.4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"detectors_to_exclude": "", | ||
"filter_paths": "dependencies" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[[dependencies]] | ||
name = "@openzeppelin-contracts" | ||
version = "5.1.0" | ||
url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/5_1_0_19-10-2024_10:28:52_contracts.zip" | ||
checksum = "fd3d1ea561cb27897008aee18ada6e85f248eb161c86e4435272fc2b5777574f" | ||
integrity = "cb6cf6e878f2943b2291d5636a9d72ac51d43d8135896ceb6cf88d36c386f212" | ||
|
||
[[dependencies]] | ||
name = "forge-std" | ||
version = "1.9.4" | ||
url = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_9_4_25-10-2024_14:36:59_forge-std-1.9.zip" | ||
checksum = "b5be24beb5e4dab5e42221b2ad1288b64c826bee5ee71b6159ba93ffe86f14d4" | ||
integrity = "3874463846ab995a6a9a88412913cacec6144f7605daa1af57c2d8bf3f210b13" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters