Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Repository versions and URLs
COSMOS_SDK_VERSION := v0.50.14-inj.4
COSMOS_SDK_VERSION := v0.50.14-inj.9
COSMOS_SDK_REPO := https://github.com/InjectiveLabs/cosmos-sdk.git

INJECTIVE_CORE_VERSION := v1.18.0
INJECTIVE_CORE_VERSION := v1.19.0
INJECTIVE_CORE_REPO := https://github.com/InjectiveLabs/injective-core.git

INDEXER_VERSION := v1.18.3
INDEXER_VERSION := v1.19.0
INDEXER_REPO := https://github.com/InjectiveLabs/injective-indexer.git

IBC_GO_VERSION := v8.7.0-inj.3
IBC_GO_VERSION := v8.7.0-inj.4
IBC_GO_REPO := https://github.com/InjectiveLabs/ibc-go.git

COMETBFT_VERSION := v1.0.1-inj.6
COMETBFT_VERSION := v1.0.1-inj.7
COMETBFT_REPO := https://github.com/InjectiveLabs/cometbft.git

WASMD_VERSION := v0.53.3-inj.2
WASMD_VERSION := v0.53.3-inj.3
WASMD_REPO := https://github.com/InjectiveLabs/wasmd.git

PYTHON_SDK_VERSION := v1.13.0
PYTHON_SDK_VERSION := v1.14.0
PYTHON_SDK_REPO := https://github.com/InjectiveLabs/sdk-python.git

GO_SDK_VERSION := v1.60.0
GO_SDK_VERSION := v1.61.0
Comment on lines +2 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify all dependency version tags exist in their repositories

echo "Checking version tags..."

# Array of repo URLs and versions
declare -A repos=(
  ["https://github.com/InjectiveLabs/cosmos-sdk.git"]="v0.50.14-inj.9"
  ["https://github.com/InjectiveLabs/injective-core.git"]="v1.19.0"
  ["https://github.com/InjectiveLabs/injective-indexer.git"]="v1.19.0"
  ["https://github.com/InjectiveLabs/ibc-go.git"]="v8.7.0-inj.4"
  ["https://github.com/InjectiveLabs/cometbft.git"]="v1.0.1-inj.7"
  ["https://github.com/InjectiveLabs/wasmd.git"]="v0.53.3-inj.3"
  ["https://github.com/InjectiveLabs/sdk-python.git"]="v1.14.0"
  ["https://github.com/InjectiveLabs/sdk-go.git"]="v1.61.0"
)

failed=0
for repo in "${!repos[@]}"; do
  version="${repos[$repo]}"
  echo "Checking $repo for tag $version..."
  
  if git ls-remote --tags "$repo" | grep -q "refs/tags/$version"; then
    echo "✓ Found $version in $repo"
  else
    echo "✗ Tag $version NOT FOUND in $repo"
    failed=1
  fi
done

if [ $failed -eq 1 ]; then
  echo ""
  echo "ERROR: Some version tags were not found. Please verify the version numbers."
  exit 1
else
  echo ""
  echo "SUCCESS: All version tags exist in their repositories."
fi

Repository: InjectiveLabs/api-exchange-docs

Length of output: 1622


🏁 Script executed:

#!/bin/bash
# Check if the injective-core and injective-indexer repos are accessible via GitHub API
# and verify the exact repository status

echo "Checking repository accessibility via GitHub API..."
echo ""

# Function to check repo using curl to GitHub API
check_github_repo() {
  local repo_path=$1
  echo "Checking: $repo_path"
  
  # Try GitHub API endpoint
  status=$(curl -s -o /dev/null -w "%{http_code}" "https://api.github.com/repos/$repo_path")
  
  if [ "$status" = "200" ]; then
    echo "✓ Repository exists and is public"
    # Get latest releases/tags
    curl -s "https://api.github.com/repos/$repo_path/tags?per_page=5" | head -c 200
    echo ""
  elif [ "$status" = "404" ]; then
    echo "✗ Repository not found (404)"
  elif [ "$status" = "403" ]; then
    echo "⚠ Access forbidden (403) - may be private"
  else
    echo "⚠ Status: $status"
  fi
  echo ""
}

check_github_repo "InjectiveLabs/injective-core"
check_github_repo "InjectiveLabs/injective-indexer"

# Also check the Makefile to see if there's any additional context
echo "Checking Makefile for context..."
if [ -f "Makefile" ]; then
  echo "Makefile found. Checking relevant lines..."
  head -25 Makefile
fi

Repository: InjectiveLabs/api-exchange-docs

Length of output: 1151


Two dependency repositories do not exist on GitHub and will cause build failures.

Verification of dependency version tags reveals a critical issue: the repositories for injective-core (v1.19.0) and injective-indexer (v1.19.0) return 404 Not Found errors and cannot be accessed. The following six repositories were successfully verified:

  • cosmos-sdk: v0.50.14-inj.9 ✓
  • ibc-go: v8.7.0-inj.4 ✓
  • wasmd: v0.53.3-inj.3 ✓
  • sdk-python: v1.14.0 ✓
  • sdk-go: v1.61.0 ✓
  • cometbft: v1.0.1-inj.7 ✓

