This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Run tests * add info * triage findings * rename private vars * fix if statements
- Loading branch information
Showing
24 changed files
with
723 additions
and
411 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,40 @@ | ||
name: Static analysis | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
slither: | ||
name: Slither check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Run Slither | ||
uses: crytic/slither-action@v0.3.0 | ||
with: | ||
fail-on: low | ||
|
||
solhint: | ||
name: Solhint check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
cache: 'npm' | ||
- name: Install Node dependencies | ||
run: npm i --unsafe-perm | ||
- name: Install solidity plugin | ||
run: npm i --unsafe-perm prettier prettier-plugin-solidity | ||
- name: Prettier check | ||
run: npx prettier --check 'src/**/*.sol' 'test/*.sol' | ||
- name: Solhint check | ||
run: npx solhint 'src/**/*.sol' |
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,21 @@ | ||
{ | ||
semi: false, | ||
singleQuote: true, | ||
printWidth: 80, | ||
endOfLine: 'auto', | ||
tabWidth: 4, | ||
trailingComma: 'all', | ||
overrides: [ | ||
{ | ||
files: '*.sol', | ||
options: { | ||
parser: 'solidity-parse', | ||
printWidth: 120, | ||
tabWidth: 4, | ||
useTabs: false, | ||
singleQuote: false, | ||
bracketSpacing: false, | ||
}, | ||
}, | ||
], | ||
} |
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 |
---|---|---|
@@ -1,18 +1,34 @@ | ||
# ============================================================================== | ||
# Deployment | ||
|
||
NETWORK ?= localnet | ||
|
||
check: | ||
slither . --config-file ./slither.config.json | ||
deploy-ipc: | ||
./ops/deploy.sh $(NETWORK) | ||
|
||
lint: | ||
solhint 'src/**/*.sol' | ||
# ============================================================================== | ||
# Running security checks within the local computer | ||
|
||
slither: | ||
slither . --config-file ./slither.config.json | ||
|
||
check-gateway: | ||
docker run --rm -v $(shell pwd):/app -w /app mythril/myth:latest -v4 analyze --solc-json remappings.json ./src/Gateway.sol --solv 0.8.19 | ||
|
||
check-subnet: | ||
docker run --rm -v $(shell pwd):/app -w /app mythril/myth:latest -v4 analyze --solc-json remappings.json ./src/SubnetActor.sol --solv 0.8.19 | ||
|
||
deploy-ipc: | ||
./ops/deploy.sh $(NETWORK) | ||
# ============================================================================== | ||
# Development support | ||
|
||
lint: | ||
solhint 'src/**/*.sol' | ||
|
||
format: | ||
npx prettier --check -w 'src/**/*.sol' 'test/*.sol' | ||
|
||
test: | ||
forge test | ||
|
||
.PHONY: deploy-ipc check lint check-subnet check-gateway | ||
# ============================================================================== | ||
.PHONY: deploy-ipc lint format check-subnet slither check-gateway format |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.