def METHOD_NAME(
    w3: Web3,
    session: Session,
    from_block: Optional[int],
    to_block: Optional[int],
    synchronize: bool,
    batch_size: int,
    respect_state: bool,
    sleep_time: int,
):
    """
    Runs crawler in ascending order
    """
    moonstream_data_store = MoonstreamDataStore(session)
    contract_deployment_crawler = ContractDeploymentCrawler(w3, moonstream_data_store)
    if respect_state:
        from_block = moonstream_data_store.get_last_labeled_block_number() + 1
        logger.info(f"Respecting state, starting from block {from_block}")
    if from_block is None:
        from_block = moonstream_data_store.get_first_block_number()
        logger.info(f"Starting block set to : {from_block}")
    if to_block is None:
        to_block = moonstream_data_store.get_last_block_number()
        logger.info(f"Ending block set to : {to_block}")
    assert (
        from_block <= to_block
    ), "from_block must be less than or equal to to_block in asc order, used --order desc"
    logger.info(f"Starting crawling from block {from_block} to block {to_block}")
    contract_deployment_crawler.crawl(
        from_block=from_block,
        to_block=to_block,
        batch_size=batch_size,
    )
    if synchronize:
        last_crawled_block = to_block
        while True:
            contract_deployment_crawler.crawl(
                from_block=last_crawled_block + 1,
                to_block=None,  # to_block will be set to last_crawled_block
                batch_size=batch_size,
            )
            time.sleep(sleep_time)