How do Bitcoin smart contracts work?
In general, Smart contracts implement a series of digital conditions, and their fulfillment includes the realization of transactions between the parties. Smart contracts are digitally signed and there are no paper or written documents in between. The only determinant in smart contracts is the condition that executes according to a code programmed in Blockchain-based on if, then foundations.
In Ethereum Blockchain, each smart contract has the task of performing transactions and operations on the block. Any intelligent contract is controlled in decentralized systems, and addresses that do not execute on the Blockchain are also known as EOAs and are managed by the users themselves.
Each Smart contract divides into three entities. A contract code and two public keys. The first public key determines the sender of the contract and the second public key determines its contract. The second key is generally a fixed identifier that indicates the nature of the contract.
Any intelligent contract is controlled in decentralized systems and addresses that do not execute on the Blockchain.