Research Article

Evolution Process and Supply Chain Adaptation of Smart Contracts in Blockchain

Algorithm 3

The subcontract management process of the semipublic chain.
pragma solidity ^0.4.11;
contract semiPublicControl {
//Set up new address of Subcontract, only the Commander has authority
function setSubcontract Address(address_address) external onlyCommander {
 Subcontract = Subcontract Interface(_address);}//Set up new address of Contract, only the Commander has authority
function setNewcontract Address(address addressnew) external onlyCommander {address Newcontract = addressnew;}}