Reputation: 61
I'm new in the world of Blockchain and I keep reading so many concepts.
The smart contract goes before the transaction, but contains the same information?
Thank you.
Upvotes: 3
Views: 2288
Reputation: 1336
A Blockchain transaction can be defined as a small unit of task that is stored in public records. These records also knows as blocks. These blocks are executed, implemented and stored in blockchain only after the validation by all persons involved in the blockchain network
Transaction is the way the external world interacting with the Ethereum network. Transaction is used when we wish to modify or update the state stored in the Ethereum network.
A smart contract is a software program that adds layers of information onto digital transactions being executed on a blockchain. It allows for more complex transactions than simply exchanging digital tokens for a product or service. In other words, it's exactly what it sounds like: a contract, or an agreement between parties involved in a transaction that holds each party responsible (buyer vs. seller, for example) for their role.
Contract is the “smart contract” capability in Ethereum network, where the business logic is implemented. The contract begins as a human-understandable coding language (Solidity is the most common one in Ethereum). This code is compiled into machine-understandable code, called bytecode, which is to be deployed on an Ethereum network. Inside the contract code there are functions. These functions define the actual business logic, and will be called and executed once “invoked” after the contract is deployed.
More info here:
https://medium.com/@kctheservant/transactions-in-ethereum-e85a73068f74
https://datafloq.com/read/what-is-blockchain-transactions-smart-contracts/2449
Upvotes: 4