The increasing devices and their demand for network force the IoT network for smart grids to face the great challenges in privacy, security, trust, etc. In this paper, we apply blockchain to IoT communication network supported by WiFi. We first analyze the benefit that can be obtained by utilizing blockchain. And Secondly, we propose a blockchain enabled IoT network architure, within which, WAPI is applied as the authentication standard while blockchain is used as the trust guarantee mechanism. Thridly, we analyze how to guarantee the security, privacy, resource management within the proposed architecture. Finally, we conclude our work.