From aa70c242271fbe7e60a68d1b810b3fcf6a2f1bbf Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Fri, 27 Feb 2026 16:31:52 -0800 Subject: [PATCH 1/2] Add result to contract deployments --- .../go-client-generated/api/swagger.yaml | 66 ++++++++++++------- .../docs/ContractDeployment.md | 1 + .../docs/ScheduledTransaction.md | 1 + .../model_contract_deployment.go | 1 + .../model_scheduled_transaction.go | 2 + openapi/experimental/openapi.yaml | 5 ++ 6 files changed, 52 insertions(+), 24 deletions(-) diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index d989602b3..4f21d98f3 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -2347,6 +2347,7 @@ components: execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner transaction_handler_uuid: transaction_handler_uuid + is_placeholder: true cancelled_transaction_id: null id: id executed_transaction_id: null @@ -2357,14 +2358,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null _expandable: result: http://example.com/aeiou @@ -2454,6 +2456,7 @@ components: execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner transaction_handler_uuid: transaction_handler_uuid + is_placeholder: true cancelled_transaction_id: null id: id executed_transaction_id: null @@ -2464,14 +2467,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null _expandable: result: http://example.com/aeiou @@ -2588,6 +2592,11 @@ components: $ref: "#/components/schemas/Identifier" cancelled_transaction_id: $ref: "#/components/schemas/Identifier" + is_placeholder: + type: boolean + description: "True if the scheduled transaction was created during bootstrapping\ + \ based on the current chain state, not based on a protocol event. When\ + \ true, block_height, transaction_id, tx_index, and event_index are absent." transaction: $ref: "#/components/schemas/Transaction" result: @@ -2630,6 +2639,7 @@ components: execution_effort: execution_effort transaction_handler_owner: transaction_handler_owner transaction_handler_uuid: transaction_handler_uuid + is_placeholder: true cancelled_transaction_id: null id: id executed_transaction_id: null @@ -2640,14 +2650,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null _expandable: result: http://example.com/aeiou @@ -2767,6 +2778,8 @@ components: \ block_height, transaction_id, tx_index, and event_index are absent." transaction: $ref: "#/components/schemas/Transaction" + result: + $ref: "#/components/schemas/TransactionResult" _expandable: $ref: "#/components/schemas/ContractDeployment__expandable" _links: @@ -2778,14 +2791,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null ContractsResponse: required: @@ -2807,14 +2821,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null - transaction_id: null address: null @@ -2822,14 +2837,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null ContractDeploymentsResponse: required: @@ -2850,14 +2866,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null - transaction_id: null address: null @@ -2865,14 +2882,15 @@ components: _links: _self: _self contract_id: contract_id - is_placeholder: true block_height: block_height + event_index: event_index + code_hash: code_hash + result: null + is_placeholder: true tx_index: tx_index _expandable: result: http://example.com/aeiou transaction: http://example.com/aeiou - event_index: event_index - code_hash: code_hash transaction: null next_cursor: next_cursor Error: diff --git a/openapi/experimental/go-client-generated/docs/ContractDeployment.md b/openapi/experimental/go-client-generated/docs/ContractDeployment.md index ae51193ca..2c5ab1cc6 100644 --- a/openapi/experimental/go-client-generated/docs/ContractDeployment.md +++ b/openapi/experimental/go-client-generated/docs/ContractDeployment.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **CodeHash** | **string** | Hex-encoded SHA3-256 hash of the contract code. | [default to null] **IsPlaceholder** | **bool** | True if the deployment was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent. | [optional] [default to null] **Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] +**Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] **Expandable** | [***ContractDeploymentExpandable**](ContractDeployment__expandable.md) | | [default to null] **Links** | [***Links**](Links.md) | | [optional] [default to null] diff --git a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md index c5fdba1a3..1b3d40944 100644 --- a/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md +++ b/openapi/experimental/go-client-generated/docs/ScheduledTransaction.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **CreatedTransactionId** | **string** | | [default to null] **ExecutedTransactionId** | **string** | | [optional] [default to null] **CancelledTransactionId** | **string** | | [optional] [default to null] +**IsPlaceholder** | **bool** | True if the scheduled transaction was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent. | [optional] [default to null] **Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] **Result** | [***TransactionResult**](TransactionResult.md) | | [optional] [default to null] **HandlerContract** | [***ContractDeployment**](ContractDeployment.md) | | [optional] [default to null] diff --git a/openapi/experimental/go-client-generated/model_contract_deployment.go b/openapi/experimental/go-client-generated/model_contract_deployment.go index f4b504f6d..e7e99f026 100644 --- a/openapi/experimental/go-client-generated/model_contract_deployment.go +++ b/openapi/experimental/go-client-generated/model_contract_deployment.go @@ -25,6 +25,7 @@ type ContractDeployment struct { // True if the deployment was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent. IsPlaceholder bool `json:"is_placeholder,omitempty"` Transaction *Transaction `json:"transaction,omitempty"` + Result *TransactionResult `json:"result,omitempty"` Expandable *ContractDeploymentExpandable `json:"_expandable"` Links *Links `json:"_links,omitempty"` } diff --git a/openapi/experimental/go-client-generated/model_scheduled_transaction.go b/openapi/experimental/go-client-generated/model_scheduled_transaction.go index c8446ec27..196309de1 100644 --- a/openapi/experimental/go-client-generated/model_scheduled_transaction.go +++ b/openapi/experimental/go-client-generated/model_scheduled_transaction.go @@ -33,6 +33,8 @@ type ScheduledTransaction struct { CreatedTransactionId string `json:"created_transaction_id"` ExecutedTransactionId string `json:"executed_transaction_id,omitempty"` CancelledTransactionId string `json:"cancelled_transaction_id,omitempty"` + // True if the scheduled transaction was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent. + IsPlaceholder bool `json:"is_placeholder,omitempty"` Transaction *Transaction `json:"transaction,omitempty"` Result *TransactionResult `json:"result,omitempty"` HandlerContract *ContractDeployment `json:"handler_contract,omitempty"` diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index a9e835d3f..eaf7e2d73 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -1126,6 +1126,9 @@ components: cancelled_transaction_id: description: Flow transaction ID of the cancellation transaction. $ref: "#/components/schemas/Identifier" + is_placeholder: + description: True if the scheduled transaction was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent. + type: boolean transaction: $ref: "#/components/schemas/Transaction" result: @@ -1214,6 +1217,8 @@ components: type: boolean transaction: $ref: "#/components/schemas/Transaction" + result: + $ref: "#/components/schemas/TransactionResult" _expandable: type: object description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. From b7c99b4fb01ba2022c331db01deee6a07e360242 Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Tue, 3 Mar 2026 06:15:11 -0800 Subject: [PATCH 2/2] Make code expandable --- .../go-client-generated/api/swagger.yaml | 14 +++++++++++++- .../go-client-generated/docs/ContractDeployment.md | 2 +- .../docs/ContractDeploymentExpandable.md | 1 + .../model_contract_deployment.go | 2 +- .../model_contract_deployment__expandable.go | 2 ++ openapi/experimental/openapi.yaml | 5 ++++- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/openapi/experimental/go-client-generated/api/swagger.yaml b/openapi/experimental/go-client-generated/api/swagger.yaml index 4f21d98f3..f540db561 100644 --- a/openapi/experimental/go-client-generated/api/swagger.yaml +++ b/openapi/experimental/go-client-generated/api/swagger.yaml @@ -2366,6 +2366,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null _expandable: @@ -2475,6 +2476,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null _expandable: @@ -2658,6 +2660,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null _expandable: @@ -2740,7 +2743,6 @@ components: required: - _expandable - address - - code - code_hash - contract_id type: object @@ -2799,6 +2801,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null ContractsResponse: @@ -2829,6 +2832,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null - transaction_id: null @@ -2845,6 +2849,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null ContractDeploymentsResponse: @@ -2874,6 +2879,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null - transaction_id: null @@ -2890,6 +2896,7 @@ components: tx_index: tx_index _expandable: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou transaction: null next_cursor: next_cursor @@ -2956,6 +2963,10 @@ components: ContractDeployment__expandable: type: object properties: + code: + type: string + description: Link to fetch the Cadence source code of this deployment. + format: uri transaction: type: string description: Link to fetch the full transaction that applied this deployment. @@ -2969,6 +2980,7 @@ components: \ and is removed from `_expandable`." example: result: http://example.com/aeiou + code: http://example.com/aeiou transaction: http://example.com/aeiou parameters: cursorParam: diff --git a/openapi/experimental/go-client-generated/docs/ContractDeployment.md b/openapi/experimental/go-client-generated/docs/ContractDeployment.md index 2c5ab1cc6..0d783376f 100644 --- a/openapi/experimental/go-client-generated/docs/ContractDeployment.md +++ b/openapi/experimental/go-client-generated/docs/ContractDeployment.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **TransactionId** | **string** | | [optional] [default to null] **TxIndex** | **string** | Position of the deploying transaction within its block. | [optional] [default to null] **EventIndex** | **string** | Position of the contract event within its transaction. | [optional] [default to null] -**Code** | **string** | Base64-encoded Cadence source code of the contract deployed. | [default to null] +**Code** | **string** | Base64-encoded Cadence source code of the contract deployed. | [optional] [default to null] **CodeHash** | **string** | Hex-encoded SHA3-256 hash of the contract code. | [default to null] **IsPlaceholder** | **bool** | True if the deployment was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent. | [optional] [default to null] **Transaction** | [***Transaction**](Transaction.md) | | [optional] [default to null] diff --git a/openapi/experimental/go-client-generated/docs/ContractDeploymentExpandable.md b/openapi/experimental/go-client-generated/docs/ContractDeploymentExpandable.md index b59bc7548..1951e4147 100644 --- a/openapi/experimental/go-client-generated/docs/ContractDeploymentExpandable.md +++ b/openapi/experimental/go-client-generated/docs/ContractDeploymentExpandable.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Code** | **string** | Link to fetch the Cadence source code of this deployment. | [optional] [default to null] **Transaction** | **string** | Link to fetch the full transaction that applied this deployment. | [optional] [default to null] **Result** | **string** | Link to fetch the transaction result. | [optional] [default to null] diff --git a/openapi/experimental/go-client-generated/model_contract_deployment.go b/openapi/experimental/go-client-generated/model_contract_deployment.go index e7e99f026..f288d754f 100644 --- a/openapi/experimental/go-client-generated/model_contract_deployment.go +++ b/openapi/experimental/go-client-generated/model_contract_deployment.go @@ -19,7 +19,7 @@ type ContractDeployment struct { // Position of the contract event within its transaction. EventIndex string `json:"event_index,omitempty"` // Base64-encoded Cadence source code of the contract deployed. - Code string `json:"code"` + Code string `json:"code,omitempty"` // Hex-encoded SHA3-256 hash of the contract code. CodeHash string `json:"code_hash"` // True if the deployment was created during bootstrapping based on the current chain state, not based on a protocol event. When true, block_height, transaction_id, tx_index, and event_index are absent. diff --git a/openapi/experimental/go-client-generated/model_contract_deployment__expandable.go b/openapi/experimental/go-client-generated/model_contract_deployment__expandable.go index 02839aec0..397fff6c9 100644 --- a/openapi/experimental/go-client-generated/model_contract_deployment__expandable.go +++ b/openapi/experimental/go-client-generated/model_contract_deployment__expandable.go @@ -10,6 +10,8 @@ package swagger // Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. type ContractDeploymentExpandable struct { + // Link to fetch the Cadence source code of this deployment. + Code string `json:"code,omitempty"` // Link to fetch the full transaction that applied this deployment. Transaction string `json:"transaction,omitempty"` // Link to fetch the transaction result. diff --git a/openapi/experimental/openapi.yaml b/openapi/experimental/openapi.yaml index eaf7e2d73..5b464363f 100644 --- a/openapi/experimental/openapi.yaml +++ b/openapi/experimental/openapi.yaml @@ -1179,7 +1179,6 @@ components: required: - contract_id - address - - code - code_hash - _expandable properties: @@ -1223,6 +1222,10 @@ components: type: object description: Contains URI links for fields not included in the response. When a field is expanded via the `expand` query parameter, it appears inline and is removed from `_expandable`. properties: + code: + type: string + format: uri + description: Link to fetch the Cadence source code of this deployment. transaction: type: string format: uri