My Name Tag:
Not Available
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
Controller
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IController.sol"; import "./IManager.sol"; import "./zeppelin/Pausable.sol"; contract Controller is Pausable, IController { // Track information about a registered contract struct ContractInfo { address contractAddress; // Address of contract bytes20 gitCommitHash; // SHA1 hash of head Git commit during registration of this contract } // Track contract ids and contract info mapping(bytes32 => ContractInfo) private registry; constructor() { // Start system as paused paused = true; } /** * @notice Register contract id and mapped address * @param _id Contract id (keccak256 hash of contract name) * @param _contractAddress Contract address */ function setContractInfo( bytes32 _id, address _contractAddress, bytes20 _gitCommitHash ) external override onlyOwner { registry[_id].contractAddress = _contractAddress; registry[_id].gitCommitHash = _gitCommitHash; emit SetContractInfo(_id, _contractAddress, _gitCommitHash); } /** * @notice Update contract's controller * @param _id Contract id (keccak256 hash of contract name) * @param _controller Controller address */ function updateController(bytes32 _id, address _controller) external override onlyOwner { return IManager(registry[_id].contractAddress).setController(_controller); } /** * @notice Return contract info for a given contract id * @param _id Contract id (keccak256 hash of contract name) */ function getContractInfo(bytes32 _id) public view returns (address, bytes20) { return (registry[_id].contractAddress, registry[_id].gitCommitHash); } /** * @notice Get contract address for an id * @param _id Contract id */ function getContract(bytes32 _id) public view override returns (address) { return registry[_id].contractAddress; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./zeppelin/Pausable.sol"; abstract contract IController is Pausable { event SetContractInfo(bytes32 id, address contractAddress, bytes20 gitCommitHash); function setContractInfo( bytes32 _id, address _contractAddress, bytes20 _gitCommitHash ) external virtual; function updateController(bytes32 _id, address _controller) external virtual; function getContract(bytes32 _id) public view virtual returns (address); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; interface IManager { event SetController(address controller); event ParameterUpdate(string param); function setController(address _controller) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @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. */ constructor() { 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)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./Ownable.sol"; /** * @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; /** * @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() public onlyOwner whenNotPaused { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"bytes20","name":"gitCommitHash","type":"bytes20"}],"name":"SetContractInfo","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"getContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"getContractInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes20","name":"","type":"bytes20"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"bytes20","name":"_gitCommitHash","type":"bytes20"}],"name":"setContractInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"address","name":"_controller","type":"address"}],"name":"updateController","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506000805460ff60a01b1933166001600160a81b031990911617600160a01b179055610542806100416000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b14610134578063d737c2b01461015f578063e16c7d9814610172578063eb5dd94f1461019b578063f2fde38b146101ae57600080fd5b80633f4ba83a146100985780635c975abb146100a2578063613e2de2146100cb5780638456cb591461012c575b600080fd5b6100a06101c1565b005b6000546100b690600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b6101046100d936600461043c565b600090815260016020819052604090912080549101546001600160a01b039091169160609190911b90565b604080516001600160a01b0390931683526001600160601b03199091166020830152016100c2565b6100a0610224565b600054610147906001600160a01b031681565b6040516001600160a01b0390911681526020016100c2565b6100a061016d366004610471565b61028e565b61014761018036600461043c565b6000908152600160205260409020546001600160a01b031690565b6100a06101a93660046104be565b610330565b6100a06101bc3660046104ea565b6103b7565b6000546001600160a01b031633146101d857600080fd5b600054600160a01b900460ff166101ee57600080fd5b6000805460ff60a01b191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b6000546001600160a01b0316331461023b57600080fd5b600054600160a01b900460ff161561025257600080fd5b6000805460ff60a01b1916600160a01b1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b6000546001600160a01b031633146102a557600080fd5b60008381526001602081815260409283902080546001600160a01b0387166001600160a01b031991821681178355919093018054606087811c919095161790558351878152918201526001600160601b03198416928101929092527ff9a6cf519167d81bc5cb3d26c60c0c9a19704aa908c148e82a861b570f4cd2d7910160405180910390a1505050565b6000546001600160a01b0316331461034757600080fd5b600082815260016020526040908190205490516392eefe9b60e01b81526001600160a01b038381166004830152909116906392eefe9b90602401600060405180830381600087803b15801561039b57600080fd5b505af11580156103af573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633146103ce57600080fd5b6001600160a01b0381166103e157600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561044e57600080fd5b5035919050565b80356001600160a01b038116811461046c57600080fd5b919050565b60008060006060848603121561048657600080fd5b8335925061049660208501610455565b915060408401356001600160601b0319811681146104b357600080fd5b809150509250925092565b600080604083850312156104d157600080fd5b823591506104e160208401610455565b90509250929050565b6000602082840312156104fc57600080fd5b61050582610455565b939250505056fea2646970667358221220d81c0edc5dfe2d859317e381899ad1959fd8187078b31b7fe160d782d9fced9e64736f6c63430008090033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.