Correct the URLs for INJECTIVE_CORE_REPO and INDEXER_REPO or verify if these repositories have been renamed or moved to a different organization.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 2 - 23, INJECTIVE_CORE_REPO and INDEXER_REPO point to
non-existent GitHub URLs and will break the build; locate the correct
repositories or organization (or their new names) and update the Makefile
variables INJECTIVE_CORE_REPO and INDEXER_REPO to the valid GitHub repository
URLs, and if the tags v1.19.0 don't exist there also update
INJECTIVE_CORE_VERSION and INDEXER_VERSION to the correct tags (or remove
pinning), then re-run a git/tag check to ensure the URLs and versions resolve
successfully.

GO_SDK_REPO := https://github.com/InjectiveLabs/sdk-go.git

# Temporary directories
Expand Down
17 changes: 10 additions & 7 deletions scripts/generate_proto_json_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ get_type() {
if [[ $type =~ ^\[(.*)\](.*)$ ]]; then
local base_type="${BASH_REMATCH[1]}"
local remaining="${BASH_REMATCH[2]}"
remaining="${remaining##*.}"
type="$base_type$remaining array"
else
type="${type##*.}"
fi
fi
echo "$type"
Expand Down Expand Up @@ -444,13 +447,13 @@ process_repository_modules() {

if [ -d "$module_dir/types" ]; then
process_types_directory "$module_dir/types" "$output_dir" "$module_name"
else
# Check if module has .pb.go files in the main directory
if compgen -G "$module_dir/*.pb.go" > /dev/null 2>&1; then
echo "Processing module with direct .pb.go files: $module_name"
mkdir -p "$output_dir/$module_name"
process_directory "$module_dir" "$output_dir/$module_name"
fi
elif compgen -G "$module_dir/*.pb.go" > /dev/null 2>&1; then
echo "Processing module with direct .pb.go files: $module_name"
mkdir -p "$output_dir/$module_name"
process_directory "$module_dir" "$output_dir/$module_name"
elif find "$module_dir" -name "*.pb.go" -type f | head -1 | grep -q .; then
echo "Processing namespace directory: $module_name"
process_repository_modules "$module_dir" "$output_dir/$module_name"
fi
Comment on lines +450 to 457
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Module traversal can miss files due branch structure and brittle pipeline.

Two issues in this block:

  1. elif makes direct-file modules skip deeper namespace traversal, so nested .pb.go files in the same module are not processed.
  2. find ... | head -1 | grep -q . is fragile with set -o pipefail.
🔧 Proposed fix
-        elif compgen -G "$module_dir/*.pb.go" > /dev/null 2>&1; then
-            echo "Processing module with direct .pb.go files: $module_name"
-            mkdir -p "$output_dir/$module_name"
-            process_directory "$module_dir" "$output_dir/$module_name"
-        elif find "$module_dir" -name "*.pb.go" -type f | head -1 | grep -q .; then
-            echo "Processing namespace directory: $module_name"
-            process_repository_modules "$module_dir" "$output_dir/$module_name"
+        elif compgen -G "$module_dir/*.pb.go" > /dev/null 2>&1; then
+            echo "Processing module with direct .pb.go files: $module_name"
+            mkdir -p "$output_dir/$module_name"
+            process_directory "$module_dir" "$output_dir/$module_name"
+            if find "$module_dir" -mindepth 2 -type f -name "*.pb.go" -print -quit | grep -q .; then
+                echo "Processing namespace directory: $module_name"
+                process_repository_modules "$module_dir" "$output_dir/$module_name"
+            fi
+        elif find "$module_dir" -type f -name "*.pb.go" -print -quit | grep -q .; then
+            echo "Processing namespace directory: $module_name"
+            process_repository_modules "$module_dir" "$output_dir/$module_name"
         fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
elif compgen -G "$module_dir/*.pb.go" > /dev/null 2>&1; then
echo "Processing module with direct .pb.go files: $module_name"
mkdir -p "$output_dir/$module_name"
process_directory "$module_dir" "$output_dir/$module_name"
elif find "$module_dir" -name "*.pb.go" -type f | head -1 | grep -q .; then
echo "Processing namespace directory: $module_name"
process_repository_modules "$module_dir" "$output_dir/$module_name"
fi
elif compgen -G "$module_dir/*.pb.go" > /dev/null 2>&1; then
echo "Processing module with direct .pb.go files: $module_name"
mkdir -p "$output_dir/$module_name"
process_directory "$module_dir" "$output_dir/$module_name"
if find "$module_dir" -mindepth 2 -type f -name "*.pb.go" -print -quit | grep -q .; then
echo "Processing namespace directory: $module_name"
process_repository_modules "$module_dir" "$output_dir/$module_name"
fi
elif find "$module_dir" -type f -name "*.pb.go" -print -quit | grep -q .; then
echo "Processing namespace directory: $module_name"
process_repository_modules "$module_dir" "$output_dir/$module_name"
fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/generate_proto_json_files.sh` around lines 450 - 457, The branch
logic can skip nested .pb.go files and the find pipeline is fragile; modify the
conditionals so you do not use an elif that prevents both checks — e.g., first
check for any .pb.go anywhere under module_dir using find with -print -quit and
test its exit status (avoid piping to head/grep), and separately check for
direct files with compgen to call process_directory for root-level .pb.go and
process_repository_modules for nested/namespace modules (or run both paths as
appropriate); update the find invocation to use "find \"$module_dir\" -name
\"*.pb.go\" -type f -print -quit" and use its exit code to decide calling
process_repository_modules, while keeping process_directory invocation for
direct matches (functions: process_directory, process_repository_modules;
variable: module_dir, module_name).

done
}
Expand Down
96 changes: 54 additions & 42 deletions source/includes/_account.md

Large diffs are not rendered by default.

Loading
Loading