github.com/SmartMeshFoundation/Spectrum@v0.0.0-20220621030607-452a266fee1e/contracts/chief/src/chiefbaseowner_alpha.sol (about)

     1  pragma solidity >=0.5.0 <=0.5.3;
     2  
     3  contract ChiefBaseInterface{
     4      function pocChangeOwner(address newOwner, uint256 num)   public;
     5  
     6  }
     7  /*
     8  该合约有两个主要功能:
     9  1. 依据规则增减常委会节点
    10  2. 辅助下一个版本硬分叉升级Chief合约,到时候我们希望只升级Chief,以及ChiefBase合约,但是不升级poc合约.
    11  */
    12  contract ChiefBaseOwner {
    13      ChiefBaseInterface base;
    14      constructor(address chiefBase) public {
    15          base=chiefBase;
    16      }
    17      function UpgradeToNewChiefVersion( address newChiefBase,uint256 num) public{
    18          //msg.sender保证不存在,这样在硬分叉的指定块强制调用这个合约.
    19          require(msg.sender==address(0xffffffffffffffffffffffffffffffffffffffff));
    20          base.pocChangeOwner(newChiefBase,num);
    21          base=newChiefBase;
    22      }
    23  }