/Hotel-booking-smart-contract

Hotel booking simple smart contract

Primary LanguageSolidity

Hotel Booking Smart Contract

A very simple smart contract for booking a hostel room. A smart contract is essentially a transaction protocol which is intended to automatically execute, control or document legally relevant events and actions according to the terms of a contract or an agreement coded. In other words, they are simply programs stored on a blockchain that run when predetermined conditions are met.

The smart contract books a room, after verifying whether a room is occupied or vacant. It also checks whether the required amount is payed or not for booking a room.