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>
27 lines
825 B
Bash
Executable File
27 lines
825 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ $# -ne 1 ]]; then
|
|
echo "Usage: $0 <tx_hash>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -z "${ARBISCAN_API_KEY:-}" ]]; then
|
|
echo "Error: ARBISCAN_API_KEY environment variable is required." >&2
|
|
exit 1
|
|
fi
|
|
|
|
TX_HASH="$1"
|
|
|
|
# Prefer the newer V2 endpoint; fall back to V1 if it fails (for backwards compatibility)
|
|
response=$(curl -s "https://api.arbiscan.io/v2/api?module=proxy&action=eth_getTransactionByHash&txhash=${TX_HASH}&apikey=${ARBISCAN_API_KEY}")
|
|
status=$(echo "$response" | jq -r '.status' 2>/dev/null || echo "")
|
|
|
|
if [[ "$status" == "1" || "$status" == "0" && "$response" == *"result"* ]]; then
|
|
echo "$response"
|
|
exit 0
|
|
fi
|
|
|
|
# Fallback to legacy V1 endpoint
|
|
curl -s "https://api.arbiscan.io/api?module=proxy&action=eth_getTransactionByHash&txhash=${TX_HASH}&apikey=${ARBISCAN_API_KEY}"
|