0xMiden / 0xMiden/docs

Add docs-tests harness coverage for Network Accounts snippets

Đang mở
#337 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
10
Fork
50
Merge trung bình
22 ngày 23 giờ
Pull request đã merge (30 ngày)
1

Mô tả

## Context

The new [Network Accounts](docs/builder/smart-contracts/accounts/network-accounts.md) page documents deploying a network account under v0.15 (`AuthNetworkAccount` + `NetworkAccountNoteAllowlist`, replacing the removed `AccountStorageMode::Network`).

Its Rust snippets are grounded in — and lifted near-verbatim from — miden-client's shipped integration test `bin/integration-tests/src/tests/network_transaction.rs` (v0.15.2) and miden-standards v0.15.3, so they compile upstream. They are **not yet** covered by the local `docs-tests` validation harness.

## Task

Add a `crates/network-account-demo` to the docs-tests harness that lifts the page's snippets verbatim (wrapped in exported fns) and goes green under `cargo build --keep-going`, so future v0.16+ API drift on:

- `AuthNetworkAccount::with_allowed_notes` / `with_allowed_tx_scripts`
- `AccountBuilder` + `AuthNetworkAccount` + `BasicWallet` build path
- client `add_account` / `submit_new_transaction` deploy flow
- `P2idNote::script_root()` / `MintNote::script_root()` / `NoteScriptRoot`

is caught before it reaches published docs.

## Out of scope

- The page content itself (already authored/reviewed).
- The tutorials-repo divergence (network-transactions tutorial still references `AccountStorageMode::Network`) — tracked separately.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Kiểm tra cấu trúc harness docs-tests hiện có và các đoạn mã Rust của trang tài khoản mạng. Tạo một crate mới dưới `crates/network-account-demo` xuất các hàm bao bọc các đoạn mã đó. Đảm bảo nó được biên dịch với `cargo build --keep-going`. Tham khảo bài kiểm tra tích hợp `bin/integration-tests/src/tests/network_transaction.rs` và miden-standards để sử dụng API chính xác. Xác minh bản dựng thành công để xác nhận phạm vi bao phủ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
documentation, testing
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
65/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.