pragma solidity ^0.4.19; contract SetNeed { //地址不能是0 modifier NeedNot0(address _InputAllAdd) {require(_InputAllAdd != 0x0); _;} //if (newOwner != address(0)) //再聲明多一次為地址比較好? address(0) //地址不能是自己 modifier CanNotIsMe(address _InputAllAdd) {require(_InputAllAdd != msg.sender); _;} }
0.4.19