Files
FrenoCorp/node_modules/viem/zksync/actions/getRawBlockTransactions.ts
Michael Freno 7c684a42cc FRE-600: Fix code review blockers
- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-25 00:08:01 -04:00

28 lines
1.2 KiB
TypeScript

import type { Client } from '../../clients/createClient.js'
import type { Transport } from '../../clients/transports/createTransport.js'
import type { Account } from '../../types/account.js'
import type { Chain } from '../../types/chain.js'
import type { ZksyncNumberParameter } from '../types/block.js'
import type { PublicZksyncRpcSchema } from '../types/eip1193.js'
import type { ZksyncRawBlockTransactions } from '../types/transaction.js'
import { camelCaseKeys } from '../utils/camelCaseKeys.js'
export type GetRawBlockTransactionsParameters = ZksyncNumberParameter
export type GetRawBlockTransactionsReturnType = ZksyncRawBlockTransactions
/* @deprecated Use `debug_getRawTransaction` and `debug_getRawTransactions` instead. */
export async function getRawBlockTransactions<
chain extends Chain | undefined,
account extends Account | undefined,
>(
client: Client<Transport, chain, account, PublicZksyncRpcSchema>,
parameters: GetRawBlockTransactionsParameters,
): Promise<GetRawBlockTransactionsReturnType> {
const result = await client.request({
method: 'zks_getRawBlockTransactions',
params: [parameters.number],
})
return camelCaseKeys(result) as GetRawBlockTransactionsReturnType
}