refactor: move all remaining files to orig/ directory
Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
71
orig/scripts/verify-contracts.sh
Executable file
71
orig/scripts/verify-contracts.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/bin/bash
|
||||
|
||||
# MEV Bot Contract Verification Script
|
||||
# Verifies deployed contracts on Arbiscan
|
||||
|
||||
set -e
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
|
||||
log_success() { echo -e "${GREEN}[SUCCESS]${NC} $1"; }
|
||||
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
||||
|
||||
# Check for Arbiscan API key
|
||||
if [ -z "$ARBISCAN_API_KEY" ]; then
|
||||
log_error "ARBISCAN_API_KEY environment variable is required"
|
||||
log_info "Get your API key from https://arbiscan.io/myapikey"
|
||||
log_info "Then run: export ARBISCAN_API_KEY=<your_key>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get contract address
|
||||
if [ -z "$1" ]; then
|
||||
log_error "Usage: $0 <contract_address> [contract_name]"
|
||||
log_info "Example: $0 0x1234... ProductionArbitrageExecutor"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONTRACT_ADDRESS="$1"
|
||||
CONTRACT_NAME="${2:-ProductionArbitrageExecutor}"
|
||||
|
||||
log_info "Verifying $CONTRACT_NAME at $CONTRACT_ADDRESS..."
|
||||
|
||||
# Determine contract path
|
||||
case "$CONTRACT_NAME" in
|
||||
"ProductionArbitrageExecutor")
|
||||
CONTRACT_PATH="contracts/ProductionArbitrageExecutor.sol:ProductionArbitrageExecutor"
|
||||
;;
|
||||
"FlashLoanReceiver")
|
||||
CONTRACT_PATH="contracts/balancer/FlashLoanReceiver.sol:FlashLoanReceiver"
|
||||
;;
|
||||
*)
|
||||
log_error "Unknown contract name: $CONTRACT_NAME"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Verify contract
|
||||
log_info "Contract path: $CONTRACT_PATH"
|
||||
|
||||
forge verify-contract \
|
||||
--chain-id 42161 \
|
||||
--num-of-optimizations 200 \
|
||||
--watch \
|
||||
--compiler-version "v0.8.19+commit.7dd6d404" \
|
||||
--etherscan-api-key "$ARBISCAN_API_KEY" \
|
||||
"$CONTRACT_ADDRESS" \
|
||||
"$CONTRACT_PATH"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
log_success "Contract verified successfully!"
|
||||
log_info "View at: https://arbiscan.io/address/$CONTRACT_ADDRESS#code"
|
||||
else
|
||||
log_error "Verification failed"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user