Skip to content

Commit

Permalink
feat(client-managedblockchain-query): Adding Confirmation Status and …
Browse files Browse the repository at this point in the history
…Execution Status to GetTransaction Response.
  • Loading branch information
awstools committed Dec 20, 2023
1 parent 3633030 commit fc9a780
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface GetTransactionCommandOutput extends GetTransactionOutput, __Met
* // transactionTimestamp: new Date("TIMESTAMP"), // required
* // transactionIndex: Number("long"), // required
* // numberOfTransactions: Number("long"), // required
* // status: "STRING_VALUE", // required
* // status: "STRING_VALUE",
* // to: "STRING_VALUE", // required
* // from: "STRING_VALUE",
* // contractAddress: "STRING_VALUE",
Expand All @@ -75,6 +75,8 @@ export interface GetTransactionCommandOutput extends GetTransactionOutput, __Met
* // signatureS: "STRING_VALUE",
* // transactionFee: "STRING_VALUE",
* // transactionId: "STRING_VALUE",
* // confirmationStatus: "STRING_VALUE",
* // executionStatus: "STRING_VALUE",
* // },
* // };
*
Expand Down
62 changes: 59 additions & 3 deletions clients/client-managedblockchain-query/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export interface AssetContract {
/**
* @public
* <p>The container for the contract identifier containing its blockchain network
* and address.</p>
* and address.</p>
*/
contractIdentifier: ContractIdentifier | undefined;

Expand Down Expand Up @@ -570,6 +570,19 @@ export class ValidationException extends __BaseException {
}
}

/**
* @public
* @enum
*/
export const ConfirmationStatus = {
FINAL: "FINAL",
} as const;

/**
* @public
*/
export type ConfirmationStatus = (typeof ConfirmationStatus)[keyof typeof ConfirmationStatus];

/**
* @public
* <p>The contract or wallet address by which to filter the request.</p>
Expand Down Expand Up @@ -618,6 +631,20 @@ export interface ContractMetadata {
decimals?: number;
}

/**
* @public
* @enum
*/
export const ExecutionStatus = {
FAILED: "FAILED",
SUCCEEDED: "SUCCEEDED",
} as const;

/**
* @public
*/
export type ExecutionStatus = (typeof ExecutionStatus)[keyof typeof ExecutionStatus];

/**
* @public
*/
Expand Down Expand Up @@ -825,9 +852,26 @@ export interface Transaction {

/**
* @public
* @deprecated
*
* <p>The status of the transaction.</p>
*/
status: QueryTransactionStatus | undefined;
* <important>
* <p>This property is deprecated. You must use the <code>confirmationStatus</code>
* and the <code>executionStatus</code> properties to determine if the <code>status</code>
* of the transaction is <code>FINAL</code> or <code>FAILED</code>.</p>
* <ul>
* <li>
* <p>Transactions with a <code>status</code> of <code>FINAL</code> will now have the <code>confirmationStatus</code> set
* to <code>FINAL</code> and the <code>executionStatus</code> set to <code>SUCCEEDED</code>.</p>
* </li>
* <li>
* <p>Transactions with a <code>status</code> of <code>FAILED</code> will now have the <code>confirmationStatus</code> set
* to <code>FINAL</code> and the <code>executionStatus</code> set to <code>FAILED</code>.</p>
* </li>
* </ul>
* </important>
*/
status?: QueryTransactionStatus;

/**
* @public
Expand Down Expand Up @@ -895,6 +939,18 @@ export interface Transaction {
* <p>The unique identifier of the transaction. It is generated whenever a transaction is verified and added to the blockchain.</p>
*/
transactionId?: string;

/**
* @public
* <p>Specifies whether the transaction has reached Finality.</p>
*/
confirmationStatus?: ConfirmationStatus;

/**
* @public
* <p>Identifies whether the transaction has succeeded or failed.</p>
*/
executionStatus?: ExecutionStatus;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1028,9 +1028,11 @@ const de_Transaction = (output: any, context: __SerdeContext): Transaction => {
return take(output, {
blockHash: __expectString,
blockNumber: __expectString,
confirmationStatus: __expectString,
contractAddress: __expectString,
cumulativeGasUsed: __expectString,
effectiveGasPrice: __expectString,
executionStatus: __expectString,
from: __expectString,
gasUsed: __expectString,
network: __expectString,
Expand Down

0 comments on commit fc9a780

Please sign in to comment.