Skip to content

Commit

Permalink
fix: add compute units to jsonrpc parser (#27466)
Browse files Browse the repository at this point in the history
add compute units to jsonrpc parser
  • Loading branch information
mschneider authored Sep 1, 2022
1 parent a6d737d commit b34cab4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web3.js/src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,10 @@ export type ConfirmedTransactionMeta = {
preTokenBalances?: Array<TokenBalance> | null;
/** The token balances of the transaction accounts after processing */
postTokenBalances?: Array<TokenBalance> | null;
/** The addresses of the accounts loaded for the transaction */
loadedAddresses?: LoadedAddresses | null;
/** The compute units consumed after processing the transaction */
computeUnitsConsumed?: number | null;
/** The error result of transaction processing */
err: TransactionError | null;
/** The collection of addresses loaded using address lookup tables */
Expand Down Expand Up @@ -1993,6 +1997,7 @@ const ConfirmedTransactionMetaResult = pick({
preTokenBalances: optional(nullable(array(TokenBalanceResult))),
postTokenBalances: optional(nullable(array(TokenBalanceResult))),
loadedAddresses: optional(LoadedAddressesResult),
computeUnitsConsumed: optional(number()),
});

/**
Expand All @@ -2017,6 +2022,7 @@ const ParsedConfirmedTransactionMetaResult = pick({
preTokenBalances: optional(nullable(array(TokenBalanceResult))),
postTokenBalances: optional(nullable(array(TokenBalanceResult))),
loadedAddresses: optional(LoadedAddressesResult),
computeUnitsConsumed: optional(number()),
});

const TransactionVersionStruct = union([literal(0), literal('legacy')]);
Expand Down

0 comments on commit b34cab4

Please sign in to comment.