mirror of
https://github.com/crytic/slither.git
synced 2026-10-12 02:12:39 +00:00
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]>
18 lines
346 B
Bash
Executable File
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
|