With the widespread adoption of Internet of Things (IoT) technology, a large amount of private data has been generated. Due to the limited computing and storage resources of IoT devices, enterprises and individuals choose to use a cloud storage provider (CSP) to manage their data. However, they lose the actual control of the data, and hence users need to verify the integrity of the data in the cloud. As a result, reducing the computational overhead of integrity auditing tasks for massive amounts of data and optimizing the distribution of benefits among the participants have become the key to the healthy development of IoT technologies. This paper proposes an integrity auditing method based on smart contracts. First, we construct a noninteractive auditing model based on a chaotic system so that the third-party auditor (TPA) can complete the auditing task without challenging the CSP. Second, we proposed a new construction method for audit trees that can quickly generate the verification tag of the root node. Finally, we design a smart contract-based auditing algorithm on the blockchain, which can simultaneously verify the behaviour of the CSP and the TPA to achieve fair payments. The theoretical analysis shows that our scheme can effectively prevent the TPA from falsifying audit results and prevent collusion between the TPA and the CSP. The experimental results show that our scheme has higher audit efficiency.