Merge pull request #10 from propeller-heads/ci/tnl/ENG-4031-add-slither
feat: Add Slither to CI
This commit is contained in:
16
.github/workflows/slither.yml
vendored
Normal file
16
.github/workflows/slither.yml
vendored
Normal file
@@ -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/slither-action@v0.4.0
|
||||||
|
with:
|
||||||
|
target: 'foundry/'
|
||||||
17
README.md
17
README.md
@@ -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
|
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
|
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,7 +2,7 @@
|
|||||||
src = 'src'
|
src = 'src'
|
||||||
out = 'out'
|
out = 'out'
|
||||||
libs = ['lib']
|
libs = ['lib']
|
||||||
solc = "0.8.18"
|
solc = "0.8.28"
|
||||||
evm_version = 'shanghai'
|
evm_version = 'shanghai'
|
||||||
optimizer = true
|
optimizer = true
|
||||||
optimizer_runs = 1000
|
optimizer_runs = 1000
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: UNLICENSED
|
// SPDX-License-Identifier: UNLICENSED
|
||||||
pragma solidity ^0.8.13;
|
pragma solidity ^0.8.28;
|
||||||
|
|
||||||
contract Counter {
|
contract Counter {
|
||||||
uint256 public number;
|
uint256 public number;
|
||||||
|
|||||||
6
foundry/src/TychoRouter.sol
Normal file
6
foundry/src/TychoRouter.sol
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// SPDX-License-Identifier: UNLICENSED
|
||||||
|
pragma solidity ^0.8.28;
|
||||||
|
|
||||||
|
contract TychoRouter {
|
||||||
|
constructor() {}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: UNLICENSED
|
// SPDX-License-Identifier: UNLICENSED
|
||||||
pragma solidity ^0.8.13;
|
pragma solidity ^0.8.28;
|
||||||
|
|
||||||
import {Test, console} from "forge-std/Test.sol";
|
import {Test, console} from "forge-std/Test.sol";
|
||||||
import {Counter} from "../src/Counter.sol";
|
import {Counter} from "../src/Counter.sol";
|
||||||
|
|||||||
Reference in New Issue
Block a user