Contract 0x596024E2F73532bDb75ff33c0bD515a70e2D11C9

Contract Overview

Balance:
0 Ether
Txn Hash Method
Block
From
To
Value
0xd494d4c0288f5f97b0a59a454f648ca0f48842e172a75213404c2723dbad1f52Accept Ownership243386692021-04-19 21:40:2028 days 23 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0000217641
0xb628a6269cd3ffac601fd2791b9eff66f413673983d149706126d992082fc387Nominate New Own...243377432021-04-19 20:37:4429 days 17 mins ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0000444591
0x632bf214da155840ee9b8a0fa71c91c6effeba166e4f4c679817560a8d298f7bSet Exchange Fee...240317832021-03-23 19:51:4056 days 1 hr ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0000570061
0xd70a8188d7a1fc9e611c7d00ae7db24da69235a2252b375412e43745f479d8f4Set Rate Stale P...234155562021-02-11 5:52:3296 days 15 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.000180454.5
0xc518e041c6b38a14eeeff06f88a2c7d50139224a37fc9069ce8d5b8e492f676dSet Exchange Fee...234116402021-02-11 0:04:0496 days 20 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0000570181
0xe8e87628e5b3c8a34a6e2e44993428bb64430e9fb05d15b8175cb0ffffffeba5Set Cross Domain...229977332021-01-13 15:51:12125 days 5 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0001117982
0x896d8310c1017cd4cc873686f9621efa230b4b0149671062987ae07999a919c0Set Cross Domain...229977322021-01-13 15:51:04125 days 5 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0001116942
0x1a9a5f71b1762ccb3332edf9d0b51b178f92df53f158ef8c6cdf4cc17a9352e8Set Cross Domain...229977312021-01-13 15:51:00125 days 5 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0001115662
0x2c520bd81d1caa426fcd114330a7e95187398362e27cf48cb42a92cab9f0d397Set Cross Domain...229977302021-01-13 15:50:52125 days 5 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether0.0001114622
0x040381ce165a50b4bde15ddc371b7ec6a4507aac9fd89b06410077e1cc970c790x60806040229976792021-01-13 15:45:12125 days 5 hrs ago0xb64ff7a4a33acdf48d97dab0d764afd0f6176882 IN  Contract Creation0 Ether0.0051732842
[ Download CSV Export 
Latest 9 internal transactions
Parent Txn Hash Block From To Value
0x632bf214da155840ee9b8a0fa71c91c6effeba166e4f4c679817560a8d298f7b240317832021-03-23 19:51:4056 days 1 hr ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0xb1751e5ede811288ce2fc4c65aaca17a955366be0 Ether
0xd70a8188d7a1fc9e611c7d00ae7db24da69235a2252b375412e43745f479d8f4234155562021-02-11 5:52:3296 days 15 hrs ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0xb1751e5ede811288ce2fc4c65aaca17a955366be0 Ether
0xc518e041c6b38a14eeeff06f88a2c7d50139224a37fc9069ce8d5b8e492f676d234116402021-02-11 0:04:0496 days 20 hrs ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0xb1751e5ede811288ce2fc4c65aaca17a955366be0 Ether
0xe8e87628e5b3c8a34a6e2e44993428bb64430e9fb05d15b8175cb0ffffffeba5229977332021-01-13 15:51:12125 days 5 hrs ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0xb1751e5ede811288ce2fc4c65aaca17a955366be0 Ether
0x896d8310c1017cd4cc873686f9621efa230b4b0149671062987ae07999a919c0229977322021-01-13 15:51:04125 days 5 hrs ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0xb1751e5ede811288ce2fc4c65aaca17a955366be0 Ether
0x1a9a5f71b1762ccb3332edf9d0b51b178f92df53f158ef8c6cdf4cc17a9352e8229977312021-01-13 15:51:00125 days 5 hrs ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0xb1751e5ede811288ce2fc4c65aaca17a955366be0 Ether
0x2c520bd81d1caa426fcd114330a7e95187398362e27cf48cb42a92cab9f0d397229977302021-01-13 15:50:52125 days 5 hrs ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0xb1751e5ede811288ce2fc4c65aaca17a955366be0 Ether
0xd1a578489a9548fd45dce45a41adc2912d36911ea0ccb4c6835a7b448b41147b229977192021-01-13 15:49:40125 days 5 hrs ago 0x596024e2f73532bdb75ff33c0bd515a70e2d11c9 0x242a3df52c375bee81b1c668741d7c63af68fdd20 Ether
0xd1a578489a9548fd45dce45a41adc2912d36911ea0ccb4c6835a7b448b41147b229977192021-01-13 15:49:40125 days 5 hrs ago 0x84f87e3636aa9cc1080c07e6c61adfdcc23c0db6 0x596024e2f73532bdb75ff33c0bd515a70e2d11c90 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SystemSettings

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 2021-01-13
*/

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: SystemSettings.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/SystemSettings.sol
* Docs: https://docs.synthetix.io/contracts/SystemSettings
*
* Contract Dependencies: 
*	- IAddressResolver
*	- ISystemSettings
*	- MixinResolver
*	- MixinSystemSettings
*	- Owned
* Libraries: 
*	- SafeDecimalMath
*	- SafeMath
*
* MIT License
* ===========
*
* Copyright (c) 2021 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/source/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 {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver
interface IAddressResolver {
    function getAddress(bytes32 name) external view returns (address);

    function getSynth(bytes32 key) external view returns (address);

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address);
}


// https://docs.synthetix.io/contracts/source/interfaces/isynth
interface ISynth {
    // Views
    function currencyKey() external view returns (bytes32);

    function transferableSynths(address account) external view returns (uint);

    // Mutative functions
    function transferAndSettle(address to, uint value) external returns (bool);

    function transferFromAndSettle(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Restricted: used internally to Synthetix
    function burn(address account, uint amount) external;

    function issue(address account, uint amount) external;
}


// https://docs.synthetix.io/contracts/source/interfaces/iissuer
interface IIssuer {
    // Views
    function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function canBurnSynths(address account) external view returns (bool);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function collateralisationRatioAndAnyRatesInvalid(address _issuer)
        external
        view
        returns (uint cratio, bool anyRateIsInvalid);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance);

    function issuanceRatio() external view returns (uint);

    function lastIssueEvent(address account) external view returns (uint);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function minimumStakeTime() external view returns (uint);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function getSynths(bytes32[] calldata currencyKeys) external view returns (ISynth[] memory);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey, bool excludeEtherCollateral) external view returns (uint);

    function transferableSynthetixAndAnyRateIsInvalid(address account, uint balance)
        external
        view
        returns (uint transferable, bool anyRateIsInvalid);

    // Restricted: used internally to Synthetix
    function issueSynths(address from, uint amount) external;

    function issueSynthsOnBehalf(
        address issueFor,
        address from,
        uint amount
    ) external;

    function issueMaxSynths(address from) external;

    function issueMaxSynthsOnBehalf(address issueFor, address from) external;

    function burnSynths(address from, uint amount) external;

    function burnSynthsOnBehalf(
        address burnForAddress,
        address from,
        uint amount
    ) external;

    function burnSynthsToTarget(address from) external;

    function burnSynthsToTargetOnBehalf(address burnForAddress, address from) external;

    function liquidateDelinquentAccount(
        address account,
        uint susdAmount,
        address liquidator
    ) external returns (uint totalRedeemed, uint amountToLiquidate);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/addressresolver
contract AddressResolver is Owned, IAddressResolver {
    mapping(bytes32 => address) public repository;

    constructor(address _owner) public Owned(_owner) {}

    /* ========== RESTRICTED FUNCTIONS ========== */

    function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner {
        require(names.length == destinations.length, "Input lengths must match");

        for (uint i = 0; i < names.length; i++) {
            bytes32 name = names[i];
            address destination = destinations[i];
            repository[name] = destination;
            emit AddressImported(name, destination);
        }
    }

    /* ========= PUBLIC FUNCTIONS ========== */

    function rebuildCaches(MixinResolver[] calldata destinations) external {
        for (uint i = 0; i < destinations.length; i++) {
            destinations[i].rebuildCache();
        }
    }

    /* ========== VIEWS ========== */

    function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) {
        for (uint i = 0; i < names.length; i++) {
            if (repository[names[i]] != destinations[i]) {
                return false;
            }
        }
        return true;
    }

    function getAddress(bytes32 name) external view returns (address) {
        return repository[name];
    }

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) {
        address _foundAddress = repository[name];
        require(_foundAddress != address(0), reason);
        return _foundAddress;
    }

    function getSynth(bytes32 key) external view returns (address) {
        IIssuer issuer = IIssuer(repository["Issuer"]);
        require(address(issuer) != address(0), "Cannot find Issuer address");
        return address(issuer.synths(key));
    }

    /* ========== EVENTS ========== */

    event AddressImported(bytes32 name, address destination);
}


