Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

fix: add compute units to jsonrpc parser #27466

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web3.js/src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,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;
Comment on lines +870 to +871
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed a spot from #27065, @jstarry?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup it was missed but recently added in #27068, this addition just broke master unfortunately. In the future let's keep unrelated changes out of PR's

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha. Scroll down, @steveluscher. Sorry about that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no worries! Merge conflicts happen, and it was originally my fault for missing that field :)

/** The compute units consumed after processing the transaction */
computeUnitsConsumed?: number | null;
/** The error result of transaction processing */
err: TransactionError | null;
};
Expand Down Expand Up @@ -1848,6 +1852,7 @@ const ConfirmedTransactionMetaResult = pick({
preTokenBalances: optional(nullable(array(TokenBalanceResult))),
postTokenBalances: optional(nullable(array(TokenBalanceResult))),
loadedAddresses: optional(LoadedAddressesResult),
computeUnitsConsumed: optional(number()),
});

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

/**
Expand Down