Skip to content

Instantly share code, notes, and snippets.

View WizardWatt's full-sized avatar

Dhruthi G P WizardWatt

View GitHub Profile
@WizardWatt
WizardWatt / .deps...npm....resolution-index.json
Created April 28, 2026 13:49
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.34+commit.80d5c536.js&optimize=undefined&runs=200&gist=
{
"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