- Added comprehensive bounds checking to prevent buffer overruns in multicall parsing - Implemented graduated validation system (Strict/Moderate/Permissive) to reduce false positives - Added LRU caching system for address validation with 10-minute TTL - Enhanced ABI decoder with missing Universal Router and Arbitrum-specific DEX signatures - Fixed duplicate function declarations and import conflicts across multiple files - Added error recovery mechanisms with multiple fallback strategies - Updated tests to handle new validation behavior for suspicious addresses - Fixed parser test expectations for improved validation system - Applied gofmt formatting fixes to ensure code style compliance - Fixed mutex copying issues in monitoring package by introducing MetricsSnapshot - Resolved critical security vulnerabilities in heuristic address extraction - Progress: Updated TODO audit from 10% to 35% complete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
62 lines
1.6 KiB
Bash
Executable File
62 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Development environment setup script
|
|
|
|
echo "Setting up development environment..."
|
|
|
|
# Create directories if they don't exist
|
|
mkdir -p logs
|
|
mkdir -p reports
|
|
mkdir -p reports/coverage
|
|
mkdir -p reports/test-results
|
|
mkdir -p reports/augments
|
|
mkdir -p storage
|
|
mkdir -p storage/keystore
|
|
mkdir -p storage/cache
|
|
mkdir -p .gocache
|
|
|
|
# Check if Go is installed
|
|
if ! command -v go &> /dev/null; then
|
|
echo "Error: Go is not installed" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Check if required tools are installed
|
|
echo "Checking for required tools..."
|
|
|
|
# Install golangci-lint if not present
|
|
if ! command -v golangci-lint &> /dev/null; then
|
|
echo "Installing golangci-lint..."
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
|
fi
|
|
|
|
# Install gosec if not present
|
|
if ! command -v gosec &> /dev/null; then
|
|
echo "Installing gosec..."
|
|
go install github.com/securego/gosec/v2/cmd/gosec@latest
|
|
fi
|
|
|
|
# Install govulncheck if not present
|
|
if ! command -v govulncheck &> /dev/null; then
|
|
echo "Installing govulncheck..."
|
|
go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
fi
|
|
|
|
# Install delve if not present
|
|
if ! command -v dlv &> /dev/null; then
|
|
echo "Installing delve..."
|
|
go install github.com/go-delve/delve/cmd/dlv@latest
|
|
fi
|
|
|
|
# Copy example config if not exists
|
|
if [ ! -f config/development.yaml ]; then
|
|
echo "Creating development config..."
|
|
cp config/development.yaml.example config/development.yaml 2>/dev/null || echo "Config example not found, creating basic config..."
|
|
fi
|
|
|
|
# Verify Go modules
|
|
echo "Verifying Go modules..."
|
|
go mod tidy
|
|
|
|
echo "Development environment setup complete!" |