Skip to content

Commit fc9a780

Browse files
author
awstools
committed
feat(client-managedblockchain-query): Adding Confirmation Status and Execution Status to GetTransaction Response.
1 parent 3633030 commit fc9a780

File tree

3 files changed

+64
-4
lines changed

3 files changed

+64
-4
lines changed

clients/client-managedblockchain-query/src/commands/GetTransactionCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface GetTransactionCommandOutput extends GetTransactionOutput, __Met
6363
* // transactionTimestamp: new Date("TIMESTAMP"), // required
6464
* // transactionIndex: Number("long"), // required
6565
* // numberOfTransactions: Number("long"), // required
66-
* // status: "STRING_VALUE", // required
66+
* // status: "STRING_VALUE",
6767
* // to: "STRING_VALUE", // required
6868
* // from: "STRING_VALUE",
6969
* // contractAddress: "STRING_VALUE",
@@ -75,6 +75,8 @@ export interface GetTransactionCommandOutput extends GetTransactionOutput, __Met
7575
* // signatureS: "STRING_VALUE",
7676
* // transactionFee: "STRING_VALUE",
7777
* // transactionId: "STRING_VALUE",
78+
* // confirmationStatus: "STRING_VALUE",
79+
* // executionStatus: "STRING_VALUE",
7880
* // },
7981
* // };
8082
*

clients/client-managedblockchain-query/src/models/models_0.ts

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface AssetContract {
9292
/**
9393
* @public
9494
* <p>The container for the contract identifier containing its blockchain network
95-
* and address.</p>
95+
* and address.</p>
9696
*/
9797
contractIdentifier: ContractIdentifier | undefined;
9898

@@ -570,6 +570,19 @@ export class ValidationException extends __BaseException {
570570
}
571571
}
572572

573+
/**
574+
* @public
575+
* @enum
576+
*/
577+
export const ConfirmationStatus = {
578+
FINAL: "FINAL",
579+
} as const;
580+
581+
/**
582+
* @public
583+
*/
584+
export type ConfirmationStatus = (typeof ConfirmationStatus)[keyof typeof ConfirmationStatus];
585+
573586
/**
574587
* @public
575588
* <p>The contract or wallet address by which to filter the request.</p>
@@ -618,6 +631,20 @@ export interface ContractMetadata {
618631
decimals?: number;
619632
}
620633

634+
/**
635+
* @public
636+
* @enum
637+
*/
638+
export const ExecutionStatus = {
639+
FAILED: "FAILED",
640+
SUCCEEDED: "SUCCEEDED",
641+
} as const;
642+
643+
/**
644+
* @public
645+
*/
646+
export type ExecutionStatus = (typeof ExecutionStatus)[keyof typeof ExecutionStatus];
647+
621648
/**
622649
* @public
623650
*/
@@ -825,9 +852,26 @@ export interface Transaction {
825852

826853
/**
827854
* @public
855+
* @deprecated
856+
*
828857
* <p>The status of the transaction.</p>
829-
*/
830-
status: QueryTransactionStatus | undefined;
858+
* <important>
859+
* <p>This property is deprecated. You must use the <code>confirmationStatus</code>
860+
* and the <code>executionStatus</code> properties to determine if the <code>status</code>
861+
* of the transaction is <code>FINAL</code> or <code>FAILED</code>.</p>
862+
* <ul>
863+
* <li>
864+
* <p>Transactions with a <code>status</code> of <code>FINAL</code> will now have the <code>confirmationStatus</code> set
865+
* to <code>FINAL</code> and the <code>executionStatus</code> set to <code>SUCCEEDED</code>.</p>
866+
* </li>
867+
* <li>
868+
* <p>Transactions with a <code>status</code> of <code>FAILED</code> will now have the <code>confirmationStatus</code> set
869+
* to <code>FINAL</code> and the <code>executionStatus</code> set to <code>FAILED</code>.</p>
870+
* </li>
871+
* </ul>
872+
* </important>
873+
*/
874+
status?: QueryTransactionStatus;
831875

832876
/**
833877
* @public
@@ -895,6 +939,18 @@ export interface Transaction {
895939
* <p>The unique identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.</p>
896940
*/
897941
transactionId?: string;
942+
943+
/**
944+
* @public
945+
* <p>Specifies whether the transaction has reached Finality.</p>
946+
*/
947+
confirmationStatus?: ConfirmationStatus;
948+
949+
/**
950+
* @public
951+
* <p>Identifies whether the transaction has succeeded or failed.</p>
952+
*/
953+
executionStatus?: ExecutionStatus;
898954
}
899955

900956
/**

clients/client-managedblockchain-query/src/protocols/Aws_restJson1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,9 +1028,11 @@ const de_Transaction = (output: any, context: __SerdeContext): Transaction => {
10281028
return take(output, {
10291029
blockHash: __expectString,
10301030
blockNumber: __expectString,
1031+
confirmationStatus: __expectString,
10311032
contractAddress: __expectString,
10321033
cumulativeGasUsed: __expectString,
10331034
effectiveGasPrice: __expectString,
1035+
executionStatus: __expectString,
10341036
from: __expectString,
10351037
gasUsed: __expectString,
10361038
network: __expectString,

0 commit comments

Comments
 (0)