div#pop_ad { opacity: 0; }


contract StorageStructure {address public implementation;address public owner;mapping (address = uint) internal points;uint internal totalPlayers;}contract ImplementationV1 is StorageStructure {modifier onlyOwner() {require (msg.sender == owner);_;}function addPlayer(address _player, uint _points)public onlyOwner{require (points[_player] == 0);points[_player] = _points;}function setPoints(address _player, uint _points)public onlyOwner{require (points[_player] != 0);points[_player] = _points;}}contract Proxy is StorageStructure {modifier onlyOwner() {require (msg.sender == owner);_;}/*** @dev constructor that sets the owner address*/constructor() public {owner = msg.sender;}/*** @dev Upgrades the implementation address* @param _newImplementation address of the new implementation*/function upgradeTo(address _newImplementation)external onlyOwner{require(implementation != _newImplementation);_setImplementation(_newImplementation);}/*** @dev Fallback function allowing to perform a delegatecall* to the given implementation. This function will return* whatever the implementation call returns*/function () payable public {address impl = implementation;require(impl != address(0));assembly {let ptr := mload(0x40)calldatacopy(ptr, 0, calldatasize)let result := delegatecall(gas, impl, ptr, calldatasize, 0, 0)let size := returndatasizereturndatacopy(ptr, 0, size)switch resultcase 0 { revert(ptr, size) }default { return(ptr, size) }}}/*** @dev Sets the address of the current implementation* @param _newImp address of the new implementation*/function _setImplementation(address _newImp) internal {implementation = _newImp;}}contract ImplementationV2 is ImplementationV1 {function addPlayer(address _player, uint _points)public onlyOwner{require (points[_player] == 0);points[_player] = _points;totalPlayers++;}}contract UnstructuredProxy {// Storage position of the address of the current implementationbytes32 private constant implementationPosition =keccak256("org.govblocks.implementation.address");// Storage position of the owner of the contractbytes32 private constant proxyOwnerPosition =keccak256("org.govblocks.proxy.owner");/*** @dev Throws if called by any account other than the owner.*/modifier onlyProxyOwner() {require (msg.sender == proxyOwner());_;}/*** @dev the constructor sets owner*/constructor() public {_setUpgradeabilityOwner(msg.sender);}/*** @dev Allows the current owner to transfer ownership* @param _newOwner The address to transfer ownership to*/function transferProxyOwnership(address _newOwner)public onlyProxyOwner{require(_newOwner != address(0));_setUpgradeabilityOwner(_newOwner);}/*** @dev Allows the proxy owner to upgrade the implementation* @param _implementation address of the new implementation*/function upgradeTo(address _implementation)public onlyProxyOwner{_upgradeTo(_implementation);}/*** @dev Tells the address of the current implementation* @return address of the current implementation*/function implementation() public view returns (address impl) {bytes32 position = implementationPosition;assembly {impl := sload(position)}}/*** @dev Tells the address of the owner* @return the address of the owner*/function proxyOwner() public view returns (address owner) {bytes32 position = proxyOwnerPosition;assembly {owner := sload(position)}}/*** @dev Sets the address of the current implementation* @param _newImplementation address of the new implementation*/function _setImplementation(address _newImplementation)internal{bytes32 position = implementationPosition;assembly {sstore(position, _newImplementation)}}/*** @dev Upgrades the implementation address* @param _newImplementation address of the new implementation*/function _upgradeTo(address _newImplementation) internal {address currentImplementation = implementation();require(currentImplementation != _newImplementation);_setImplementation(_newImplementation);}/*** @dev Sets the address of the owner*/function _setUpgradeabilityOwner(address _newProxyOwner)internal{bytes32 position = proxyOwnerPosition;assembly {sstore(position, _newProxyOwner)}}}contract ImplementationV1 {address public owner;mapping (address = uint) internal points;modifier onlyOwner() {require (msg.sender == owner);_;}function initOwner() external {require (owner == address(0));owner = msg.sender;}function addPlayer(address _player, uint _points)public onlyOwner{require (points[_player] == 0);points[_player] = _points;}function setPoints(address _player, uint _points)public onlyOwner{require (points[_player] != 0);points[_player] = _points;}}contract ImplementationV2 is ImplementationV1 {uint public totalPlayers;function addPlayer(address _player, uint _points)public onlyOwner{require (points[_player] == 0);points[_player] = _points;totalPlayers++;}}
添加新手交流群:币种分析、每日早晚盘分析
添加助理微信,一对一亲自指导:YoYo8abc