-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Environment: Charms v8, charms-sdk 0.10.0
Observed behavior:
When a spell input has charms: {} (raw BTC without charms), tx.coin_ins is not populated. This results in coin_ins being empty/None even when BTC is present in the spell input.
Example spell input:
ins:
- utxo_id: abc123...:0
charms: {} # Raw BTC, no charms attachedIn the app contract, tx.coin_ins is empty for this input.
Expected behavior:
Unclear - is coin_ins expected to reflect all BTC inputs, or only those with charms?
Workaround:
Skip validation when coin_ins is not populated:
if btc_inputs > 0 && btc_inputs < required_amount {
return Err(...);
}Question:
Is this intentional behavior? What's the recommended pattern for validating BTC collateral in contracts when spell inputs have charms: {}?
Would appreciate clarification or documentation update on when coin_ins is populated.
Reactions are currently unavailable