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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ rad.json
#License-file
*.flf
#Test results file
TestResults.xml
TestResults.xml
# Python CLI cache
__pycache__/
*.pyc
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,15 @@ Bu depoya, AOXCON ve AOXCHAIN entegrasyonu için çoklu klasör yapısı eklendi
- `sdk/ts/` → TypeScript istemci SDK başlangıç alanı

Bu yapı, Move tabanlı geliştirme akışını daha modüler ve genişletilebilir hale getirmek için hazırlanmıştır.

## Hızlı Uyum Komutları

```bash
python3 cli/aoxchain_cli.py manifest --json
python3 cli/aoxchain_cli.py examples
python3 cli/aoxchain_cli.py build
python3 cli/aoxchain_cli.py test
```

Ek operasyonel doğrulama listesi için `docs/COMPATIBILITY_MATRIX.md`, `docs/INTEGRATION_COMPLETENESS_CHECKLIST.md` ve `scripts/bootstrap.sh` birlikte kullanılmalıdır.
=======
10 changes: 10 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# AOXChain CLI

`aoxchain_cli.py`, AOXCON Move deposu için hem etkileşimli hem de komut bazlı bir geliştirici aracı sağlar.
Bu klasördeki `aoxchain_cli.py`, AOXCON Move deposu için etkileşimli bir komut satırı arayüzü sağlar.

## Kullanım

```bash
python3 cli/aoxchain_cli.py # interactive menü
python3 cli/aoxchain_cli.py manifest --json
python3 cli/aoxchain_cli.py examples
python3 cli/aoxchain_cli.py build
python3 cli/aoxchain_cli.py test
python3 cli/aoxchain_cli.py
```

## Özellikler

- `sui move build` ve `sui move test` çalıştırma
- `sui` kurulu değilse yönlendirme mesajı gösterme
- Repo uyumluluk manifestini düz/yapısal JSON çıktı ile sunma
- `examples/contracts` altındaki Move sözleşmelerini listeleme
- `sui move test` ve `sui move build` komutlarını menüden çalıştırma
- AOXCON ↔ AOXCHAIN uyumluluk klasörlerini JSON olarak görüntüleme
- Örnek Move sözleşmelerini listeleme
Expand Down
124 changes: 124 additions & 0 deletions cli/aoxchain_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/usr/bin/env python3
"""AOXCON ↔ AOXCHAIN Move toolkit CLI."""

from __future__ import annotations

import argparse
import json
import shlex
import shutil
import subprocess
import sys
from dataclasses import dataclass
from typing import Callable
from pathlib import Path

ROOT = Path(__file__).resolve().parents[1]
EXAMPLE_DIR = ROOT / "examples" / "contracts"
"""AOXChain uyumlu etkileşimli yerel CLI yardımcı aracı."""

from __future__ import annotations
Expand All @@ -16,6 +32,10 @@
class MenuAction:
key: str
label: str
handler: Callable[[], int]


def run_shell(command: list[str]) -> int:
command: list[str] | None = None


Expand All @@ -28,6 +48,70 @@ def run_command(command: list[str]) -> None:
print(completed.stderr.strip())
if completed.returncode != 0:
print(f"\nKomut başarısız oldu (kod={completed.returncode}).")
return completed.returncode


def ensure_sui() -> bool:
if shutil.which("sui"):
return True
print("sui CLI bulunamadı. Kurulum için: https://docs.sui.io/references/cli/install-sui")
return False


def repo_manifest() -> dict[str, str]:
return {
"move_package": str(ROOT / "Move.toml"),
"contracts": str(ROOT / "sources"),
"contract_examples": str(EXAMPLE_DIR),
"frontend": str(ROOT / "frontend" / "index.html"),
"scripts": str(ROOT / "scripts"),
"typescript_sdk": str(ROOT / "sdk" / "ts"),
}


def list_examples() -> list[str]:
return sorted(path.name for path in EXAMPLE_DIR.glob("*.move"))


def cmd_build(_: argparse.Namespace) -> int:
if not ensure_sui():
return 1
return run_shell(["sui", "move", "build"])


def cmd_test(_: argparse.Namespace) -> int:
if not ensure_sui():
return 1
return run_shell(["sui", "move", "test"])


def cmd_manifest(args: argparse.Namespace) -> int:
payload = repo_manifest()
if args.json:
print(json.dumps(payload, indent=2, ensure_ascii=False))
else:
for key, value in payload.items():
print(f"{key:18} : {value}")
return 0


def cmd_examples(args: argparse.Namespace) -> int:
names = list_examples()
if args.json:
print(json.dumps(names, indent=2, ensure_ascii=False))
else:
for idx, name in enumerate(names, start=1):
print(f"{idx:>2}. {name}")
return 0


