Repository navigation
feat: Allow asset id string overload for ft post-condition - #1888
Open
jannik-stacks wants to merge 5 commits into
Open
jannik-stacks wants to merge 5 commits into
jannik-stacks wants to merge 5 commits into
Conversation
jannik-stacks
enabled auto-merge (squash)
September 15, 2026 11:09
Contributor
Public API Surface ChangesNo changes detected in the public API surface. Updated 2026-10-07 14:05:20 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Complete asset validation and tests for the new overload are needed.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds a single-string asset identifier overload to the fungible-token post-condition builder.
Changes:
- Adds
ft(asset)while preservingft(contractId, tokenName). - Normalizes both overloads into an
AssetString.
| File | Description |
|---|---|
packages/transactions/src/pc.ts |
Extends the FT post-condition builder API. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ft(...args: [AssetString] | [ContractIdString, string]): FungiblePostCondition { | ||
| const asset: AssetString = args.length === 1 ? args[0] : `${args[0]}::${args[1]}`; | ||
|
|
||
| const [contractId] = asset.split('::') as [ContractIdString, ...string[]]; |
| * ⚠ Amount of fungible tokens is denoted in the smallest unit of the token | ||
| * @param asset - The asset identifier of the fungible token. Formatted as `<contract-address>.<contract-name>::<token-name>`. | ||
| */ | ||
| ft(asset: AssetString): FungiblePostCondition; |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


<addr>.<name>::<asset>notation as single string inPc.builder