vishavsingla / Anti-Corrupto

This project leverages cutting-edge technologies like blockchain and machine learning to build trust and combat corruption in government systems. Secure Land Registry: Eliminates fraud with tamper-proof land ownership records. Automated Traffic & Challan System (using edge computing): Ensures transparency in traffic enforcement and reduces bribery
4 stars 6 forks source link

Improving security and gas efficiency of the smart contracts. #51

Open Vedantjn opened 2 months ago

Vedantjn commented 2 months ago

I made these changes in the smart contracts:

ChallanManagement.sol: 1). Replaced assembly parsing with a more gas-efficient method. 2). Used block.timestamp for issue dates instead of block.number. 3). Added visibility specifiers for all functions.

LandRegistry.sol: 1). Replaced assembly parsing with a more gas-efficient method. 2). Added checks to ensure land is registered before transferring. 3). Added visibility specifiers for all functions.

VehicleManagement.sol: 1). Replaced assembly parsing with a more gas-efficient method. 2). Added visibility specifiers for all functions.