Files
slither/scripts/ci_test_etherscan.sh
Dan GuidoandClaude Opus 4.5 fe7590f0e7 fix: remove Etherscan API dependency from CI tests (#2890)
Replace live Etherscan API calls with cached local contract sources.
The contracts are immutable on-chain, so testing against cached source
still validates the analysis logic.

This fixes intermittent CI failures from Etherscan API rate limits when
multiple jobs run in parallel. The Etherscan platform integration is
already tested by crytic-compile's own CI.

Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-01-15 23:30:47 -05:00

18 lines
346 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
### Test slither analysis on a contract
DIR_TESTS="tests/tools/etherscan"
solc-select use 0.4.25 --always-install
echo "::group::BalanceChecker analysis"
if ! slither "$DIR_TESTS/BalanceChecker.sol" --no-fail-pedantic; then
echo "BalanceChecker test failed"
exit 1
fi
echo "::endgroup::"
exit 0