In this paper, a blockchain-based secure data sharing mechanism is proposed for Vehicular Networks (VNs). Edge service providers are introduced along with ordinary nodes to efficiently manage service provisioning. The edge service providers are placed in the neighborhood of the ordinary nodes to ensure smooth communication between them. The huge amount of data generated by smart vehicles is stored in a distributed file storage system, known as Interplanetary File System (IPFS). It is used to tackle the issues related to data storage in centralized architectures, such as data tampering, lack of privacy, vulnerability to hackers, etc. Monetary incentives are given to edge vehicle nodes to motivate them for accurate and timely service provisioning to ordinary nodes. In response, ordinary nodes give reviews to the edge nodes against the services provided by them, which are further stored in a blockchain to ensure integrity, security and transparency. Smart contracts are used to automate the system processes without the inclusion of an intermediate party and to check the reviews given to the edge nodes. To optimize gas consumption and to enhance the system performance, a Proof of Authority (PoA) consensus mechanism is used to validate the transactions. Moreover, a caching system is introduced at the edge nodes to store frequently used services. Furthermore, both security and privacy are enhanced in the proposed system by incorporating a symmetric key cryptographic mechanism. A trust management mechanism is also proposed in this work to calculate the nodes’ reputation values based upon their trust values. These values determine the authenticity of the nodes involved in the network. Eventually, it is concluded from the simulation results that the proposed system is efficient for VNs.