feat(builder): lazy UTxO resolvers for retry-safe buildEffect
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- backend-api-design
Research direction
Start with BuildOptions and resolveAvailableUtxos in TransactionBuilder.ts, then inspect CollectFromParams.inputs and createCollectFromProgram in Collect.ts. Confirm how static arrays are handled before extending both inputs to support lazy Effects. Done means static behavior remains compatible and lazy resolvers are evaluated at build or program execution time so retries obtain fresh UTxOs.
Written by the indexing model from the issue text.
Description
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>>resolveAvailableUtxosinTransactionBuilder.ts— yield the Effect at build time when lazyCollectFromParams.inputs— same lazy extensioncreateCollectFromPrograminCollect.ts— evaluate resolver at program execution time
Non-breaking — static arrays continue to work as-is.
- Dominant language
- TypeScript
- Stars
- 22
- Forks
- 31
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntersectMBO/evolution-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
IntersectMBO/evolution-sdk#579 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
IntersectMBO/evolution-sdk#559 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
IntersectMBO/evolution-sdk#557 ·
Maintainers usually reply within 1 day
-
dependencies good first issue
Difficulty 1/5 Under an hour Newbie friendliness 93/100
IntersectMBO/evolution-sdk#541 ·
Maintainers usually reply within 1 day
-
bug external-review
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
IntersectMBO/evolution-sdk#530 ·
Maintainers usually reply within 1 day
All issues in IntersectMBO/evolution-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Doist/todoist-cli#576 ·
Maintainers usually reply within 1 day
-
feature
Difficulty 1/5 Under an hour Newbie friendliness 72/100
vercel-labs/skills#2370 ·
Maintainers usually reply within 1 day
-
🐛 Bug supabase/cli
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CopilotKit/aimock#491 ·
Maintainers usually reply within 1 day