What is a Smart Contract?
Simply said, a "smart contract" is software that runs on Ethereum's blockchain. It's a collection of code (its functions) and data (its state) that lives on the Ethereum blockchain at a single address.
Ethereum accounts come in the form of smart contracts. This indicates that they have a balance and can send transactions across the network. They are not, however, controlled by a user; instead, they are deployed to the network and run according to a set of instructions. User accounts can then engage with a smart contract by sending transactions that cause the smart contract to perform a function. Smart contracts, like conventional contracts, can set rules and have them enforced automatically through programming. Smart contracts can't be deleted by default, and their interactions are permanent.
REQUIREMENTS
Make sure you've read up on accounts, transactions, and the Ethereum virtual machine before jumping into the world of smart contracts.
POINTS ABOUT SMART CONTRACT
Anyone can write a smart contract and deploy it to the network. You just need to learn how to code in a smart contract language and have enough ETH to deploy your contract. Deploying a smart contract is technically a transaction, so you need to pay your Gas in the same way that you need to pay gas for a simple ETH transfer. Gas costs for contract deployment are far higher. However, Ethereum has developer-friendly languages for writing smart contracts:
Solidity
Vyper
Limitations
Smart contracts alone cannot get information about "real-world" events because they can't send HTTP requests. This is by design. Relying on external information could jeopardize consensus, which is important for security and decentralization. There are ways to get around this using oracles.
Another limitation of smart contracts is the maximum contract size. A smart contract can be a maximum of 24KB or it will run out of gas. This can be circumnavigated by using The Diamond Pattern.
SMART CONTRACT RESOURCES
>openzeppelin.com/contracts/
>GitHub
Community Forum
DappSys - Safe, simple, flexible building blocks for smart contracts.