diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8125f7c..418a9eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,8 +113,8 @@ jobs: coveralls: runs-on: ubuntu-latest - if: needs.changed-files.outputs.any_changed == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: tests + if: needs.changed-files.outputs.any_changed == 'true' && github.event_name == 'pull_request' && github.ref == 'refs/pull/15/merge' + needs: [changed-files, tests] steps: - name: Coveralls uses: coverallsapp/github-action@v2 diff --git a/packages/lazytower/contracts/LazyTowerHashChain.sol b/packages/lazytower/contracts/LazyTowerHashChain.sol index d7fce28..71488cf 100644 --- a/packages/lazytower/contracts/LazyTowerHashChain.sol +++ b/packages/lazytower/contracts/LazyTowerHashChain.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; +// trigger workflow + import {PoseidonT3} from "poseidon-solidity/PoseidonT3.sol"; // CAPACITY = W * (W**0 + W**1 + ... + W**(H - 1)) = W * (W**H - 1) / (W - 1) // 4 * (4**24 - 1) / (4 - 1) = 375_299_968_947_540; diff --git a/scripts/install-slither.bash b/scripts/install-slither.bash new file mode 100755 index 0000000..e5af336 --- /dev/null +++ b/scripts/install-slither.bash @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -eo pipefail + +# Define an orange color using ANSI escape codes +ORANGE='\033[0;33m' # Using yellow as an approximation for orange +RESET='\033[0m' # Reset color to default + +main() { + if command -v pip &>/dev/null; then + if ! command -v slither &> /dev/null;then + pip install slither-analyzer + fi + printf "%s\n" "slither is already installed." + else + printf "%s\n" "${ORANGE}pip is not installed. Please install pip and rerun 'yarn' or './scripts/install-slither.bash'.${RESET}" + fi + + echo "Slither has been installed (or was already." +} + +main