diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fb28e5b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +name: CI + +on: + pull_request: + types: [opened, synchronize] + push: + branches: + - main + +jobs: + test: + strategy: + fail-fast: true + + name: Foundry + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Format + run: | + forge fmt --check + id: fmt + + - name: Build + run: | + forge build + id: build + + slither: + strategy: + fail-fast: true + + name: Slither + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Run Slither + uses: crytic/slither-action@v0.3.0 + id: slither + with: + fail-on: low + + solhint: + strategy: + fail-fast: true + + name: Solhint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install dependencies + run: npm install --global solhint + + - name: Run solhint + run: solhint \ No newline at end of file diff --git a/slither.config.json b/slither.config.json new file mode 100644 index 0000000..10cb847 --- /dev/null +++ b/slither.config.json @@ -0,0 +1,4 @@ +{ + "filter_paths": "(lib/|test/)", + "exclude_informational": true +} \ No newline at end of file diff --git a/src/Hevm.sol b/src/Hevm.sol index 1286f39..7a655f2 100644 --- a/src/Hevm.sol +++ b/src/Hevm.sol @@ -18,7 +18,7 @@ interface IHevm { function sign(uint256 privateKey, bytes32 digest) external returns (uint8 r, bytes32 v, bytes32 s); // Gets address for a given private key - function addr(uint256 privateKey) external returns (address addr); + function addr(uint256 privateKey) external returns (address account); // Performs a foreign function call via terminal function ffi(string[] calldata inputs) external returns (bytes memory result);