Hawk’s Network Smart Contract

Hawk Network
2 min readAug 30, 2019

--

Hawk Network’s smart contracts include transaction processing and storage mechanisms, as well as a complete state machine for accepting and processing various smart contracts, transaction storage and state processing are done on the blockchain.

Transactions mainly contain data that needs to be sent and the descriptions of said data are referred to as events. After the transaction and event information is passed to the smart contract, the resource status in the contract resource set will be updated, triggering the smart contract to perform state machine judgment. If the trigger condition of one or more actions in the automatic state machine is satisfied, the contract is automatically executed by the state machine according to the preset information.

According to the trigger condition contained in the event description information, the smart contract system automatically sends out preset data resources and events including trigger conditions from the smart contract when the trigger condition is satisfied.

The core of the entire smart contract system is that all the transactions and events handled by the smart contract are still exported as transactions and events. The smart contract is just a system of transaction modules and state machines. It does not generate smart contracts, nor does it modify smart contracts, it only exists to a set of complex digital promises with triggering conditions that can be properly implemented according to the participants' will.

Smart contract construction and execution

  1. Multiple users participate in formulating a smart contract.
  2. The contract is spread through the P2P network and stored on the blockchain.
  3. Smart contracts embedded within the blockchain are automatically executed.

The following steps describe in detail the process of phase 1 “Multi-User Participation in Formulating a Smart Contract”

  • The user must first register on the blockchain. The blockchain returns a pair of public and private keys to the user, the public key is used as the account’s address within the blockchain, and the private key is the only way to manage the account.
  • Two or more parties, based on need, agree on a contract that includes the rights and obligations of both parties, these rights and obligations are programmed in machine language. The contract is signed by both parties with their private key to ensure the validity of the contract.
  • The signed smart contract will be transmitted to the blockchain network along with its content.

Important links:

Website - hawk.cool

Telegram group — t.me/HawkGlobalGroup

Twitter — Twitter.com/hawk_HKC

--

--