Skip to content

Commit

Permalink
fix: add rpc response to simulate transaction (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Sep 12, 2023
1 parent e09b513 commit 8ecb622
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/rpc-core/src/rpc-methods/simulateTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Base58EncodedBytes,
Base64EncodedDataResponse,
Commitment,
RpcResponse,
Slot,
U64UnsafeBeyond2Pow53Minus1,
} from './common';
Expand Down Expand Up @@ -73,7 +74,7 @@ type AccountsConfigWithBase64Encoding = Readonly<{
};
}>;

type SimulateTransactionApiResponseBase = Readonly<{
type SimulateTransactionApiResponseBase = RpcResponse<{
/** Error if transaction failed, null if transaction succeeded. */
err: TransactionError | null;
/** Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure) */
Expand All @@ -89,7 +90,7 @@ type SimulateTransactionApiResponseBase = Readonly<{
}> | null;
}>;

type SimulateTransactionApiResponseWithAccounts<T extends AccountInfoBase> = Readonly<{
type SimulateTransactionApiResponseWithAccounts<T extends AccountInfoBase> = RpcResponse<{
/** Array of accounts with the same length as the `accounts.addresses` array in the request */
accounts: (T | null)[];
}>;
Expand Down

0 comments on commit 8ecb622

Please sign in to comment.