A smart contract for Car Insurance (solidity)
2 min read
👋 Hello world! This is Santhosh Reddy and I'm back again with a solidity smart contract project. The theme of the smart contract is, a car insurance contract between the insurer and the insureds.
This smart contract created with Solidity is a sample that depicts how the Insurance industry gets distrubted with a futuristic technology - Blockchain. Blockchain can remove the paper work, human errors and the security holes in an insurance supply chain.
Reading the smart contract code helps new blockchain learners as this covers all the important concepts like structs, mappings, events, enums, modifiers, functions, payable functions etc...
Here is the solidity code of the smart contract...
The only concern in this smart contract is, it requires looping in few functions which is a very bad practice. But, I don't have another option. If you have any suggestions for this, feel free to comment :)
Finally I completed my second Solidity smart contract project 🙃. Checkout my first one here.
If any blockchain learner reading this article, I hope reading this code helps you understand the smart contract coding.
Liked this post? Then, please consider reacting to the post and comment your opinions or bugs if you find them. Follow me for my latest project updates.
Thanks for reading and for now, taking a leave!