// solhint-disable payable-fallback

// https://docs.synthetix.io/contracts/source/contracts/readproxy
contract ReadProxy is Owned {
    address public target;

    constructor(address _owner) public Owned(_owner) {}

    function setTarget(address _target) external onlyOwner {
        target = _target;
        emit TargetUpdated(target);
    }

    function() external {
        // The basics of a proxy read call
        // Note that msg.sender in the underlying will always be the address of this contract.
        assembly {
            calldatacopy(0, 0, calldatasize)

            // Use of staticcall - this will revert if the underlying function mutates state
            let result := staticcall(gas, sload(target_slot), 0, calldatasize, 0, 0)
            returndatacopy(0, 0, returndatasize)

            if iszero(result) {
                revert(0, returndatasize)
            }
            return(0, returndatasize)
        }
    }

    event TargetUpdated(address newTarget);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/mixinresolver
contract MixinResolver {
    AddressResolver public resolver;

    mapping(bytes32 => address) private addressCache;

    constructor(address _resolver) internal {
        resolver = AddressResolver(_resolver);
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function combineArrays(bytes32[] memory first, bytes32[] memory second)
        internal
        pure
        returns (bytes32[] memory combination)
    {
        combination = new bytes32[](first.length + second.length);

        for (uint i = 0; i < first.length; i++) {
            combination[i] = first[i];
        }

        for (uint j = 0; j < second.length; j++) {
            combination[first.length + j] = second[j];
        }
    }

    /* ========== PUBLIC FUNCTIONS ========== */

    // Note: this function is public not external in order for it to be overridden and invoked via super in subclasses
    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {}

    function rebuildCache() public {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        // The resolver must call this function whenver it updates its state
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // Note: can only be invoked once the resolver has all the targets needed added
            address destination = resolver.requireAndGetAddress(
                name,
                string(abi.encodePacked("Resolver missing target: ", name))
            );
            addressCache[name] = destination;
            emit CacheUpdated(name, destination);
        }
    }

    /* ========== VIEWS ========== */

    function isResolverCached() external view returns (bool) {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // false if our cache is invalid or if the resolver doesn't have the required address
            if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
                return false;
            }
        }

        return true;
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function requireAndGetAddress(bytes32 name) internal view returns (address) {
        address _foundAddress = addressCache[name];
        require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name)));
        return _foundAddress;
    }

    /* ========== EVENTS ========== */

    event CacheUpdated(bytes32 name, address destination);
}


// https://docs.synthetix.io/contracts/source/interfaces/iflexiblestorage
interface IFlexibleStorage {
    // Views
    function getUIntValue(bytes32 contractName, bytes32 record) external view returns (uint);

    function getUIntValues(bytes32 contractName, bytes32[] calldata records) external view returns (uint[] memory);

    function getIntValue(bytes32 contractName, bytes32 record) external view returns (int);

    function getIntValues(bytes32 contractName, bytes32[] calldata records) external view returns (int[] memory);

    function getAddressValue(bytes32 contractName, bytes32 record) external view returns (address);

    function getAddressValues(bytes32 contractName, bytes32[] calldata records) external view returns (address[] memory);

    function getBoolValue(bytes32 contractName, bytes32 record) external view returns (bool);

    function getBoolValues(bytes32 contractName, bytes32[] calldata records) external view returns (bool[] memory);

    function getBytes32Value(bytes32 contractName, bytes32 record) external view returns (bytes32);

    function getBytes32Values(bytes32 contractName, bytes32[] calldata records) external view returns (bytes32[] memory);

    // Mutative functions
    function deleteUIntValue(bytes32 contractName, bytes32 record) external;

    function deleteIntValue(bytes32 contractName, bytes32 record) external;

    function deleteAddressValue(bytes32 contractName, bytes32 record) external;

    function deleteBoolValue(bytes32 contractName, bytes32 record) external;

    function deleteBytes32Value(bytes32 contractName, bytes32 record) external;

    function setUIntValue(
        bytes32 contractName,
        bytes32 record,
        uint value
    ) external;

    function setUIntValues(
        bytes32 contractName,
        bytes32[] calldata records,
        uint[] calldata values
    ) external;

    function setIntValue(
        bytes32 contractName,
        bytes32 record,
        int value
    ) external;

    function setIntValues(
        bytes32 contractName,
        bytes32[] calldata records,
        int[] calldata values
    ) external;

    function setAddressValue(
        bytes32 contractName,
        bytes32 record,
        address value
    ) external;

    function setAddressValues(
        bytes32 contractName,
        bytes32[] calldata records,
        address[] calldata values
    ) external;

    function setBoolValue(
        bytes32 contractName,
        bytes32 record,
        bool value
    ) external;

    function setBoolValues(
        bytes32 contractName,
        bytes32[] calldata records,
        bool[] calldata values
    ) external;

    function setBytes32Value(
        bytes32 contractName,
        bytes32 record,
        bytes32 value
    ) external;

