Skip to content

Commit

Permalink
Merge pull request #10 from propeller-heads/ci/tnl/ENG-4031-add-slither
Browse files Browse the repository at this point in the history
feat: Add Slither to CI
  • Loading branch information
tamaralipows authored Jan 20, 2025
2 parents a16b2af + 68dddc0 commit 3037edd
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 4 deletions.
File renamed without changes.
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

0 comments on commit 3037edd

Please sign in to comment.