RPC Method eth_getBlockByNumber implementation

  • Parameters

    • thorClient: ThorClient

      The thor client instance to use.

    • params: unknown[]

      The standard array of rpc call parameters. * params[0]: The block number to get as a hex string or "latest" or "finalized". * params[1]: The transaction detail flag. If true, the block will contain the transaction details, otherwise it will only contain the transaction hashes.

    Returns Promise<BlocksRPC>

    the block at the given block number formatted to the RPC standard or null if the block does not exist.