Skip to content

Commit

Permalink
fix hex typing
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Apr 29, 2024
1 parent 1aa3bb3 commit cd23545
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/block/src/from-rpc.ts
Expand Up @@ -7,6 +7,7 @@ import { Block } from './index.js'

import type { BlockOptions, JsonRpcBlock } from './index.js'
import type { TypedTransaction } from '@ethereumjs/tx'
import type { PrefixedHexString } from '@ethereumjs/util'

function normalizeTxParams(_txParams: any) {
const txParams = Object.assign({}, _txParams)
Expand Down Expand Up @@ -55,7 +56,7 @@ export function blockFromRpc(
const uncleHeaders = uncles.map((uh) => blockHeaderFromRpc(uh, options))

const requests = blockParams.requests?.map((req) => {
const bytes = hexToBytes(req)
const bytes = hexToBytes(req as PrefixedHexString)
return new CLRequest(bytes[0], bytes.slice(1))
})
return Block.fromBlockData(
Expand Down
4 changes: 2 additions & 2 deletions packages/block/src/types.ts
Expand Up @@ -268,8 +268,8 @@ export interface JsonRpcBlock {
excessBlobGas?: PrefixedHexString | string // If EIP-4844 is enabled for this block, returns the excess blob gas for the block
parentBeaconBlockRoot?: PrefixedHexString | string // If EIP-4788 is enabled for this block, returns parent beacon block root
executionWitness?: VerkleExecutionWitness | null // If Verkle is enabled for this block
requestsRoot?: PrefixedHexString // If EIP-7685 is enabled for this block, returns the requests root
requests?: Array<PrefixedHexString> // If EIP-7685 is enabled for this block, array of serialized CL requests
requestsRoot?: PrefixedHexString | string // If EIP-7685 is enabled for this block, returns the requests root
requests?: Array<PrefixedHexString | string> // If EIP-7685 is enabled for this block, array of serialized CL requests
}

export type WithdrawalV1 = {
Expand Down

0 comments on commit cd23545

Please sign in to comment.