Tuesday, April 5, 2022

How are smart contracts related to blockchain?

  1. Common Ether transfers between human users and users

These are common transactions in the network, similar to Bitcoin transactions. If you send ether directly to a friend, the "Data" item will be left blank.

  1. Ether transfers without receiver

When making a transaction without a recipient, this means that the purpose of the transaction is to create a smart contract in the network with the contents of the "data" item. The Data item contains software code that behaves like any other user on the network.

  1. Ether transfers between users and smart contracts

Whenever a user (or smart contract) wants to execute a smart contract, he/she/it needs to make a transaction with the smart contract, placing the execution instruction in the "data" item.

Just like on other blockchains, whenever any of the above three events occurs, it is published throughout the network and everyone records it. In addition to recording, each node also executes the smart contract that received the instructions to synchronize the state of the Ethereum virtual machine with the rest of the network.

Each node executes part of the software, thus making the entire network act as a huge (but slow) distributed computer. After that, each execution will be stored on the blockchain, thus achieving the purpose of permanent storage

https://preview.redd.it/hhubl66hmtr81.jpg?width=1277&format=pjpg&auto=webp&s=c44e936d57d59a222f493829e64230a80c9c2c1a


No comments:

Post a Comment