Introduction to Smart Contracts

First, we are talking about smart contracts in the context of the blockchain and encrypted currencies.

Smart contract: In the context of blockchains and cryptocur, the smart contract is:

  • Pre-written code logic(We use lua to write)
  • Distributed storage platform for storage and call(blockchain)
  • Allow to be executed by nodes running on the same blockchain.
  • The result will be traded for storage.

In short, the smart contract is an executable code.(It can be given a variety of functions by contract writers)It is compiled and then stored on the block chain. According to the address of the contract, the node on the blockchain can call it to achieve the relevant functions.