My Name Tag:
Not Available
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0xdaaecb08430281d4a40d2b18cfd9107fde74e9bd4f3b57bd7b13806bc58cce12 | 0x60806040 | 5856401 | 183 days 1 hr ago | Livepeer: Deployer | IN | Create: ServiceRegistry | 0 ETH | 0.003715944415 ETH |
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
ServiceRegistry
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 "./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; import "./IManager.sol"; import "./IController.sol"; contract Manager is IManager { // Controller that contract is registered with IController public controller; // Check if sender is controller modifier onlyController() { _onlyController(); _; } // Check if sender is controller owner modifier onlyControllerOwner() { _onlyControllerOwner(); _; } // Check if controller is not paused modifier whenSystemNotPaused() { _whenSystemNotPaused(); _; } // Check if controller is paused modifier whenSystemPaused() { _whenSystemPaused(); _; } constructor(address _controller) { controller = IController(_controller); } /** * @notice Set controller. Only callable by current controller * @param _controller Controller contract address */ function setController(address _controller) external onlyController { controller = IController(_controller); emit SetController(_controller); } function _onlyController() private view { require(msg.sender == address(controller), "caller must be Controller"); } function _onlyControllerOwner() private view { require(msg.sender == controller.owner(), "caller must be Controller owner"); } function _whenSystemNotPaused() private view { require(!controller.paused(), "system is paused"); } function _whenSystemPaused() private view { require(controller.paused(), "system is not paused"); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./Manager.sol"; /** * @title ManagerProxyTarget * @notice The base contract that target contracts used by a proxy contract should inherit from * @dev 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 */ abstract contract ManagerProxyTarget is Manager { // Used to look up target contract address in controller's registry bytes32 public targetContractId; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./ManagerProxyTarget.sol"; /** * @title ServiceRegistry * @notice Maintains a registry of service metadata associated with service provider addresses (transcoders/orchestrators) */ contract ServiceRegistry is ManagerProxyTarget { // Store service metadata struct Record { string serviceURI; // Service URI endpoint that can be used to send off-chain requests } // Track records for addresses mapping(address => Record) private records; // Event fired when a caller updates its service URI endpoint event ServiceURIUpdate(address indexed addr, string serviceURI); /** * @notice ServiceRegistry constructor. Only invokes constructor of base Manager contract with provided Controller address * @param _controller Address of a Controller that this contract will be registered with */ constructor(address _controller) Manager(_controller) {} /** * @notice Stores service URI endpoint for the caller that can be used to send requests to the caller off-chain * @param _serviceURI Service URI endpoint for the caller */ function setServiceURI(string calldata _serviceURI) external { records[msg.sender].serviceURI = _serviceURI; emit ServiceURIUpdate(msg.sender, _serviceURI); } /** * @notice Returns service URI endpoint stored for a given address * @param _addr Address for which a service URI endpoint is desired */ function getServiceURI(address _addr) public view returns (string memory) { return records[_addr].serviceURI; } }
// 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":[{"internalType":"address","name":"_controller","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"param","type":"string"}],"name":"ParameterUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"string","name":"serviceURI","type":"string"}],"name":"ServiceURIUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"controller","type":"address"}],"name":"SetController","type":"event"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract IController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getServiceURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_serviceURI","type":"string"}],"name":"setServiceURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"targetContractId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161057c38038061057c83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b6104e9806100936000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063214c2a4b1461005c57806351720b41146100855780635f11301b1461009c57806392eefe9b146100b1578063f77c4791146100c4575b600080fd5b61006f61006a366004610352565b6100ef565b60405161007c9190610382565b60405180910390f35b61008e60015481565b60405190815260200161007c565b6100af6100aa3660046103d7565b61019b565b005b6100af6100bf366004610352565b6101fd565b6000546100d7906001600160a01b031681565b6040516001600160a01b03909116815260200161007c565b6001600160a01b038116600090815260026020526040902080546060919061011690610449565b80601f016020809104026020016040519081016040528092919081815260200182805461014290610449565b801561018f5780601f106101645761010080835404028352916020019161018f565b820191906000526020600020905b81548152906001019060200180831161017257829003601f168201915b50505050509050919050565b3360009081526002602052604090206101b59083836102b9565b50336001600160a01b03167ffbb63068732c85741c9f8e61caffaabe038d577bfafd2d2dcc0e352a4f653a4c83836040516101f1929190610484565b60405180910390a25050565b610205610259565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f4ff638452bbf33c012645d18ae6f05515ff5f2d1dfb0cece8cbf018c60903f709060200160405180910390a150565b6000546001600160a01b031633146102b75760405162461bcd60e51b815260206004820152601960248201527f63616c6c6572206d75737420626520436f6e74726f6c6c657200000000000000604482015260640160405180910390fd5b565b8280546102c590610449565b90600052602060002090601f0160209004810192826102e7576000855561032d565b82601f106103005782800160ff1982351617855561032d565b8280016001018555821561032d579182015b8281111561032d578235825591602001919060010190610312565b5061033992915061033d565b5090565b5b80821115610339576000815560010161033e565b60006020828403121561036457600080fd5b81356001600160a01b038116811461037b57600080fd5b9392505050565b600060208083528351808285015260005b818110156103af57858101830151858201604001528201610393565b818111156103c1576000604083870101525b50601f01601f1916929092016040019392505050565b600080602083850312156103ea57600080fd5b823567ffffffffffffffff8082111561040257600080fd5b818501915085601f83011261041657600080fd5b81358181111561042557600080fd5b86602082850101111561043757600080fd5b60209290920196919550909350505050565b600181811c9082168061045d57607f821691505b6020821081141561047e57634e487b7160e01b600052602260045260246000fd5b50919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fea2646970667358221220072fab04e9b0eb88e7ce73c7ea0dd0e46030826f89b48af04a185d7ac13df8de64736f6c63430008090033000000000000000000000000d8e8328501e9645d16cf49539efc04f734606ee4
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d8e8328501e9645d16cf49539efc04f734606ee4
-----Decoded View---------------
Arg [0] : _controller (address): 0xd8e8328501e9645d16cf49539efc04f734606ee4
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d8e8328501e9645d16cf49539efc04f734606ee4
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.