-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Describe the bug
In cocktail/vodka_inputs.ak, the predicate i_with(policy, name) enforces quantity_of(...) == 1, implicitly assuming a singleton asset. This constraint is not reflected in the function name, signature, or documentation.
To Reproduce
- Use
i_with(policy, name)fromcocktail/vodka_inputs.akto filter or group inputs - Provide an input containing the specified
PolicyIdandAssetNamewith quantity > 1 - Observe that the input is excluded despite containing the asset
Expected behavior
Either:
-
i_with(policy, name)should match any input containing the asset (quantity > 0), or -
the API should be split into two explicit helpers:
- a generic
i_with(...)(quantity > 0) - a clearly named singleton-specific helper (e.g.
i_with_singleton(...)ori_with_exactly_one(...))
- a generic
Screenshots
N/A
Station (please complete the following information):
- OS: Windows
- Version: 10
Additional context
Making the singleton assumption explicit via naming or function split would reduce semantic ambiguity and improve composability when working with fungible assets.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels