Skip to content

fix: serialize post_condition_mode on v3 transaction responses - #2672

Merged
rafa-stacks merged 1 commit into
mainfrom
post-conditions
Sep 10, 2026
Merged

fix: serialize post_condition_mode on v3 transaction responses#2672
rafa-stacks merged 1 commit into
mainfrom
post-conditions

Conversation

@rafa-stacks

@rafa-stacks rafa-stacks commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

The v3 single-transaction endpoint decoded each transaction's post conditions but dropped the post condition mode. This adds an optional post_condition_mode field to the v3 transaction and mempool transaction schemas, populated alongside post_conditions when include=post_conditions is requested.

{
  "tx_id": "0x0000000000000000000000000000000000000000000000000000000000005003",
  "sender": {
    "address": "SP466FNC0P7JWTNM2R9T199QRZN1MYEDTAR0KP27",
    "nonce": 0
  },
  "sponsor": null,
  "fee_rate": "50",
  "block": {
    "height": 1,
    "hash": "0x0000000000000000000000000000000000000000000000000000000000000001",
    "index_hash": "0x0000000000000000000000000000000000000000000000000000000000000001",
    "time": 1000,
    "tx_index": 0
  },
  "bitcoin_block": {
    "height": 1,
    "time": 1000
  },
  "status": "success",
  "parent_block": {
    "hash": "0x123456",
    "index_hash": "0xdeadbeef"
  },
  "event_count": 0,
  "execution_cost": {
    "read_count": 0,
    "read_length": 0,
    "runtime": 0,
    "write_count": 0,
    "write_length": 0
  },
  "vm_error": null,
  "type": "contract_call",
  "contract_call": {
    "contract_id": "SP000000000000000000002Q6VF78.pox-4",
    "function_name": "stack-stx"
  },
  "post_condition_mode": "deny",
  "post_conditions": [
    {
      "principal": {
        "type_id": "principal_origin"
      },
      "condition_code": "sent_equal_to",
      "amount": "100",
      "type": "stx"
    }
  ]
}

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rafa-stacks rafa-stacks changed the title fix(v3): serialize post_condition_mode on transaction responses fix: serialize post_condition_mode on v3 transaction responses Sep 10, 2026
@rafa-stacks
rafa-stacks marked this pull request as ready for review September 10, 2026 19:14
@rafa-stacks
rafa-stacks merged commit 08b7ba5 into main Sep 10, 2026
25 checks passed
@rafa-stacks
rafa-stacks deleted the post-conditions branch September 10, 2026 19:16
@github-project-automation github-project-automation Bot moved this to ✅ Done in API Board Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants