Authors: Jaydeep Singh
Certificate: View Certificate
Smart contract is an automatic contract with the agreement between two parties, written into few lines of code. Agreements contained live across a distributed, decentralized blockchain network. Code controls the execution and transactions that are tractable and not changed . This are the digital contract stored in block chain and executes automatically when condition meets . IOT is network of physical devices that embedded with different sensors, software for exchanging data over internet .this are having advantages in all sectors including medical science, home automation, security etc. . Future is IOT and smart contract technology is bright in near future as all IOT has lot of applications with use of smart contract technology to maintain integrity of data .
Internet of things (IOT) is a concept that has physical object connected to the internet and able to identify each other with IP and MAC address. These components are embedded with wireless & sensor technology.
And with enough computational power to perform basis functionality of the object. Since IOT is highly heterogeneous security and network scalability are big challenges.
It is very important to builds a flexible architecture to contain and that called IOT due to different aspects. It could be for sense and react, gather data in real time or monitoring an environment object.
After all, the object should be connected to the internet for different work and share data with other object or to store data on cloud for post-processing. Briefly, the object consist of five layers: Business layer, Application Layer, Middleware Layer, Network layer and Perception Layer. Interaction, Sensing and further.
Smart contract technology has the ability to change and optimize the global infra of IOT system by removing central servers and provide peer to peer interaction between network peer. If this technology emerged correctly in IOT, it could provide robust solutions for many security issues and challenges.
Blockchain with smart contract infrastructure that is basically provide for securing IOT data. Blockchain is a decentralized, distributed, shared, immutable database ledger that uses the cryptography and SHA256 hashing algorithm for providing strong security. Smart contract is little code of lines that reside in blockchain to allow automation for multi-step process; it is user defined script that is self-executed on top of block chain.
To allow us to validate transaction between mutually distrusting peers without need of central server, smart contract is not a part of blockchain technology it is a whole separate layer uses the blockchain to perform and automate transaction between user and machines. Ethereum is utility software based on blockchain technology was introduced by researchers and programmers, Ethereum made it easier to build decentralized applications and solidity (the programming language used to write these contracts).
Smart contract is a gateway for all IOT devices in the network. The communication between these devices is mainly through smart contract that harmonize and automates transaction between the IOT devices. Smart contract uses blockchain as database to store and validate all the transaction by providing timestamped and validated ledger of information that is impractical to be manipulated and distributed between all members of the blockchain network.
Smart contract models are based on secured and immutable distributed ledgers; IOT devices on network can share data more securely across stakeholders, embed agreed-upon business terms to automate transactions, verify identification and authentication, and reduce costs by eliminating the intermediaries. The health of the IOT network is improved by letting devices register and validate themselves, automatically executing contracts, and reducing the threat of attack since there is no central system to be attacked.
A. Types of Smart Contract
There are three types of smart contracts
Table I Evolution of Smart Contract
II. ADVANTAGES AND DISADVANTAGES OF SMART CONTRACT
Smart contract is useful and positive at one place but has many disadvantages too. Table II shows the advantages and disadvantages of smart contract. 
Reliability and immutability.
Weak legal regulation.
Transparency of actions of smart contracts.
Highly depends on programmers and exposure to errors.
Automation of smart contracts.
Inability to adjust smart contracts work.
Cost reduction due to rejection from the chain of interposers.
Table II. Advantages and Disadvantages of Smart Contract
II. APPLICATIONS OF SMART CONTRACT WITH IOT
A. Food Industry
The food assiduity is looking to use blockchain and smart contracts to streamline the shipping and shadowing of food worldwide and IOT bias will be at the heart of their sweats. (9) A recent report by Coin-telegraph Consulting and VeChain mentions that blockchain and IOT can potentially break some of the food assiduity’s most burning challenges and save it$ 100 billion a time. Further than$ 300 billion worth. (9)
IOT detectors can shoot accurate information on food temperature for frozen particulars, for illustration, to the blockchain network, and this data can be anatomized and participated among stakeholders to insure the authenticity, newness, and quality of the food. Smart contracts gain further detail from IOT bias so that payments can be more accurate grounded on the Quality of the food delivered. Coupling IOT bias with blockchain and smart contracts can save the assiduity billions of bones a time. (9) Global companies similar as Walmart, Carrefour, and California Giant Berry Granges are formerly getting involved in the trouble. (9)
B. Smart Home
Smart IOT device plays a very imp role in our day-to-day lives, IOT blockchain enables the home security to be managed by mobile phone as traditional system is lacks in security Blockchain smart contract could elevate the smart home to next level by solving security issue and removing central infra. . Telstra an Australian telecommunication company and Media Company provide smart home solutions the company has implemented blockchain to ensure no one can manipulate data captured from IOT devices. 
C. Pharmacy Industry
The issue of fake medicines in the pharmaceutical sector is increasing every day. The pharmacy industry is responsible for developing drugs, distributing drugs therefore tracking drugs is very difficult .with the use of blockchain can helps in monitor shipment of drugs from its origin to destination. 
Mediledger is a blockchain IOT use case can track legal change, Mediledger is blockchain platform can helps in simplified payment processes, stopping fake drugs from invading supply chain smart contract can be used to take legal actions if anything happens in between. 
In the agriculture field, smart contracts have different executions than others in the form of helping farmer to insure their crops and claims damage with insurance company. Unpredicted weather anomalies make it difficult to correctly estimates and quick report the exact losses through setting up smart blockchain the damage claim can be triggered via changes to weather conditions. 
Demand’s for organic product is rising diurnal blockchain enables consumer to corroborate the journey of their products tracing it from ranch to table. 
E. Supply Chain Management
IOT device can be attached to the specific storage container or to raw material the IOT device will transmit location where the product is and that can be saved in the block chain network and validated by smart contract and that data can be passed to next sensor at different stage so data regarding package will not be tampered in between reducing the chance of human error and efforts.
F. Automotive Industry
By 2040 90 % of all new vehicles will be connected through IOT the Global IOT market is predicted to reach $541.73 billion by 2025 claims by globalnewswire.com. 
IOT sensor's on vehicles capture data of car and its surrounding and pass to nearby garage in case of problem in it but have lack of security to solving that issue blockchain with smart contract can be used to save the data of sensors permanently and right data can be send to the respective locations. So accidents can be avoided. .
Above mentioned, we have studied about Smart contracts and its various applications with IOT in the field of Agriculture, Smart Home, Pharmacy, Supply chain and Automobile. We acquired knowledge about ways how it can be helpful in near future as IOT is future. We also concluded how the use of smart contract with IOT can be beneficial in our day to day lives. The technology of smart contract with IOT still under exploration and development and is arising day by day. Many things have been developed lately using this technology. The main research findings afforded that smart contract when combined with IOT can help IOT devices to make more secure and reliable as IOT is future. As a new technology or tool in an early stage level due to several major social and technical challenges and that it goes along with the emerging information technology. In a nutshell, it can be said that Smart Contract when combined with IOT has a very bright and promising future in spite of having many problem to its success in the near future.
 Infographic: https://www.investopedia.com/terms/s/smart-contracts.asp  https://www.oracle.com/in/internet-of-things/what-is-iot/  https://policyreview.info/glossary/smart-contracts  https://blockhunters.io/smart-contracts-definition-pros-and-cons/  https://blog.simbachain.com/blog/types-of-smart-contracts  https://www.iotforall.com/how-are-iot-blockchain-revolutionizing-cars  https://www.simplilearn.com/leveraging-smart-contracts-for-iot-applications-article  https://www.startus-insights.com/innovators-guide/8-blockchain-startups-disrupting-the-agricultural-industry/  https://www.leewayhertz.com/blockchain-iot-use-cases-real-world-products/
Copyright © 2022 Jaydeep Singh. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.