pragma solidity ^0.5.0; contract MySuperContract1 { address private owner ; address[] private opers; constructor() public { owner = msg.sender; } function TryAddOper(address operAddress)public returns (bool) { if(IsUserCanChange(msg.sender)){ AddOper(operAddress); return true; } else{ return false; } } function IsUserCanChange(address user) public view returns(bool canCHange) { canCHange = false; if (user == owner) canCHange = true; for (uint i = 0; i < opers.length ; i++ ){ if (opers[i] == user) {canCHange = true;} } return canCHange; } function AddOper(address oper) private { opers.push(oper); } }
0.5.12