Files
aitbc/cli/aitbc_cli.py
aitbc 58376a3aec
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Fix coordinator-api PostgreSQL permissions and deploy to aitbc1
- Grant ALL ON SCHEMA public TO aitbc on aitbc_prod database
- Grant ALTER DEFAULT PRIVILEGES and CREATE ON DATABASE to aitbc
- Create aitbc role on aitbc1 and grant permissions on aitbc_coordinator
- Uncomment DATABASE_URL in blockchain.env on aitbc1
- Fund proposer wallet (ait1da1d84c7b8e5456b89672b6ca810bef3) with 997000 on mainnet
- Verify testnet proposer wallet (ait18338cd342f83d9bde2f96eec81e2727be6b1596f) exists with 1000000000 balance
- Both coordinator-apis now running successfully on port 8011
2026-05-14 11:53:05 +02:00

44 lines
1.1 KiB
Python
Executable File

#!/usr/bin/env python3
"""Compatibility wrapper for the AITBC CLI entrypoint."""
from __future__ import annotations
import importlib.util
import sys
from pathlib import Path
from types import ModuleType
REPO_ROOT = Path(__file__).resolve().parents[1]
CLI_DIR = Path(__file__).resolve().parent
sys.path.insert(0, str(REPO_ROOT))
sys.path.insert(0, str(CLI_DIR))
from aitbc.constants import BLOCKCHAIN_RPC_PORT
DEFAULT_RPC_URL = f"http://localhost:{BLOCKCHAIN_RPC_PORT}"
_CLI_MODULE: ModuleType | None = None
def _load_cli_module() -> ModuleType:
global _CLI_MODULE
if _CLI_MODULE is not None:
return _CLI_MODULE
cli_path = Path(__file__).with_name("core") / "main.py"
spec = importlib.util.spec_from_file_location("aitbc_cli_core_main", cli_path)
if spec is None or spec.loader is None:
raise ImportError(f"Unable to load modular CLI entrypoint from {cli_path}")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
_CLI_MODULE = module
return module
def main(argv=None):
return _load_cli_module().main(argv)
if __name__ == "__main__":
raise SystemExit(main())