def run_interactive(_: argparse.Namespace) -> int:
actions = [
MenuAction("1", "Move paketini derle", lambda: cmd_build(argparse.Namespace())),
MenuAction("2", "Move testlerini çalıştır", lambda: cmd_test(argparse.Namespace())),
MenuAction("3", "Repo manifestini göster", lambda: cmd_manifest(argparse.Namespace(json=True))),
MenuAction("4", "Örnek sözleşmeleri listele", lambda: cmd_examples(argparse.Namespace(json=False))),
MenuAction("q", "Çıkış", lambda: 0),


def show_repo_layout() -> None:
Expand Down Expand Up @@ -60,13 +144,53 @@ def interactive_menu() -> None:
choice = input("Seçiminiz: ").strip().lower()
if choice == "q":
print("Çıkılıyor.")
return 0
return

selected = next((action for action in actions if action.key == choice), None)
if selected is None:
print("Geçersiz seçim, tekrar deneyin.")
continue

selected.handler()


def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(description="AOXCON Move toolkit CLI")
sub = parser.add_subparsers(dest="command")

interactive = sub.add_parser("interactive", help="Etkileşimli menüyü aç")
interactive.set_defaults(func=run_interactive)

build = sub.add_parser("build", help="sui move build çalıştır")
build.set_defaults(func=cmd_build)

test = sub.add_parser("test", help="sui move test çalıştır")
test.set_defaults(func=cmd_test)

manifest = sub.add_parser("manifest", help="Repo manifestini göster")
manifest.add_argument("--json", action="store_true", help="JSON çıktısı ver")
manifest.set_defaults(func=cmd_manifest)

examples = sub.add_parser("examples", help="Move örneklerini listele")
examples.add_argument("--json", action="store_true", help="JSON çıktısı ver")
examples.set_defaults(func=cmd_examples)

return parser


def main() -> int:
parser = build_parser()
args = parser.parse_args()

if not args.command:
return run_interactive(argparse.Namespace())

return args.func(args)


if __name__ == "__main__":
sys.exit(main())
if choice == "3":
show_repo_layout()
continue
Expand Down
33 changes: 33 additions & 0 deletions docs/INTEGRATION_COMPLETENESS_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AOXCON ↔ AOXCHAIN Integration Completeness Checklist

Bu liste, deponun "full / eksiksiz" seviyeye yaklaşması için uygulanacak net adımları içerir.

## 1) Toolchain ve CI

- [ ] CI pipeline içinde `sui move build` ve `sui move test` zorunlu olmalı.
- [ ] `scripts/bootstrap.sh` çıktısı release artefact olarak saklanmalı.
- [ ] CLI için otomatik smoke test (`manifest`, `examples`) eklenmeli.

## 2) Move Sözleşme Kapsamı

- [ ] `examples/contracts` modülleri için senaryo testleri yazılmalı.
- [ ] Her örnek modülde abort-code sabitleri ve `errors` entegrasyonu yapılmalı.
- [ ] AOXCHAIN'e taşınacak entry fonksiyonları için sürümleme dokümanı tutulmalı.

## 3) Frontend ve Geliştirici UX

- [ ] Frontend bir statik dosya sunucusundan servis edilip screenshot CI’a eklenmeli.
- [ ] Frontpage'e canlı ağ durumu/RPC yapılandırma formu eklenmeli.
- [ ] CLI komut sonuçlarını frontend'e taşıyacak bir lightweight API (opsiyonel) planlanmalı.

## 4) SDK Planı

- [ ] `sdk/ts/client.ts` ile temel RPC bağlayıcı geliştirilmeli.
- [ ] `sdk/ts/contracts.ts` içinde örnek Move entrypoint wrapper'ları eklenmeli.
- [ ] Sürüm matrisi (AOXCON tag ↔ AOXCHAIN tag ↔ SDK tag) yayınlanmalı.

## 5) Güvenlik ve Operasyon

- [ ] `docs/SECURITY_CHECKLIST.md` ile bu listedeki maddeler çapraz doğrulanmalı.
- [ ] Mainnet öncesi audit bulguları için "fix status" tablosu tutulmalı.
- [ ] Olası ağ/finality farklılıkları için rollback playbook hazırlanmalı.
29 changes: 29 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<style>
body { font-family: Inter, system-ui, sans-serif; margin: 0; background: #06091a; color: #eaf0ff; }
header { padding: 32px; border-bottom: 1px solid #243053; }
main { max-width: 920px; margin: 0 auto; padding: 32px; }
.card { background: #111937; border: 1px solid #2c3866; border-radius: 14px; padding: 16px; margin-bottom: 16px; }
code { color: #9ed0ff; }
a { color: #9ed0ff; }
.badge { display: inline-block; margin-right: 8px; margin-bottom: 8px; background: #23315a; border: 1px solid #3a4b84; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
main { max-width: 900px; margin: 0 auto; padding: 32px; }
.card { background: #111937; border: 1px solid #2c3866; border-radius: 14px; padding: 16px; margin-bottom: 16px; }
code { color: #9ed0ff; }
Expand All @@ -17,6 +22,30 @@
<body>
<header>
<h1>AOXCON Move Library Frontpage</h1>
<p>AOXCON ve AOXCHAIN odaklı Move geliştirme başlangıç ekranı.</p>
<span class="badge">Sui Move</span>
<span class="badge">AOXCON Uyum Katmanı</span>
<span class="badge">AOXCHAIN Entegrasyon Hazır</span>
</header>
<main>
<section class="card">
<h2>Resmi Kaynaklar</h2>
<ul>
<li><a href="https://github.com/aoxc/aoxcon" target="_blank" rel="noreferrer">AOXCON Repository</a></li>
<li><a href="https://github.com/aoxc/aoxchain" target="_blank" rel="noreferrer">AOXCHAIN Repository</a></li>
</ul>
</section>
<section class="card">
<h2>Hızlı Başlat</h2>
<pre><code>python3 cli/aoxchain_cli.py
python3 cli/aoxchain_cli.py manifest --json
python3 cli/aoxchain_cli.py examples
python3 cli/aoxchain_cli.py build
python3 cli/aoxchain_cli.py test</code></pre>
</section>
<section class="card">
<h2>Sözleşme Örnekleri</h2>
<p><code>examples/contracts</code> içinde genişletilebilir örnek modüller bulunur.</p>
<p>AOXCON ve AOXCHAIN ile uyumlu Move ekosistemi başlangıç ekranı.</p>
</header>
<main>
Expand Down
Loading