Contract
0x0A209545bb10bC2F78713a2699795ECfEa76762D
1
Contract Overview
Balance:
0 Ether
More Info
My Name Tag:
Not Available
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xF6b0Ceb5e3f25b6FBecf8186F8A68B4E42A96a17
Contract Name:
ManagerProxy
Compiler Version
v0.4.18+commit.9cf6e910
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-04-27 */ pragma solidity 0.4.18; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; Unpause(); } } contract IController is Pausable { event SetContractInfo(bytes32 id, address contractAddress, bytes20 gitCommitHash); function setContractInfo(bytes32 _id, address _contractAddress, bytes20 _gitCommitHash) external; function updateController(bytes32 _id, address _controller) external; function getContract(bytes32 _id) public view returns (address); } contract IManager { event SetController(address controller); event ParameterUpdate(string param); function setController(address _controller) external; } contract Manager is IManager { // Controller that contract is registered with IController public controller; // Check if sender is controller modifier onlyController() { require(msg.sender == address(controller)); _; } // Check if sender is controller owner modifier onlyControllerOwner() { require(msg.sender == controller.owner()); _; } // Check if controller is not paused modifier whenSystemNotPaused() { require(!controller.paused()); _; } // Check if controller is paused modifier whenSystemPaused() { require(controller.paused()); _; } function Manager(address _controller) public { controller = IController(_controller); } /* * @dev Set controller. Only callable by current controller * @param _controller Controller contract address */ function setController(address _controller) external onlyController { controller = IController(_controller); SetController(_controller); } } /** * @title ManagerProxyTarget * @dev The base contract that target contracts used by a proxy contract should inherit from * Note: Both the target contract and the proxy contract (implemented as ManagerProxy) MUST inherit from ManagerProxyTarget in order to guarantee * that both contracts have the same storage layout. Differing storage layouts in a proxy contract and target contract can * potentially break the delegate proxy upgradeability mechanism */ contract ManagerProxyTarget is Manager { // Used to look up target contract address in controller's registry bytes32 public targetContractId; } /** * @title ManagerProxy * @dev A proxy contract that uses delegatecall to execute function calls on a target contract using its own storage context. * The target contract is a Manager contract that is registered with the Controller. * Note: Both this proxy contract and its target contract MUST inherit from ManagerProxyTarget in order to guarantee * that both contracts have the same storage layout. Differing storage layouts in a proxy contract and target contract can * potentially break the delegate proxy upgradeability mechanism */ contract ManagerProxy is ManagerProxyTarget { /** * @dev ManagerProxy constructor. Invokes constructor of base Manager contract with provided Controller address. * Also, sets the contract ID of the target contract that function calls will be executed on. * @param _controller Address of Controller that this contract will be registered with * @param _targetContractId contract ID of the target contract */ function ManagerProxy(address _controller, bytes32 _targetContractId) public Manager(_controller) { targetContractId = _targetContractId; } /** * @dev Uses delegatecall to execute function calls on this proxy contract's target contract using its own storage context. * This fallback function will look up the address of the target contract using the Controller and the target contract ID. * It will then use the calldata for a function call as the data payload for a delegatecall on the target contract. The return value * of the executed function call will also be returned */ function() public payable { address target = controller.getContract(targetContractId); // Target contract must be registered require(target > 0); assembly { // Solidity keeps a free memory pointer at position 0x40 in memory let freeMemoryPtrPosition := 0x40 // Load the free memory pointer let calldataMemoryOffset := mload(freeMemoryPtrPosition) // Update free memory pointer to after memory space we reserve for calldata mstore(freeMemoryPtrPosition, add(calldataMemoryOffset, calldatasize)) // Copy calldata (method signature and params of the call) to memory calldatacopy(calldataMemoryOffset, 0x0, calldatasize) // Call method on target contract using calldata which is loaded into memory let ret := delegatecall(gas, target, calldataMemoryOffset, calldatasize, 0, 0) // Load the free memory pointer let returndataMemoryOffset := mload(freeMemoryPtrPosition) // Update free memory pointer to after memory space we reserve for returndata mstore(freeMemoryPtrPosition, add(returndataMemoryOffset, returndatasize)) // Copy returndata (result of the method invoked by the delegatecall) to memory returndatacopy(returndataMemoryOffset, 0x0, returndatasize) switch ret case 0 { // Method call failed - revert // Return any error message stored in mem[returndataMemoryOffset..(returndataMemoryOffset + returndatasize)] revert(returndataMemoryOffset, returndatasize) } default { // Return result of method call stored in mem[returndataMemoryOffset..(returndataMemoryOffset + returndatasize)] return(returndataMemoryOffset, returndatasize) } } } }
[{"constant":true,"inputs":[],"name":"targetContractId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_controller","type":"address"},{"name":"_targetContractId","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"controller","type":"address"}],"name":"SetController","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"param","type":"string"}],"name":"ParameterUpdate","type":"event"}]
Contract Creation Code
6060604052341561000f57600080fd5b6040516040806102c1833981016040528080519190602001805160008054600160a060020a03909516600160a060020a03199095169490941790935550506001556102628061005f6000396000f3006060604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166351720b41811461012957806392eefe9b1461014e578063f77c47911461016f575b60008054600154600160a060020a039091169063e16c7d989083604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281526004810191909152602401602060405180830381600087803b15156100c657600080fd5b6102c65a03f115156100d757600080fd5b50505060405180519150506000600160a060020a038216116100f857600080fd5b60408051368101825236600082376000803683865af482513d810184523d6000823e818015610125573d82f35b3d82fd5b341561013457600080fd5b61013c61019e565b60405190815260200160405180910390f35b341561015957600080fd5b61016d600160a060020a03600435166101a4565b005b341561017a57600080fd5b610182610227565b604051600160a060020a03909116815260200160405180910390f35b60015481565b60005433600160a060020a039081169116146101bf57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790557f4ff638452bbf33c012645d18ae6f05515ff5f2d1dfb0cece8cbf018c60903f7081604051600160a060020a03909116815260200160405180910390a150565b600054600160a060020a0316815600a165627a7a72305820124f651658a5f5fea0e2a5b75d6857f1a7e689d9ceab610dd59cf0a3000a19be002900000000000000000000000037dc71366ec655093b9930bc816e16e6b587f968fc6f6f33d2bb065ac61cbdd4dbe4b7adf6f3e7e6c6a3d1fe297cbf9a187092e4
Swarm Source
bzzr://124f651658a5f5fea0e2a5b75d6857f1a7e689d9ceab610dd59cf0a3000a19be
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.