Open
Conversation
chore: bump simplicityhl-core version
Greptile SummaryAdded issuance validation to the option sync process using SDK functions. When syncing options from NOSTR, the code now fetches and validates both the funding and creation transactions to ensure they follow the expected issuance pattern. This prevents malicious or incorrectly-formed options from being synced.
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[sync_option_event called] --> B[Fetch funding transaction]
B --> C[Extract creation txid from funding tx inputs]
C --> D{Funding tx has >= 2 inputs?}
D -->|No| E[Error: Invalid funding tx]
D -->|Yes| F{Inputs 0 and 1 spend same txid?}
F -->|No| G[Error: Inputs must spend same creation txid]
F -->|Yes| H[Fetch creation transaction]
H --> I{Creation tx has >= 2 inputs?}
I -->|No| J[Error: Invalid creation tx]
I -->|Yes| K{Issuance IDs match expected?}
K -->|No| L[Error: Issuance ID mismatch]
K -->|Yes| M[Build issuance constraints]
M --> N[Verify issuance with SDK]
N -->|Valid| O[Proceed with sync]
N -->|Invalid| P[Error: Invalid issuance]
O --> Q[Add contract to store]
Q --> R[Insert token metadata]
R --> S[Sync UTXO]
Last reviewed commit: f9e36a1 |
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.
Integrate issuance validation from the SDK into the sync command.
Note
Validation for option creation already exists in the SDK.
Also bump
simplicityhl-core,contracts, andcli-helperversions.Fixes: #55