As a promising wireless network virtualization technology, virtualized base station (BS) has been proposed to tackle the problem of low-efficient utilization of BS's computing resources, e.g., baseband processing units (BPU). In this paper, we design a novel scheme to achieve the efficient BPU allocation based on a contract-theoretic approach. To achieve this, we consider the BPUs as a kind of trading resources. We establish a monopoly market, where the infrastructure provider (InP) is the monopolist owning all the BPUs, and multiple mobile network operators (MNOs) intend to rent BPUs from the InP for processing their baseband signals. In such a market, the InP offers a set of quantity-price contract items to the MNOs based on statistical information of their types, and at the same time, the MNOs are stimulated to accept the offers for the purpose of making profit. We propose the optimal contract design to maximize the InP's profit, as well as develop an incentive mechanism to guarantee each MNO choosing a proper contract item. Numerical results validate the effectiveness of our incentive mechanism for BPU resource allocation.