    function setBytes32Values(
        bytes32 contractName,
        bytes32[] calldata records,
        bytes32[] calldata values
    ) external;
}


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/mixinsystemsettings
contract MixinSystemSettings is MixinResolver {
    bytes32 internal constant SETTING_CONTRACT_NAME = "SystemSettings";

    bytes32 internal constant SETTING_WAITING_PERIOD_SECS = "waitingPeriodSecs";
    bytes32 internal constant SETTING_PRICE_DEVIATION_THRESHOLD_FACTOR = "priceDeviationThresholdFactor";
    bytes32 internal constant SETTING_ISSUANCE_RATIO = "issuanceRatio";
    bytes32 internal constant SETTING_FEE_PERIOD_DURATION = "feePeriodDuration";
    bytes32 internal constant SETTING_TARGET_THRESHOLD = "targetThreshold";
    bytes32 internal constant SETTING_LIQUIDATION_DELAY = "liquidationDelay";
    bytes32 internal constant SETTING_LIQUIDATION_RATIO = "liquidationRatio";
    bytes32 internal constant SETTING_LIQUIDATION_PENALTY = "liquidationPenalty";
    bytes32 internal constant SETTING_RATE_STALE_PERIOD = "rateStalePeriod";
    bytes32 internal constant SETTING_EXCHANGE_FEE_RATE = "exchangeFeeRate";
    bytes32 internal constant SETTING_MINIMUM_STAKE_TIME = "minimumStakeTime";
    bytes32 internal constant SETTING_AGGREGATOR_WARNING_FLAGS = "aggregatorWarningFlags";
    bytes32 internal constant SETTING_TRADING_REWARDS_ENABLED = "tradingRewardsEnabled";
    bytes32 internal constant SETTING_DEBT_SNAPSHOT_STALE_TIME = "debtSnapshotStaleTime";
    bytes32 internal constant SETTING_CROSS_DOMAIN_DEPOSIT_GAS_LIMIT = "crossDomainDepositGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_ESCROW_GAS_LIMIT = "crossDomainEscrowGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_REWARD_GAS_LIMIT = "crossDomainRewardGasLimit";
    bytes32 internal constant SETTING_CROSS_DOMAIN_WITHDRAWAL_GAS_LIMIT = "crossDomainWithdrawalGasLimit";

    bytes32 internal constant CONTRACT_FLEXIBLESTORAGE = "FlexibleStorage";

    enum CrossDomainMessageGasLimits {Deposit, Escrow, Reward, Withdrawal}

    constructor(address _resolver) internal MixinResolver(_resolver) {}

    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        addresses = new bytes32[](1);
        addresses[0] = CONTRACT_FLEXIBLESTORAGE;
    }

    function flexibleStorage() internal view returns (IFlexibleStorage) {
        return IFlexibleStorage(requireAndGetAddress(CONTRACT_FLEXIBLESTORAGE));
    }

    function _getGasLimitSetting(CrossDomainMessageGasLimits gasLimitType) internal pure returns (bytes32) {
        if (gasLimitType == CrossDomainMessageGasLimits.Deposit) {
            return SETTING_CROSS_DOMAIN_DEPOSIT_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.Escrow) {
            return SETTING_CROSS_DOMAIN_ESCROW_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.Reward) {
            return SETTING_CROSS_DOMAIN_REWARD_GAS_LIMIT;
        } else if (gasLimitType == CrossDomainMessageGasLimits.Withdrawal) {
            return SETTING_CROSS_DOMAIN_WITHDRAWAL_GAS_LIMIT;
        } else {
            revert("Unknown gas limit type");
        }
    }

    function getCrossDomainMessageGasLimit(CrossDomainMessageGasLimits gasLimitType) internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, _getGasLimitSetting(gasLimitType));
    }

    function getTradingRewardsEnabled() internal view returns (bool) {
        return flexibleStorage().getBoolValue(SETTING_CONTRACT_NAME, SETTING_TRADING_REWARDS_ENABLED);
    }

    function getWaitingPeriodSecs() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_WAITING_PERIOD_SECS);
    }

    function getPriceDeviationThresholdFactor() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_PRICE_DEVIATION_THRESHOLD_FACTOR);
    }

    function getIssuanceRatio() internal view returns (uint) {
        // lookup on flexible storage directly for gas savings (rather than via SystemSettings)
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_ISSUANCE_RATIO);
    }

    function getFeePeriodDuration() internal view returns (uint) {
        // lookup on flexible storage directly for gas savings (rather than via SystemSettings)
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_FEE_PERIOD_DURATION);
    }

    function getTargetThreshold() internal view returns (uint) {
        // lookup on flexible storage directly for gas savings (rather than via SystemSettings)
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_TARGET_THRESHOLD);
    }

    function getLiquidationDelay() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_DELAY);
    }

    function getLiquidationRatio() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_RATIO);
    }

    function getLiquidationPenalty() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_PENALTY);
    }

    function getRateStalePeriod() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_RATE_STALE_PERIOD);
    }

    function getExchangeFeeRate(bytes32 currencyKey) internal view returns (uint) {
        return
            flexibleStorage().getUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_EXCHANGE_FEE_RATE, currencyKey))
            );
    }

    function getMinimumStakeTime() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_MINIMUM_STAKE_TIME);
    }

    function getAggregatorWarningFlags() internal view returns (address) {
        return flexibleStorage().getAddressValue(SETTING_CONTRACT_NAME, SETTING_AGGREGATOR_WARNING_FLAGS);
    }

    function getDebtSnapshotStaleTime() internal view returns (uint) {
        return flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_DEBT_SNAPSHOT_STALE_TIME);
    }
}


// https://docs.synthetix.io/contracts/source/interfaces/isystemsettings
interface ISystemSettings {
    // Views
    function priceDeviationThresholdFactor() external view returns (uint);

    function waitingPeriodSecs() external view returns (uint);

    function issuanceRatio() external view returns (uint);

    function feePeriodDuration() external view returns (uint);

    function targetThreshold() external view returns (uint);

    function liquidationDelay() external view returns (uint);

    function liquidationRatio() external view returns (uint);

    function liquidationPenalty() external view returns (uint);

    function rateStalePeriod() external view returns (uint);

    function exchangeFeeRate(bytes32 currencyKey) external view returns (uint);

    function minimumStakeTime() external view returns (uint);
}


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}


// Libraries


// https://docs.synthetix.io/contracts/source/libraries/safedecimalmath
library SafeDecimalMath {
    using SafeMath for uint;

    /* Number of decimal places in the representations. */
    uint8 public constant decimals = 18;
    uint8 public constant highPrecisionDecimals = 27;

    /* The number representing 1.0. */
    uint public constant UNIT = 10**uint(decimals);

    /* The number representing 1.0 for higher fidelity numbers. */
    uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals);
    uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals);

    /**
     * @return Provides an interface to UNIT.
     */
    function unit() external pure returns (uint) {
        return UNIT;
    }

    /**
     * @return Provides an interface to PRECISE_UNIT.
     */
    function preciseUnit() external pure returns (uint) {
        return PRECISE_UNIT;
    }

    /**
     * @return The result of multiplying x and y, interpreting the operands as fixed-point
     * decimals.
     *
     * @dev A unit factor is divided out after the product of x and y is evaluated,
     * so that product must be less than 2**256. As this is an integer division,
     * the internal division always rounds down. This helps save on gas. Rounding
     * is more expensive on gas.
     */
    function multiplyDecimal(uint x, uint y) internal pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        return x.mul(y) / UNIT;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of the specified precision unit.
     *
     * @dev The operands should be in the form of a the specified unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function _multiplyDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        uint quotientTimesTen = x.mul(y) / (precisionUnit / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a precise unit.
     *
     * @dev The operands should be in the precise unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a standard unit.
     *
     * @dev The operands should be in the standard unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is a high
     * precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and UNIT must be less than 2**256. As
     * this is an integer division, the result is always rounded down.
     * This helps save on gas. Rounding is more expensive on gas.
     */
    function divideDecimal(uint x, uint y) internal pure returns (uint) {
        /* Reintroduce the UNIT factor that will be divided out by y. */
        return x.mul(UNIT).div(y);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * decimal in the precision unit specified in the parameter.
     *
     * @dev y is divided after the product of x and the specified precision unit
     * is evaluated, so the product of x and the specified precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function _divideDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        uint resultTimesTen = x.mul(precisionUnit * 10).div(y);

        if (resultTimesTen % 10 >= 5) {
            resultTimesTen += 10;
        }

        return resultTimesTen / 10;
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * standard precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and the standard precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * high precision decimal.
     *
     * @dev y is divided after the product of x and the high precision unit
     * is evaluated, so the product of x and the high precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @dev Convert a standard decimal representation to a high precision one.
     */
    function decimalToPreciseDecimal(uint i) internal pure returns (uint) {
        return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);
    }

    /**
     * @dev Convert a high precision decimal to a standard decimal representation.
     */
    function preciseDecimalToDecimal(uint i) internal pure returns (uint) {
        uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }
}


