substreams-pack
/substreams-pack
Wyjaśnia budowanie, pakowanie i dystrybucję pakietów Substreams .spkg w monorepo substreams-svm, łącznie z komendą substreams pack.
- Autor
- pinax-network ↗
- Repozytorium
- substreams-svm ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 26.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Wyjaśnia budowanie, pakowanie i dystrybucję pakietów Substreams .spkg w monorepo substreams-svm, łącznie z komendą substreams pack.
Oryginalny opis (EN)
Instructions for building, packing, and distributing Substreams packages (.spkg) in the substreams-svm monorepo. Use when building crates, running `substreams pack`, or copying .spkg files.
Jak działa
- Overview
- Dependency Chain
- Step-by-Step: Full Rebuild
- Important Notes
Podgląd SKILL.md
--- name: substreams-pack description: Instructions for building, packing, and distributing Substreams packages (.spkg) in the substreams-svm monorepo. Use when building crates, running `substreams pack`, or copying .spkg files. license: Apache-2.0 compatibility: platforms: [claude-code, cursor, vscode, windsurf] metadata: version: 1.0.0 author: Pinax Network documentation: https://github.com/pinax-network/substreams-svm --- # Substreams Pack & Release (SVM) Instructions for building, packing, and copying `.spkg` files in the substreams-svm monorepo. ## Overview The `./spkg/` directory is the central distribution point for shared Substreams packages. Downstream modules import their dependencies from `../spkg/*.spkg`, so packages **must** be copied there after packing. ## Dependency Chain Packages must be built **bottom-up** — a package's `.spkg` dependencies must exist in `./spkg/` before it can be packed. ``` Level 0 — Leaf crates (individual DEX/token modules): ├── raydium/amm-v4/ → raydium-amm-v4-v*.spkg ├── raydium/clmm/ → raydium-clmm-v*.spkg ├── raydium/cpmm/ → raydium-cpmm-v*.spkg ├── raydium/launchpad/ → raydium-launchpad-v*.spkg ├── jupiter/v4/ → jupiter-v4-v*.spkg ├── jupiter/v6/ → jupiter-v6-v*.spkg ├── orca/whirlpool/ → orca-whirlpool-v*.spkg ├── meteora/amm/ → meteora-amm-v*.spkg ├── meteora/daam/ → meteora-daam-v*.spkg ├── meteora/dllm/ → meteora-dllm-v*.spkg ├── pumpfun/bonding_curve/ → pumpfun-bonding-curve-v*.spkg ├── pumpfun/amm/ → pumpfun-amm-v*.spkg ├── pumpswap/ → pumpswap-v*.spkg ├── spl-token/ → spl-token-v*.spkg ├── native-token/ → native-token-v*.spkg └── ... (moonshot, pancakeswap, lifinity, phoenix, openbook, etc.) Level 1 — DB layer (imports Level 0 .spkg files): ├── db-svm-dex/ → svm-dex-v*.spkg ├── db-svm-transfers/ → svm-transfers-v*.spkg ├── db-svm-balances/ → svm-balances-v*.spkg ├── db-svm-accounts/ → svm-accounts-v*.spkg └── db-svm-metadata/ → svm-metadata-v*.spkg Level 2 — Sink layer (imports Level 1 .spkg files): ├── db-svm-dex-clickhouse/ → clickhouse-svm-dex-v*.spkg ├── db-svm-dex-postgres/ → postgres-svm-dex-v*.spkg ├── db-svm-transfers-clickhouse/ → clickhouse-svm-transfers-v*.spkg ├── db-svm-transfers-postgres/ → postgres-svm-transfers-v*.spkg ├── db-svm-balances-clickhouse/ → clickhouse-svm-balances-v*.spkg ├── db-svm-balances-postgres/ → postgres-svm-balances-v*.spkg ├── db-svm-accounts-clickhouse/ → clickhouse-svm-accounts-v*.spkg ├── db-svm-accounts-postgres/ → postgres-svm-accounts-v*.spkg ├── db-svm-metadata-clickhouse/ → clickhouse-svm-metadata-v*.spkg └── db-svm-metadata-postgres/ → postgres-svm-metadata-v*.spkg ``` ## Step-by-Step: Full Rebuild ### 1. Regenerate Protobuf Bindings (if .proto files changed) ```bash cd proto && make protogen ``` This runs `substreams protogen --exclude-paths sf/substreams,google` to regenerate `proto/src/pb/*.rs` from `proto/v1/*.proto`. ### 2. Build All Rust Crates ```bash cargo build --target wasm32-unknown-unknown --release ``` Or build specific crates: ```bash cargo build --target wasm32-unknown-unknown --release \ -p raydium-amm-v4 \ -p jupiter-v6 \ -p db-svm-dex ``` ### 3. Pack Level 0 (leaf crates) ```bash cd raydium/amm-v4 && substreams pack && cp raydium-amm-v4-v*.spkg ../../spkg/ cd jupiter/v6 && substreams pack && cp jupiter-v6-v*.spkg ../../spkg/ cd pumpfun/bonding_curve && substreams pack && cp pumpfun-bonding-curve-v*.spkg ../../spkg/ cd spl-token && substreams pack && cp spl-token-v*.spkg ../spkg/ cd native-token && substreams pack && cp native-token-v*.spkg ../spkg/ ``` ### 4. Pack Level 1 (DB layer) These import Level 0 `.spkg` files, so Level 0 must be packed first. ```bash cd db-svm-dex && substreams pack && cp svm-dex-v*.spkg ../spkg/ cd db-svm-transfers && substreams pack && cp svm-transfers-v*.spkg ../spkg/ cd db-svm-balances && substreams pack && cp svm-balances-v*.spkg ../spkg/ ``` ### 5. Pack Level 2 (Sink layer) These import Level 1 `.spkg` files, so Level 1 must be packed first. ```bash cd db-svm-dex-clickhouse && substreams pack && cp clickhouse-svm-dex-v*.spkg ../spkg/ cd db-svm-dex-postgres && substreams pack && cp postgres-svm-dex-v*.spkg ../spkg/ ``` ## Important Notes - **Always build WASM before packing**: `substreams pack` reads compiled `.wasm` files - **Remove old SPKGs** from `./spkg/` when updating versions - **Binary type**: SVM uses `wasm/rust-v1+wasm-bindgen-shims` (not plain `wasm/rust-v1`) - **Nested crate paths**: DEX modules are nested (e.g., `raydium/amm-v4/`), so SPKG copy paths use `../../spkg/`
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · pinax-network/substreams-svm | 100 | Apache-2.0 |
| pinax-network/substreams-evm | 100 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki 617b7e2f7634 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100release-conventions
Opisuje konwencje nazw tagów, wydań i paczek SPKG w monorepo substreams-svm, przy tworzeniu wydań i publikacji. - 100substreams-sink
Pomaga konsumować dane modułów Solana/SVM w Substreams: sinki, potoki czasu rzeczywistego i integrację z aplikacjami. - 100release-conventions
Opisuje konwencje nazw tagów, wydań i paczek SPKG w monorepo substreams-evm, przy tworzeniu wydań i publikacji. - 100substreams-dev
Pomaga tworzyć, budować i debugować projekty Substreams na dowolnym blockchainie: manifesty, moduły w Rust i schematy protobuf. - 100substreams-convert
Przenosi istniejące projekty indeksowania blockchain, np. subgraf The Graph lub program Solana, na potok modułów Substreams. - 95substreams-dev-legacy
Pisze moduły Substreams w starszym stosie, do wersji 0.7, gdzie protobuf korzysta z biblioteki prost.