Contract Overview
Balance:
0 Ether
More Info
My Name Tag:
Not Available
[ Download CSV Export ]
Contract Name:
DappMaintenance
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-08-06 */ /* ____ __ __ __ _ / __/__ __ ___ / /_ / / ___ / /_ (_)__ __ _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ / /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ * Synthetix: DappMaintenance.sol * * Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/DappMaintenance.sol * Docs: https://docs.synthetix.io/contracts/DappMaintenance * * Contract Dependencies: * - Owned * Libraries: (none) * * MIT License * =========== * * Copyright (c) 2020 Synthetix * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity ^0.5.16; // https://docs.synthetix.io/contracts/Owned contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { require(msg.sender == owner, "Only the contract owner may perform this action"); _; } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } /** * @title DappMaintenance contract. * @dev When the Synthetix system is on maintenance (upgrade, release...etc) the dApps also need * to be put on maintenance so no transactions can be done. The DappMaintenance contract is here to keep a state of * the dApps which indicates if yes or no, they should be up or down. */ contract DappMaintenance is Owned { bool public isPausedStaking = false; bool public isPausedSX = false; /** * @dev Constructor */ constructor(address _owner) public Owned(_owner) { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function setMaintenanceModeAll(bool isPaused) external onlyOwner { isPausedStaking = isPaused; isPausedSX = isPaused; emit StakingMaintenance(isPaused); emit SXMaintenance(isPaused); } function setMaintenanceModeStaking(bool isPaused) external onlyOwner { isPausedStaking = isPaused; emit StakingMaintenance(isPausedStaking); } function setMaintenanceModeSX(bool isPaused) external onlyOwner { isPausedSX = isPaused; emit SXMaintenance(isPausedSX); } event StakingMaintenance(bool isPaused); event SXMaintenance(bool isPaused); }
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"SXMaintenance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"StakingMaintenance","type":"event"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isPausedSX","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isPausedStaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"isPaused","type":"bool"}],"name":"setMaintenanceModeAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"isPaused","type":"bool"}],"name":"setMaintenanceModeSX","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"isPaused","type":"bool"}],"name":"setMaintenanceModeStaking","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526001805461ffff60a01b1916905534801561001e57600080fd5b5060405161078a38038061078a8339818101604052602081101561004157600080fd5b5051806001600160a01b03811661009f576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0383169081178255604080519283526020830191909152805160008051602061076a8339815191529281900390910190a1506001600160a01b038116610141576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0383169081178255604080519283526020830191909152805160008051602061076a8339815191529281900390910190a1506105d3806101976000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b1461010b57806393c2212514610113578063b33a5a001461012f578063c65a0ea21461014e578063ee02f27c1461015657610093565b80631627540c146100985780631d008652146100c057806353a47bb7146100df57806379ba509714610103575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b0316610175565b005b6100be600480360360208110156100d657600080fd5b50351515610212565b6100e76102f2565b604080516001600160a01b039092168252519081900360200190f35b6100be610301565b6100e76103bd565b61011b6103cc565b604080519115158252519081900360200190f35b6100be6004803603602081101561014557600080fd5b503515156103dc565b61011b610483565b6100be6004803603602081101561016c57600080fd5b50351515610493565b6000546001600160a01b031633146101be5760405162461bcd60e51b815260040180806020018281038252602f815260200180610570602f913960400191505060405180910390fd5b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6000546001600160a01b0316331461025b5760405162461bcd60e51b815260040180806020018281038252602f815260200180610570602f913960400191505060405180910390fd5b6001805460ff60a01b1916600160a01b8315159081029190911760ff60a81b1916600160a81b82021790915560408051918252517f628bebe481126673e44b33fd8b7525b2e3a2e356838e838fb2934a82c79aea32916020908290030190a160408051821515815290517f5c1a8bee0278c3d0a78882d64b2152ae4cacfea1789f447025658aead92331c69181900360200190a150565b6001546001600160a01b031681565b6001546001600160a01b0316331461034a5760405162461bcd60e51b815260040180806020018281038252603581526020018061053b6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b600154600160a81b900460ff1681565b6000546001600160a01b031633146104255760405162461bcd60e51b815260040180806020018281038252602f815260200180610570602f913960400191505060405180910390fd5b60018054821515600160a01b90810260ff60a01b199092169190911791829055604080519190920460ff161515815290517f628bebe481126673e44b33fd8b7525b2e3a2e356838e838fb2934a82c79aea329181900360200190a150565b600154600160a01b900460ff1681565b6000546001600160a01b031633146104dc5760405162461bcd60e51b815260040180806020018281038252602f815260200180610570602f913960400191505060405180910390fd5b60018054821515600160a81b90810260ff60a81b199092169190911791829055604080519190920460ff161515815290517f5c1a8bee0278c3d0a78882d64b2152ae4cacfea1789f447025658aead92331c69181900360200190a15056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820c1158584fb5d71702e6078c73094c7f037a466b9db7562e0acacb0e35c65623064736f6c63430005100032b532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882
-----Decoded View---------------
Arg [0] : _owner (address): 0xb64ff7a4a33acdf48d97dab0d764afd0f6176882
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882
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.