// Inheritance


// Libraries


// https://docs.synthetix.io/contracts/source/contracts/systemsettings
contract SystemSettings is Owned, MixinSystemSettings, ISystemSettings {
    using SafeMath for uint;
    using SafeDecimalMath for uint;

    // No more synths may be issued than the value of SNX backing them.
    uint public constant MAX_ISSUANCE_RATIO = 1e18;

    // The fee period must be between 1 day and 60 days.
    uint public constant MIN_FEE_PERIOD_DURATION = 1 days;
    uint public constant MAX_FEE_PERIOD_DURATION = 60 days;

    uint public constant MAX_TARGET_THRESHOLD = 50;

    uint public constant MAX_LIQUIDATION_RATIO = 1e18; // 100% issuance ratio

    uint public constant MAX_LIQUIDATION_PENALTY = 1e18 / 4; // Max 25% liquidation penalty / bonus

    uint public constant RATIO_FROM_TARGET_BUFFER = 2e18; // 200% - mininimum buffer between issuance ratio and liquidation ratio

    uint public constant MAX_LIQUIDATION_DELAY = 30 days;
    uint public constant MIN_LIQUIDATION_DELAY = 1 days;

    // Exchange fee may not exceed 10%.
    uint public constant MAX_EXCHANGE_FEE_RATE = 1e18 / 10;

    // Minimum Stake time may not exceed 1 weeks.
    uint public constant MAX_MINIMUM_STAKE_TIME = 1 weeks;

    uint public constant MAX_CROSS_DOMAIN_GAS_LIMIT = 8e6;
    uint public constant MIN_CROSS_DOMAIN_GAS_LIMIT = 3e6;

    constructor(address _owner, address _resolver) public Owned(_owner) MixinSystemSettings(_resolver) {}

    // ========== VIEWS ==========

    // SIP-37 Fee Reclamation
    // The number of seconds after an exchange is executed that must be waited
    // before settlement.
    function waitingPeriodSecs() external view returns (uint) {
        return getWaitingPeriodSecs();
    }

    // SIP-65 Decentralized Circuit Breaker
    // The factor amount expressed in decimal format
    // E.g. 3e18 = factor 3, meaning movement up to 3x and above or down to 1/3x and below
    function priceDeviationThresholdFactor() external view returns (uint) {
        return getPriceDeviationThresholdFactor();
    }

    // The raio of collateral
    // Expressed in 18 decimals. So 800% cratio is 100/800 = 0.125 (0.125e18)
    function issuanceRatio() external view returns (uint) {
        return getIssuanceRatio();
    }

    // How long a fee period lasts at a minimum. It is required for
    // anyone to roll over the periods, so they are not guaranteed
    // to roll over at exactly this duration, but the contract enforces
    // that they cannot roll over any quicker than this duration.
    function feePeriodDuration() external view returns (uint) {
        return getFeePeriodDuration();
    }

    // Users are unable to claim fees if their collateralisation ratio drifts out of target threshold
    function targetThreshold() external view returns (uint) {
        return getTargetThreshold();
    }

    // SIP-15 Liquidations
    // liquidation time delay after address flagged (seconds)
    function liquidationDelay() external view returns (uint) {
        return getLiquidationDelay();
    }

    // SIP-15 Liquidations
    // issuance ratio when account can be flagged for liquidation (with 18 decimals), e.g 0.5 issuance ratio
    // when flag means 1/0.5 = 200% cratio
    function liquidationRatio() external view returns (uint) {
        return getLiquidationRatio();
    }

    // SIP-15 Liquidations
    // penalty taken away from target of liquidation (with 18 decimals). E.g. 10% is 0.1e18
    function liquidationPenalty() external view returns (uint) {
        return getLiquidationPenalty();
    }

    // How long will the ExchangeRates contract assume the rate of any asset is correct
    function rateStalePeriod() external view returns (uint) {
        return getRateStalePeriod();
    }

    function exchangeFeeRate(bytes32 currencyKey) external view returns (uint) {
        return getExchangeFeeRate(currencyKey);
    }

    function minimumStakeTime() external view returns (uint) {
        return getMinimumStakeTime();
    }

    function debtSnapshotStaleTime() external view returns (uint) {
        return getDebtSnapshotStaleTime();
    }

    function aggregatorWarningFlags() external view returns (address) {
        return getAggregatorWarningFlags();
    }

    // SIP-63 Trading incentives
    // determines if Exchanger records fee entries in TradingRewards
    function tradingRewardsEnabled() external view returns (bool) {
        return getTradingRewardsEnabled();
    }

    function crossDomainMessageGasLimit(CrossDomainMessageGasLimits gasLimitType) external view returns (uint) {
        return getCrossDomainMessageGasLimit(gasLimitType);
    }

    // ========== RESTRICTED ==========

    function setCrossDomainMessageGasLimit(CrossDomainMessageGasLimits _gasLimitType, uint _crossDomainMessageGasLimit)
        external
        onlyOwner
    {
        require(
            _crossDomainMessageGasLimit >= MIN_CROSS_DOMAIN_GAS_LIMIT &&
                _crossDomainMessageGasLimit <= MAX_CROSS_DOMAIN_GAS_LIMIT,
            "Out of range xDomain gasLimit"
        );
        flexibleStorage().setUIntValue(
            SETTING_CONTRACT_NAME,
            _getGasLimitSetting(_gasLimitType),
            _crossDomainMessageGasLimit
        );
        emit CrossDomainMessageGasLimitChanged(_gasLimitType, _crossDomainMessageGasLimit);
    }

    function setTradingRewardsEnabled(bool _tradingRewardsEnabled) external onlyOwner {
        flexibleStorage().setBoolValue(SETTING_CONTRACT_NAME, SETTING_TRADING_REWARDS_ENABLED, _tradingRewardsEnabled);
        emit TradingRewardsEnabled(_tradingRewardsEnabled);
    }

    function setWaitingPeriodSecs(uint _waitingPeriodSecs) external onlyOwner {
        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_WAITING_PERIOD_SECS, _waitingPeriodSecs);
        emit WaitingPeriodSecsUpdated(_waitingPeriodSecs);
    }

    function setPriceDeviationThresholdFactor(uint _priceDeviationThresholdFactor) external onlyOwner {
        flexibleStorage().setUIntValue(
            SETTING_CONTRACT_NAME,
            SETTING_PRICE_DEVIATION_THRESHOLD_FACTOR,
            _priceDeviationThresholdFactor
        );
        emit PriceDeviationThresholdUpdated(_priceDeviationThresholdFactor);
    }

    function setIssuanceRatio(uint _issuanceRatio) external onlyOwner {
        require(_issuanceRatio <= MAX_ISSUANCE_RATIO, "New issuance ratio cannot exceed MAX_ISSUANCE_RATIO");
        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_ISSUANCE_RATIO, _issuanceRatio);
        emit IssuanceRatioUpdated(_issuanceRatio);
    }

    function setFeePeriodDuration(uint _feePeriodDuration) external onlyOwner {
        require(_feePeriodDuration >= MIN_FEE_PERIOD_DURATION, "value < MIN_FEE_PERIOD_DURATION");
        require(_feePeriodDuration <= MAX_FEE_PERIOD_DURATION, "value > MAX_FEE_PERIOD_DURATION");

        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_FEE_PERIOD_DURATION, _feePeriodDuration);

        emit FeePeriodDurationUpdated(_feePeriodDuration);
    }

    function setTargetThreshold(uint _percent) external onlyOwner {
        require(_percent <= MAX_TARGET_THRESHOLD, "Threshold too high");

        uint _targetThreshold = _percent.mul(SafeDecimalMath.unit()).div(100);

        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_TARGET_THRESHOLD, _targetThreshold);

        emit TargetThresholdUpdated(_targetThreshold);
    }

    function setLiquidationDelay(uint time) external onlyOwner {
        require(time <= MAX_LIQUIDATION_DELAY, "Must be less than 30 days");
        require(time >= MIN_LIQUIDATION_DELAY, "Must be greater than 1 day");

        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_DELAY, time);

        emit LiquidationDelayUpdated(time);
    }

    // The collateral / issuance ratio ( debt / collateral ) is higher when there is less collateral backing their debt
    // Upper bound liquidationRatio is 1 + penalty (100% + 10% = 110%) to allow collateral value to cover debt and liquidation penalty
    function setLiquidationRatio(uint _liquidationRatio) external onlyOwner {
        require(
            _liquidationRatio <= MAX_LIQUIDATION_RATIO.divideDecimal(SafeDecimalMath.unit().add(getLiquidationPenalty())),
            "liquidationRatio > MAX_LIQUIDATION_RATIO / (1 + penalty)"
        );

        // MIN_LIQUIDATION_RATIO is a product of target issuance ratio * RATIO_FROM_TARGET_BUFFER
        // Ensures that liquidation ratio is set so that there is a buffer between the issuance ratio and liquidation ratio.
        uint MIN_LIQUIDATION_RATIO = getIssuanceRatio().multiplyDecimal(RATIO_FROM_TARGET_BUFFER);
        require(_liquidationRatio >= MIN_LIQUIDATION_RATIO, "liquidationRatio < MIN_LIQUIDATION_RATIO");

        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_RATIO, _liquidationRatio);

        emit LiquidationRatioUpdated(_liquidationRatio);
    }

    function setLiquidationPenalty(uint penalty) external onlyOwner {
        require(penalty <= MAX_LIQUIDATION_PENALTY, "penalty > MAX_LIQUIDATION_PENALTY");

        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_PENALTY, penalty);

        emit LiquidationPenaltyUpdated(penalty);
    }

    function setRateStalePeriod(uint period) external onlyOwner {
        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_RATE_STALE_PERIOD, period);

        emit RateStalePeriodUpdated(period);
    }

    function setExchangeFeeRateForSynths(bytes32[] calldata synthKeys, uint256[] calldata exchangeFeeRates)
        external
        onlyOwner
    {
        require(synthKeys.length == exchangeFeeRates.length, "Array lengths dont match");
        for (uint i = 0; i < synthKeys.length; i++) {
            require(exchangeFeeRates[i] <= MAX_EXCHANGE_FEE_RATE, "MAX_EXCHANGE_FEE_RATE exceeded");
            flexibleStorage().setUIntValue(
                SETTING_CONTRACT_NAME,
                keccak256(abi.encodePacked(SETTING_EXCHANGE_FEE_RATE, synthKeys[i])),
                exchangeFeeRates[i]
            );
            emit ExchangeFeeUpdated(synthKeys[i], exchangeFeeRates[i]);
        }
    }

    function setMinimumStakeTime(uint _seconds) external onlyOwner {
        require(_seconds <= MAX_MINIMUM_STAKE_TIME, "stake time exceed maximum 1 week");
        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_MINIMUM_STAKE_TIME, _seconds);
        emit MinimumStakeTimeUpdated(_seconds);
    }

    function setDebtSnapshotStaleTime(uint _seconds) external onlyOwner {
        flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_DEBT_SNAPSHOT_STALE_TIME, _seconds);
        emit DebtSnapshotStaleTimeUpdated(_seconds);
    }

    function setAggregatorWarningFlags(address _flags) external onlyOwner {
        require(_flags != address(0), "Valid address must be given");
        flexibleStorage().setAddressValue(SETTING_CONTRACT_NAME, SETTING_AGGREGATOR_WARNING_FLAGS, _flags);
        emit AggregatorWarningFlagsUpdated(_flags);
    }

    // ========== EVENTS ==========
    event CrossDomainMessageGasLimitChanged(CrossDomainMessageGasLimits gasLimitType, uint newLimit);
    event TradingRewardsEnabled(bool enabled);
    event WaitingPeriodSecsUpdated(uint waitingPeriodSecs);
    event PriceDeviationThresholdUpdated(uint threshold);
    event IssuanceRatioUpdated(uint newRatio);
    event FeePeriodDurationUpdated(uint newFeePeriodDuration);
    event TargetThresholdUpdated(uint newTargetThreshold);
    event LiquidationDelayUpdated(uint newDelay);
    event LiquidationRatioUpdated(uint newRatio);
    event LiquidationPenaltyUpdated(uint newPenalty);
    event RateStalePeriodUpdated(uint rateStalePeriod);
    event ExchangeFeeUpdated(bytes32 synthKey, uint newExchangeFeeRate);
    event MinimumStakeTimeUpdated(uint minimumStakeTime);
    event DebtSnapshotStaleTimeUpdated(uint debtSnapshotStaleTime);
    event AggregatorWarningFlagsUpdated(address flags);
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"flags","type":"address"}],"name":"AggregatorWarningFlagsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"CacheUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum MixinSystemSettings.CrossDomainMessageGasLimits","name":"gasLimitType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"CrossDomainMessageGasLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"debtSnapshotStaleTime","type":"uint256"}],"name":"DebtSnapshotStaleTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"synthKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"newExchangeFeeRate","type":"uint256"}],"name":"ExchangeFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFeePeriodDuration","type":"uint256"}],"name":"FeePeriodDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRatio","type":"uint256"}],"name":"IssuanceRatioUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDelay","type":"uint256"}],"name":"LiquidationDelayUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPenalty","type":"uint256"}],"name":"LiquidationPenaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRatio","type":"uint256"}],"name":"LiquidationRatioUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minimumStakeTime","type":"uint256"}],"name":"MinimumStakeTimeUpdated","type":"event"},{"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":"uint256","name":"threshold","type":"uint256"}],"name":"PriceDeviationThresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rateStalePeriod","type":"uint256"}],"name":"RateStalePeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTargetThreshold","type":"uint256"}],"name":"TargetThresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"TradingRewardsEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"waitingPeriodSecs","type":"uint256"}],"name":"WaitingPeriodSecsUpdated","type":"event"},{"constant":true,"inputs":[],"name":"MAX_CROSS_DOMAIN_GAS_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_EXCHANGE_FEE_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_FEE_PERIOD_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_ISSUANCE_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_LIQUIDATION_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_LIQUIDATION_PENALTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_LIQUIDATION_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_MINIMUM_STAKE_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_TARGET_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_CROSS_DOMAIN_GAS_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_FEE_PERIOD_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_LIQUIDATION_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RATIO_FROM_TARGET_BUFFER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aggregatorWarningFlags","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"enum MixinSystemSettings.CrossDomainMessageGasLimits","name":"gasLimitType","type":"uint8"}],"name":"crossDomainMessageGasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"debtSnapshotStaleTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"currencyKey","type":"bytes32"}],"name":"exchangeFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feePeriodDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isResolverCached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"issuanceRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"liquidationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"liquidationPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"liquidationRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimumStakeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":true,"inputs":[],"name":"priceDeviationThresholdFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rateStalePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebuildCache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"resolver","outputs":[{"internalType":"contract AddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32[]","name":"addresses","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_flags","type":"address"}],"name":"setAggregatorWarningFlags","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"enum MixinSystemSettings.CrossDomainMessageGasLimits","name":"_gasLimitType","type":"uint8"},{"internalType":"uint256","name":"_crossDomainMessageGasLimit","type":"uint256"}],"name":"setCrossDomainMessageGasLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_seconds","type":"uint256"}],"name":"setDebtSnapshotStaleTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32[]","name":"synthKeys","type":"bytes32[]"},{"internalType":"uint256[]","name":"exchangeFeeRates","type":"uint256[]"}],"name":"setExchangeFeeRateForSynths","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_feePeriodDuration","type":"uint256"}],"name":"setFeePeriodDuration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_issuanceRatio","type":"uint256"}],"name":"setIssuanceRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setLiquidationDelay","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"penalty","type":"uint256"}],"name":"setLiquidationPenalty","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_liquidationRatio","type":"uint256"}],"name":"setLiquidationRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_seconds","type":"uint256"}],"name":"setMinimumStakeTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_priceDeviationThresholdFactor","type":"uint256"}],"name":"setPriceDeviationThresholdFactor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"period","type":"uint256"}],"name":"setRateStalePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setTargetThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_tradingRewardsEnabled","type":"bool"}],"name":"setTradingRewardsEnabled","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_waitingPeriodSecs","type":"uint256"}],"name":"setWaitingPeriodSecs","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"targetThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradingRewardsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"waitingPeriodSecs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051612e21380380612e218339818101604052604081101561003357600080fd5b5080516020909101518080836001600160a01b03811661009a576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600280546001600160a01b039092166001600160a01b0319909216919091179055505050612cfb806101266000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c8063741853601161019d578063af5355d8116100e9578063d62ae399116100a2578063e94220461161007c578063e94220461461071c578063f1076b2514610739578063f344da6714610741578063fb1b4c7e14610749576102f1565b8063d62ae399146106be578063dc8f4a1b146106ee578063e0e6393d14610714576102f1565b8063af5355d8146106c6578063af8bc660146106ce578063b2ea7054146105a9578063b410a034146106d6578063c193f0d8146106de578063c58c9ae4146106e6576102f1565b8063899ffef411610156578063967706e911610130578063967706e914610691578063a0cf7451146106ae578063a4ce5b71146106b6578063add0989d146106be576102f1565b8063899ffef4146106145780638da5cb5b1461066c578063946ce8cd14610674576102f1565b806374185360146105b157806379ba5097146105b957806379cb657a146105c15780637bf82305146105de5780637ce2cc7f14610604578063892571171461060c576102f1565b80632806a7431161025c5780634c36b837116102155780635e0117d6116101ef5780635e0117d6146105525780636190dd7a1461056f578063635a38721461058c578063657c6dc7146105a9576102f1565b80634c36b8371461053a57806353a47bb714610542578063580a975c1461054a576102f1565b80632806a743146103fb57806328a1170d146104185780632af64bd3146104da5780632cce0e54146104f6578063372a395a146105135780634641ab661461051b576102f1565b80631627540c116102ae5780631627540c146103985780631775765f146103be5780631e6e2190146103c657806322425fa4146103e357806323f5589a146103eb578063242df9e1146103f3576102f1565b8063038e47fe146102f657806304c49f2c1461032857806304f3bcec14610347578063054be0b71461036b578063085f95cd146103885780630ee4951b14610390575b600080fd5b6103166004803603602081101561030c57600080fd5b503560ff16610751565b60408051918252519081900360200190f35b6103456004803603602081101561033e57600080fd5b5035610764565b005b61034f6108ea565b604080516001600160a01b039092168252519081900360200190f35b6103456004803603602081101561038157600080fd5b50356108f9565b610316610a12565b610316610a1e565b610345600480360360208110156103ae57600080fd5b50356001600160a01b0316610a2e565b610316610a8a565b610345600480360360208110156103dc57600080fd5b5035610a94565b610316610b76565b610316610b80565b610316610b8a565b6103456004803603602081101561041157600080fd5b5035610b94565b6103456004803603604081101561042e57600080fd5b81019060208101813564010000000081111561044957600080fd5b82018360208201111561045b57600080fd5b8035906020019184602083028401116401000000008311171561047d57600080fd5b91939092909160208101903564010000000081111561049b57600080fd5b8201836020820111156104ad57600080fd5b803590602001918460208302840111640100000000831117156104cf57600080fd5b509092509050610cb2565b6104e2610edd565b604080519115158252519081900360200190f35b6103456004803603602081101561050c57600080fd5b5035610fe7565b61031661119c565b6103456004803603602081101561053157600080fd5b503515156111a6565b61034f611285565b61034f61128f565b61031661129e565b6103456004803603602081101561056857600080fd5b50356112a5565b6103456004803603602081101561058557600080fd5b503561142a565b610345600480360360208110156105a257600080fd5b5035611504565b6103166115da565b6103456115e6565b6103456117ae565b610345600480360360208110156105d757600080fd5b503561186a565b610345600480360360208110156105f457600080fd5b50356001600160a01b031661193e565b610316611a80565b610316611a87565b61061c611a91565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610658578181015183820152602001610640565b505050509050019250505060405180910390f35b61034f611ae2565b6103456004803603602081101561068a57600080fd5b5035611af1565b610316600480360360208110156106a757600080fd5b5035611d07565b610316611d12565b610316611d1c565b610316611d28565b610316611d2f565b610316611d39565b610316611d3e565b6104e2611d48565b610316611d52565b6103456004803603604081101561070457600080fd5b5060ff8135169060200135611d59565b610316611ea4565b6103456004803603602081101561073257600080fd5b5035611eae565b610316611fdb565b610316611fe2565b610316611fe9565b600061075c82611ff5565b90505b919050565b61076c612092565b620151808110156107c4576040805162461bcd60e51b815260206004820152601f60248201527f76616c7565203c204d494e5f4645455f504552494f445f4455524154494f4e00604482015290519081900360640190fd5b624f1a0081111561081c576040805162461bcd60e51b815260206004820152601f60248201527f76616c7565203e204d41585f4645455f504552494f445f4455524154494f4e00604482015290519081900360640190fd5b6108246120dd565b6001600160a01b0316631d5b277f600080516020612c4c833981519152703332b2a832b934b7b2223ab930ba34b7b760791b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b15801561089b57600080fd5b505af11580156108af573d6000803e3d6000fd5b50506040805184815290517f791bd58dd9719b5eb5ccdd6ec4d5c459b0ab8efcf59b723cf477693c0889eacd9350908190036020019150a150565b6002546001600160a01b031681565b610901612092565b670de0b6b3a76400008111156109485760405162461bcd60e51b8152600401808060200182810382526033815260200180612c6c6033913960400191505060405180910390fd5b6109506120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191526c69737375616e6365526174696f60981b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b1580156109c357600080fd5b505af11580156109d7573d6000803e3d6000fd5b50506040805184815290517f63b22e09cc3a33e847c063e35f887bd4ea96bc8c0f93f1f8c311e4fa6d8854529350908190036020019150a150565b6703782dace9d9000081565b6000610a286120fa565b90505b90565b610a36612092565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6000610a286121a0565b610a9c612092565b610aa46120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191527f7072696365446576696174696f6e5468726573686f6c64466163746f72000000846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610b2757600080fd5b505af1158015610b3b573d6000803e3d6000fd5b50506040805184815290517f6e65c7d32a9129ebc4e4e6d755e2a9668753c046f4b128ac8aeb4f3e5446a1e59350908190036020019150a150565b6000610a28612216565b6000610a2861228d565b6000610a28612305565b610b9c612092565b6703782dace9d90000811115610be35760405162461bcd60e51b8152600401808060200182810382526021815260200180612b6e6021913960400191505060405180910390fd5b610beb6120dd565b6001600160a01b0316631d5b277f600080516020612c4c833981519152716c69717569646174696f6e50656e616c747960701b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610c6357600080fd5b505af1158015610c77573d6000803e3d6000fd5b50506040805184815290517fbfb22c07314f4682bba789860ceb851eb8cea2d867920332b2a42cf56be5b2e99350908190036020019150a150565b610cba612092565b828114610d0e576040805162461bcd60e51b815260206004820152601860248201527f4172726179206c656e6774687320646f6e74206d617463680000000000000000604482015290519081900360640190fd5b60005b83811015610ed65767016345785d8a0000838383818110610d2e57fe5b905060200201351115610d88576040805162461bcd60e51b815260206004820152601e60248201527f4d41585f45584348414e47455f4645455f524154452065786365656465640000604482015290519081900360640190fd5b610d906120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191526e65786368616e67654665655261746560881b888886818110610dcc57fe5b90506020020135604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120868686818110610e0c57fe5b905060200201356040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610e5757600080fd5b505af1158015610e6b573d6000803e3d6000fd5b505050507fbbdab54f0da6d720d21f53e4d6f5bbe83e5a2f74c1354175140ea74f8e90c77e858583818110610e9c57fe5b90506020020135848484818110610eaf57fe5b604080519485526020918202939093013590840152508051918290030190a1600101610d11565b5050505050565b60006060610ee9611a91565b905060005b8151811015610fde576000828281518110610f0557fe5b6020908102919091018101516000818152600383526040908190205460025482516321f8a72160e01b81526004810185905292519395506001600160a01b03918216949116926321f8a721926024808201939291829003018186803b158015610f6d57600080fd5b505afa158015610f81573d6000803e3d6000fd5b505050506040513d6020811015610f9757600080fd5b50516001600160a01b0316141580610fc457506000818152600360205260409020546001600160a01b0316155b15610fd55760009350505050610a2b565b50600101610eee565b50600191505090565b610fef612092565b603281111561103a576040805162461bcd60e51b81526020600482015260126024820152710a8d0e4cae6d0ded8c840e8dede40d0d2ced60731b604482015290519081900360640190fd5b60006110cd60646110c1731a60e2e2a8be0bc2b6381dd31fd3fd5f9a28de4c63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b15801561108857600080fd5b505af415801561109c573d6000803e3d6000fd5b505050506040513d60208110156110b257600080fd5b5051859063ffffffff61237b16565b9063ffffffff6123dd16565b90506110d76120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191526e1d185c99d95d151a1c995cda1bdb19608a1b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b15801561114c57600080fd5b505af1158015611160573d6000803e3d6000fd5b50506040805184815290517fb2b3a840c101d8e7f0cf8d80d3868976968714347038fe89b36c5031f94dab129350908190036020019150a15050565b6000610a28612447565b6111ae612092565b6111b66120dd565b60408051630fca29bf60e21b8152600080516020612c4c8339815191526004820152741d1c98591a5b99d4995dd85c991cd15b98589b1959605a1b6024820152831515604482015290516001600160a01b039290921691633f28a6fc9160648082019260009290919082900301818387803b15801561123457600080fd5b505af1158015611248573d6000803e3d6000fd5b505060408051841515815290517fe11c1893b6f97decd3ac13637137734a4b75d159e899e5a8abb48470ab0bc4fd9350908190036020019150a150565b6000610a286124ca565b6001546001600160a01b031681565b62093a8081565b6112ad612092565b62278d00811115611305576040805162461bcd60e51b815260206004820152601960248201527f4d757374206265206c657373207468616e203330206461797300000000000000604482015290519081900360640190fd5b6201518081101561135d576040805162461bcd60e51b815260206004820152601a60248201527f4d7573742062652067726561746572207468616e203120646179000000000000604482015290519081900360640190fd5b6113656120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191526f6c69717569646174696f6e44656c617960801b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b1580156113db57600080fd5b505af11580156113ef573d6000803e3d6000fd5b50506040805184815290517f9917e32433edcb65f8982c1b2c26c3469468308456f93cf34b98c1b0459c53989350908190036020019150a150565b611432612092565b61143a6120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191527464656274536e617073686f745374616c6554696d6560581b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b1580156114b557600080fd5b505af11580156114c9573d6000803e3d6000fd5b50506040805184815290517f9795be9f1478ed09e9e47e67318b8aa7a0c0213170403191099bf7dd435fb4d79350908190036020019150a150565b61150c612092565b6115146120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191527077616974696e67506572696f645365637360781b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b15801561158b57600080fd5b505af115801561159f573d6000803e3d6000fd5b50506040805184815290517fc32c92cac11e29883e0fb2d9e38230cc510e3bda48abc270b780de60bb8465f89350908190036020019150a150565b670de0b6b3a764000081565b60606115f0611a91565b905060005b81518110156117aa57600082828151811061160c57fe5b602090810291909101810151600254604080517f5265736f6c766572206d697373696e67207461726765743a2000000000000000818601526039808201859052825180830390910181526059820180845263dacb2d0160e01b9052605d8201858152607d83019384528151609d84015281519597506000966001600160a01b039095169563dacb2d01958995939492939260bd0191908501908083838c5b838110156116c25781810151838201526020016116aa565b50505050905090810190601f1680156116ef5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561170d57600080fd5b505afa158015611721573d6000803e3d6000fd5b505050506040513d602081101561173757600080fd5b505160008381526003602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518681529182015281519293507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa68929081900390910190a150506001016115f5565b5050565b6001546001600160a01b031633146117f75760405162461bcd60e51b8152600401808060200182810382526035815260200180612b8f6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b611872612092565b61187a6120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191526e1c985d1954dd185b1954195c9a5bd9608a1b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b1580156118ef57600080fd5b505af1158015611903573d6000803e3d6000fd5b50506040805184815290517f16529d8c407b08938da67de7fa4319199baffce4f5d1971f812cc770b0237e669350908190036020019150a150565b611946612092565b6001600160a01b0381166119a1576040805162461bcd60e51b815260206004820152601b60248201527f56616c69642061646472657373206d75737420626520676976656e0000000000604482015290519081900360640190fd5b6119a96120dd565b604080516309b9412f60e31b8152600080516020612c4c83398151915260048201527561676772656761746f725761726e696e67466c61677360501b60248201526001600160a01b03848116604483015291519290911691634dca09789160648082019260009290919082900301818387803b158015611a2857600080fd5b505af1158015611a3c573d6000803e3d6000fd5b5050604080516001600160a01b038516815290517f0f4cbdee769ea02d5757b91905563555cc648fe42fc3ef201e28d97d2bbde9659350908190036020019150a150565b622dc6c081565b6000610a28612546565b604080516001808252818301909252606091602080830190803883390190505090506e466c657869626c6553746f7261676560881b81600081518110611ad357fe5b60200260200101818152505090565b6000546001600160a01b031681565b611af9612092565b611b98611b83611b0761228d565b731a60e2e2a8be0bc2b6381dd31fd3fd5f9a28de4c63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015611b4b57600080fd5b505af4158015611b5f573d6000803e3d6000fd5b505050506040513d6020811015611b7557600080fd5b50519063ffffffff6125bd16565b670de0b6b3a76400009063ffffffff61261716565b811115611bd65760405162461bcd60e51b8152600401808060200182810382526038815260200180612bc46038913960400191505060405180910390fd5b6000611bf8671bc16d674ec80000611bec612635565b9063ffffffff6126a816565b905080821015611c395760405162461bcd60e51b8152600401808060200182810382526028815260200180612c9f6028913960400191505060405180910390fd5b611c416120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191526f6c69717569646174696f6e526174696f60801b856040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015611cb757600080fd5b505af1158015611ccb573d6000803e3d6000fd5b50506040805185815290517f5568be83e5cf7405adf8fb39305e2cdf49c43336606d23c3e0d3fe54e205150a9350908190036020019150a15050565b600061075c826126d2565b6000610a28612775565b671bc16d674ec8000081565b6201518081565b6000610a286127eb565b603281565b6000610a28612635565b6000610a28612866565b627a120081565b611d61612092565b622dc6c08110158015611d775750627a12008111155b611dc8576040805162461bcd60e51b815260206004820152601d60248201527f4f7574206f662072616e67652078446f6d61696e206761734c696d6974000000604482015290519081900360640190fd5b611dd06120dd565b6001600160a01b0316631d5b277f600080516020612c4c833981519152611df6856128e1565b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015611e3b57600080fd5b505af1158015611e4f573d6000803e3d6000fd5b505050507fbf62a396f632016f0e0cffedb18ee9be41a161c79cee3b64736b0c97a924554a828260405180836003811115611e8657fe5b60ff1681526020018281526020019250505060405180910390a15050565b6000610a28612a14565b611eb6612092565b62093a80811115611f0e576040805162461bcd60e51b815260206004820181905260248201527f7374616b652074696d6520657863656564206d6178696d756d2031207765656b604482015290519081900360640190fd5b611f166120dd565b6001600160a01b0316631d5b277f600080516020612c4c8339815191526f6d696e696d756d5374616b6554696d6560801b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015611f8c57600080fd5b505af1158015611fa0573d6000803e3d6000fd5b50506040805184815290517f2b0fa66d155c9598699cb6569577f27b95729bbf580268eed39db6bc4e8144779350908190036020019150a150565b62278d0081565b624f1a0081565b67016345785d8a000081565b6000611fff6120dd565b6001600160a01b03166323257c2b600080516020612c4c833981519152612025856128e1565b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561206057600080fd5b505afa158015612074573d6000803e3d6000fd5b505050506040513d602081101561208a57600080fd5b505192915050565b6000546001600160a01b031633146120db5760405162461bcd60e51b815260040180806020018281038252602f815260200180612bfc602f913960400191505060405180910390fd5b565b6000610a286e466c657869626c6553746f7261676560881b612a89565b60006121046120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191526e1c985d1954dd185b1954195c9a5bd9608a1b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b505afa158015612183573d6000803e3d6000fd5b505050506040513d602081101561219957600080fd5b5051905090565b60006121aa6120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191526f6c69717569646174696f6e526174696f60801b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b60006122206120dd565b6001600160a01b03166323257c2b600080516020612c4c833981519152703332b2a832b934b7b2223ab930ba34b7b760791b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b60006122976120dd565b6001600160a01b03166323257c2b600080516020612c4c833981519152716c69717569646174696f6e50656e616c747960701b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b600061230f6120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191526f6d696e696d756d5374616b6554696d6560801b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b60008261238a575060006123d7565b8282028284828161239757fe5b04146123d45760405162461bcd60e51b8152600401808060200182810382526021815260200180612c2b6021913960400191505060405180910390fd5b90505b92915050565b6000808211612433576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161243e57fe5b04949350505050565b60006124516120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191527f7072696365446576696174696f6e5468726573686f6c64466163746f720000006040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b60006124d46120dd565b6001600160a01b0316639ee5955a600080516020612c4c8339815191527561676772656761746f725761726e696e67466c61677360501b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b60006125506120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191527077616974696e67506572696f645365637360781b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b6000828201838110156123d4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006123d4826110c185670de0b6b3a764000063ffffffff61237b16565b600061263f6120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191526c69737375616e6365526174696f60981b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b6000670de0b6b3a76400006126c3848463ffffffff61237b16565b816126ca57fe5b049392505050565b60006126dc6120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191526e65786368616e67654665655261746560881b856040516020018083815260200182815260200192505050604051602081830303815290604052805190602001206040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561206057600080fd5b600061277f6120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191526f6c69717569646174696f6e44656c617960801b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b60006127f56120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191527464656274536e617073686f745374616c6554696d6560581b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b60006128706120dd565b6001600160a01b031663d994502d600080516020612c4c833981519152741d1c98591a5b99d4995dd85c991cd15b98589b1959605a1b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b6000808260038111156128f057fe5b141561291d57507f63726f7373446f6d61696e4465706f7369744761734c696d697400000000000061075f565b600182600381111561292b57fe5b141561295857507f63726f7373446f6d61696e457363726f774761734c696d69740000000000000061075f565b600282600381111561296657fe5b141561299357507f63726f7373446f6d61696e5265776172644761734c696d69740000000000000061075f565b60038260038111156129a157fe5b14156129ce57507f63726f7373446f6d61696e5769746864726177616c4761734c696d697400000061075f565b6040805162461bcd60e51b8152602060048201526016602482015275556e6b6e6f776e20676173206c696d6974207479706560501b604482015290519081900360640190fd5b6000612a1e6120dd565b6001600160a01b03166323257c2b600080516020612c4c8339815191526e1d185c99d95d151a1c995cda1bdb19608a1b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561216f57600080fd5b600081815260036020908152604080832054815170026b4b9b9b4b7339030b2323932b9b99d1607d1b9381019390935260318084018690528251808503909101815260519093019091526001600160a01b03169081612b665760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b2b578181015183820152602001612b13565b50505050905090810190601f168015612b585780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509291505056fe70656e616c7479203e204d41585f4c49515549444154494f4e5f50454e414c5459596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869706c69717569646174696f6e526174696f203e204d41585f4c49515549444154494f4e5f524154494f202f202831202b2070656e616c7479294f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7753797374656d53657474696e67730000000000000000000000000000000000004e65772069737375616e636520726174696f2063616e6e6f7420657863656564204d41585f49535355414e43455f524154494f6c69717569646174696f6e526174696f203c204d494e5f4c49515549444154494f4e5f524154494fa265627a7a72315820e624d94e6f9463804828f90c2b9a69c1ca06a27284ec47fb9b6327302916abe364736f6c63430005100032000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882000000000000000000000000242a3df52c375bee81b1c668741d7c63af68fdd2

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882000000000000000000000000242a3df52c375bee81b1c668741d7c63af68fdd2

-----Decoded View---------------
Arg [0] : _owner (address): 0xb64ff7a4a33acdf48d97dab0d764afd0f6176882
Arg [1] : _resolver (address): 0x242a3df52c375bee81b1c668741d7c63af68fdd2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b64ff7a4a33acdf48d97dab0d764afd0f6176882
Arg [1] : 000000000000000000000000242a3df52c375bee81b1c668741d7c63af68fdd2


Library Used

SafeDecimalMath : 0x1a60e2e2a8be0bc2b6381dd31fd3fd5f9a28de4c

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading