This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "VehicleRegistry.sol": { | |
| "__sources__": { | |
| "VehicleRegistry.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\ncontract VehicleRegistry {\r\n // Struct to represent a vehicle\r\n struct Vehicle {\r\n string vehicleId;\r\n address owner;\r\n string ownerName;\r\n bool exists;\r\n uint256 registrationDate;\r\n uint256 lastTransferDate;\r\n }\r\n\r\n // Mapping to store vehicles by vehicleId\r\n mapping(string => Vehicle) public vehicles;\r\n\r\n // Mapping to store ownership history\r\n mapping(string => address[]) public vehicleHistory;\r\n\r\n // Array to store all registered vehicle IDs\r\n string[] public registeredVehicles;\r\n\r\n // Events\r\n event VehicleRegistered(\r\n string indexed vehicleId,\r\n address indexed owner,\r\n string ownerName,\r\n uint256 timestamp\r\n );\r\n\r\n event OwnershipTransferred(\r\n string indexed vehicle |