Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Slither to CI #10

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Slither Analysis

on:
push:
branches:
- main
pull_request:

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crytic/[email protected]
with:
target: 'foundry/'
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,19 @@ TODO: add banner

Tycho Execution makes it easy to trade on different DEXs by handling the complex encoding for you. Instead of creating
custom code for each DEX, you get a simple, ready-to-use tool that generates the necessary data to execute trades. It’s
designed to be safe, straightforward, and quick to set up, so anyone can start trading without extra effort.
designed to be safe, straightforward, and quick to set up, so anyone can start trading without extra effort.

# Contract Analysis

We use [Slither](https://github.com/crytic/slither) to detect any potential vulnerabilities in our contracts.

To run locally, simply install Slither in your conda env and run it inside the foundry directory.

```
conda create --name tycho-execution python=3.10
conda activate tycho-execution
python3 -m pip install slither-analyzer`
cd foundry
slither .
```
2 changes: 1 addition & 1 deletion foundry/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
src = 'src'
out = 'out'
libs = ['lib']
solc = "0.8.18"
solc = "0.8.28"
evm_version = 'shanghai'
optimizer = true
optimizer_runs = 1000
Expand Down
2 changes: 1 addition & 1 deletion foundry/src/Counter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.28;

contract Counter {
uint256 public number;
Expand Down
6 changes: 6 additions & 0 deletions foundry/src/TychoRouter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

contract TychoRouter {
constructor() {}
}
2 changes: 1 addition & 1 deletion foundry/test/Counter.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.28;

import {Test, console} from "forge-std/Test.sol";
import {Counter} from "../src/Counter.sol";
Expand Down
Loading