As massive radio devices being employed in future 6G wireless networks, dynamic spectrum sharing based on cognitive radio and blockchain technologies presents an effective way to maximize spectrum utilization. However, ubiquitous, accurate and timely spectrum sensing is an important prerequisite for dynamic spectrum sharing. How to improve the accuracy and the participation enthusiasm of spectrum sensing are the key research issues. Furthermore, in the practical application of spectrum blockchain, the secure and credible guarantee mechanism of spectrum ledger and the incentive mechanism in spectrum sharing are prominent problems. In this paper, a smart contract-based distributed spectrum sensing scheme is proposed for blockchain-enabled spectrum sharing, which leverages the interaction between spectrum sensing and incentive mechanism for secondary users. In this way, secondary users under favorable channel condition are more likely being selected for spectrum sensing. The performance of mobile sensing is analyzed when performing spectrum sensing based on cycle detection algorithm. On the basis of spectrum sensing, a reputation-based incentive algorithm is employed in the smart contract, recording the spectrum sensing results and rewards so as to enhance the enthusiasm of secondary users and the security of sensing. Simulation shows that more sensing nodes can be employed with the same task budget, while the primary user detection probability can be increased by 19.6% when adopting the proposed scheme with sufficient budget. In addition, when the number of sensing nodes is the same, the proposed incentive method can ensure that the sensing nodes obtain a higher average rewards, which helps to enhance the enthusiasm of secondary users to participate in the spectrum sensing task.