Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat(builder): lazy UTxO resolvers for retry-safe buildEffect

Đang mở
#199 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Bắt đầu với BuildOptions và resolveAvailableUtxos trong TransactionBuilder.ts, sau đó kiểm tra CollectFromParams.inputs và createCollectFromProgram trong Collect.ts. Xác nhận cách các mảng tĩnh được xử lý trước khi mở rộng cả hai inputs để hỗ trợ lazy Effects. Hoàn tất khi hành vi tĩnh vẫn tương thích và các lazy resolver được đánh giá tại thời điểm build hoặc thực thi chương trình, để các retry nhận được UTxOs mới.

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

Mô tả

enhancement

Problem

BuildOptions.availableUtxos and collectFrom inputs are static arrays resolved before buildEffect() runs. When an action is retried via Effect.retry, the same stale UTxO arrays are reused — the provider is never queried again.

Proposed Solution

Allow availableUtxos and collectFrom.inputs to also accept a lazy resolver () => Effect<ReadonlyArray<UTxO>> evaluated at build time:

client.newTx()
  .collectFrom({ inputs: () => client.Effect.getUtxos(scriptAddress), redeemer })
  .buildEffect({ availableUtxos: () => client.Effect.getWalletUtxos() })
  .pipe(Effect.flatMap(s => s.Effect.signAndSubmit()))
  .pipe(Effect.retry(Schedule.recurs(3)))

Each retry calls the resolver fresh, so UTxOs are always up to date with no extra boilerplate required from the user.

Affected Areas

  • BuildOptions.availableUtxos — extend type to accept () => Effect<ReadonlyArray<UTxO>>
  • resolveAvailableUtxos in TransactionBuilder.ts — yield the Effect at build time when lazy
  • CollectFromParams.inputs — same lazy extension
  • createCollectFromProgram in Collect.ts — evaluate resolver at program execution time

Non-breaking — static arrays continue to work as-is.

Ngôn ngữ chính
TypeScript
Star
22
Fork
33
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
44

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntersectMBO/evolution-sdk

Tất cả issue của IntersectMBO/evolution-sdk

Issue tương tự

Thêm issue về TypeScript

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.