immortal-bnb/GIT_SUBMODULES.md
caelum0x c1a3543431 ➕ Add Polymarket contract submodules
- polymarket-ctf-exchange: CTF exchange smart contracts
- polymarket-neg-risk-adapter: Negative risk token adapter
- polymarket-uma-adapter: UMA oracle integration
- Updated GIT_SUBMODULES.md documentation

These provide the complete Polymarket infrastructure for:
- Conditional token framework contracts
- Risk management adapters
- Oracle integrations
- Trading infrastructure
2025-11-12 17:11:46 +03:00

4.5 KiB

Gi## Current Submodules

1. agents/ - Polymarket Agents

2. polymarket-examples/ - Polymarket Examples

3. polymarket-realtime/ - Real-Time Data Client

4. polymarket-ctf-exchange/ - CTF Exchange Contracts

5. polymarket-neg-risk-adapter/ - Neg Risk CTF Adapter

6. polymarket-uma-adapter/ - UMA CTF Adapter

This project uses Git submodules to include external repositories.

Current Submodules

1. agents/ - Polymarket Agents

2. polymarket-examples/ - Polymarket Examples

3. polymarket-realtime/ - Polymarket Real-Time Data Client

Working with Submodules

Initial Clone

When cloning this repository for the first time, initialize submodules:

git clone <this-repo-url>
cd immortal-bnb-1
git submodule init
git submodule update

Or clone with submodules in one command:

git clone --recurse-submodules <this-repo-url>

Updating Submodules

To update a submodule to the latest version:

# Update specific submodule
cd agents
git pull origin main
cd ..
git add agents
git commit -m "Update agents submodule"

# Or update all submodules at once
git submodule update --remote

Adding New Submodules

To add a new submodule:

git submodule add <repository-url> <directory-name>
git commit -m "Add <name> submodule"

Removing a Submodule

To remove a submodule:

# Remove from .gitmodules and .git/config
git submodule deinit -f <directory-name>

# Remove from working tree
git rm -f <directory-name>

# Commit the change
git commit -m "Remove <name> submodule"

Common Issues

Submodule shows as modified but no changes

This usually means the submodule is on a different commit:

cd <submodule-dir>
git checkout main
git pull
cd ..
git add <submodule-dir>
git commit -m "Update submodule to latest"

Submodule directory is empty

Initialize and update:

git submodule init
git submodule update

Best Practices

  1. Always commit submodule updates - When you update a submodule, commit the change in the parent repo
  2. Document submodule purpose - Keep this file updated with why each submodule is included
  3. Pin to specific commits - Submodules reference specific commits, not branches
  4. Test after updates - Always test your project after updating submodules

Troubleshooting

Error: "fatal: 'xxx' already exists in the index"

git rm -rf --cached <directory>
git submodule add <url> <directory>

Submodule not showing latest changes

cd <submodule>
git fetch
git checkout <branch-or-commit>
cd ..
git add <submodule>
git commit -m "Update submodule"

More Information