Contract 0x47F08D263d759D150bc61BE5D72337EbD45Fb559

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x160f9de7b2ab80ecc926aca5f26b02e9416d0d32506638dd5b1355913dd2f5910x61227161315767652022-05-13 5:39:1252 days 17 hrs ago0x73570075092502472e4b61a7058df1a4a1db12f2 IN  Create: SystemSettingsLib0 Ether0.00195684 1
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0x5a46db1d8faf1c3d85128924a0e9e8daace94169af112254ae8376e2611eb6cc315768222022-05-13 5:43:3652 days 17 hrs ago 0x6d9edcbc275a3664f04e68d7fc1466858c683b90 0x47f08d263d759d150bc61be5d72337ebd45fb5590 Ether
0x3b36014a8c9450511b94cc1ab719cc5540f6b8b7ce36b5d895da0dddae2bb247315767682022-05-13 5:39:2452 days 17 hrs ago 0x6d9edcbc275a3664f04e68d7fc1466858c683b90 0x47f08d263d759d150bc61be5d72337ebd45fb5590 Ether
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
SystemSettingsLib

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 2022-05-13
*/

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

* Synthetix: SystemSettingsLib.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/SystemSettingsLib.sol
* Docs: https://docs.synthetix.io/contracts/SystemSettingsLib
*
* Contract Dependencies: (none)
* Libraries: 
*	- SafeDecimalMath
*	- SafeMath
*	- SystemSettingsLib
*
* MIT License
* ===========
*
* Copyright (c) 2022 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.4.24;

// 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;
}


/**
 * @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;
    }

    // Computes `a - b`, setting the value to 0 if b > a.
    function floorsub(uint a, uint b) internal pure returns (uint) {
        return b >= a ? 0 : a - b;
    }

    /* ---------- Utilities ---------- */
    /*
     * Absolute value of the input, returned as a signed number.
     */
    function signedAbs(int x) internal pure returns (int) {
        return x < 0 ? -x : x;
    }

    /*
     * Absolute value of the input, returned as an unsigned number.
     */
    function abs(int x) internal pure returns (uint) {
        return uint(signedAbs(x));
    }
}


// Internal references


// Libraries


/// This library is to reduce SystemSettings contract size only and is not really
/// a proper library - so it shares knowledge of implementation details
/// Some of the setters were refactored into this library, and some setters remain in the
/// contract itself (SystemSettings)
library SystemSettingsLib {
    using SafeMath for uint;
    using SafeDecimalMath for uint;

    bytes32 public constant SETTINGS_CONTRACT_NAME = "SystemSettings";

    // 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 RATIO_FROM_TARGET_BUFFER = 2e18; // 200% - mininimum buffer between issuance ratio and liquidation ratio

    uint public constant MAX_LIQUIDATION_PENALTY = 3e18 / 10; // Max 30% liquidation penalty / bonus

    uint public constant MAX_LIQUIDATION_DELAY = 3 days;
    uint public constant MIN_LIQUIDATION_DELAY = 300; // 5 min

    // 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 = 12e6;
    uint public constant MIN_CROSS_DOMAIN_GAS_LIMIT = 3e6;

    int public constant MAX_WRAPPER_MINT_FEE_RATE = 1e18;

    int public constant MAX_WRAPPER_BURN_FEE_RATE = 1e18;

    // Atomic block volume limit is encoded as uint192.
    uint public constant MAX_ATOMIC_VOLUME_PER_BLOCK = uint192(-1);

    // TWAP window must be between 1 min and 1 day.
    uint public constant MIN_ATOMIC_TWAP_WINDOW = 60;
    uint public constant MAX_ATOMIC_TWAP_WINDOW = 86400;

    // Volatility consideration window must be between 1 min and 1 day.
    uint public constant MIN_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW = 60;
    uint public constant MAX_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW = 86400;

    // workaround for library not supporting public constants in sol v0.5
    function contractName() external view returns (bytes32) {
        return SETTINGS_CONTRACT_NAME;
    }

    function setCrossDomainMessageGasLimit(
        IFlexibleStorage flexibleStorage,
        bytes32 gasLimitSettings,
        uint crossDomainMessageGasLimit
    ) external {
        require(
            crossDomainMessageGasLimit >= MIN_CROSS_DOMAIN_GAS_LIMIT &&
                crossDomainMessageGasLimit <= MAX_CROSS_DOMAIN_GAS_LIMIT,
            "Out of range xDomain gasLimit"
        );
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, gasLimitSettings, crossDomainMessageGasLimit);
    }

    function setIssuanceRatio(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint ratio
    ) external {
        require(ratio <= MAX_ISSUANCE_RATIO, "New issuance ratio cannot exceed MAX_ISSUANCE_RATIO");
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, ratio);
    }

    function setTradingRewardsEnabled(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        bool _tradingRewardsEnabled
    ) external {
        flexibleStorage.setBoolValue(SETTINGS_CONTRACT_NAME, settingName, _tradingRewardsEnabled);
    }

    function setWaitingPeriodSecs(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _waitingPeriodSecs
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _waitingPeriodSecs);
    }

    function setPriceDeviationThresholdFactor(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _priceDeviationThresholdFactor
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _priceDeviationThresholdFactor);
    }

    function setFeePeriodDuration(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _feePeriodDuration
    ) external {
        require(_feePeriodDuration >= MIN_FEE_PERIOD_DURATION, "value < MIN_FEE_PERIOD_DURATION");
        require(_feePeriodDuration <= MAX_FEE_PERIOD_DURATION, "value > MAX_FEE_PERIOD_DURATION");

        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _feePeriodDuration);
    }

    function setTargetThreshold(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint percent
    ) external returns (uint threshold) {
        require(percent <= MAX_TARGET_THRESHOLD, "Threshold too high");
        threshold = percent.mul(SafeDecimalMath.unit()).div(100);

        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, threshold);
    }

    function setLiquidationDelay(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint time
    ) external {
        require(time <= MAX_LIQUIDATION_DELAY, "Must be less than MAX_LIQUIDATION_DELAY");
        require(time >= MIN_LIQUIDATION_DELAY, "Must be greater than MIN_LIQUIDATION_DELAY");

        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, time);
    }

    function setLiquidationRatio(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _liquidationRatio,
        uint getLiquidationPenalty,
        uint getIssuanceRatio
    ) external {
        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(SETTINGS_CONTRACT_NAME, settingName, _liquidationRatio);
    }

    function setLiquidationEscrowDuration(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint duration
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, duration);
    }

    function setLiquidationPenalty(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint penalty
    ) external {
        require(penalty <= MAX_LIQUIDATION_PENALTY, "penalty > MAX_LIQUIDATION_PENALTY");

        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, penalty);
    }

    function setSelfLiquidationPenalty(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint penalty
    ) external {
        require(penalty <= MAX_LIQUIDATION_PENALTY, "penalty > MAX_LIQUIDATION_PENALTY");

        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, penalty);
    }

    function setFlagReward(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint reward
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, reward);
    }

    function setLiquidateReward(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint reward
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, reward);
    }

    function setRateStalePeriod(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint period
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, period);
    }

    function setExchangeFeeRateForSynths(
        IFlexibleStorage flexibleStorage,
        bytes32 settingExchangeFeeRate,
        bytes32[] calldata synthKeys,
        uint256[] calldata exchangeFeeRates
    ) external {
        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(
                SETTINGS_CONTRACT_NAME,
                keccak256(abi.encodePacked(settingExchangeFeeRate, synthKeys[i])),
                exchangeFeeRates[i]
            );
        }
    }

    function setMinimumStakeTime(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _seconds
    ) external {
        require(_seconds <= MAX_MINIMUM_STAKE_TIME, "stake time exceed maximum 1 week");
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _seconds);
    }

    function setDebtSnapshotStaleTime(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _seconds
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _seconds);
    }

    function setAggregatorWarningFlags(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        address _flags
    ) external {
        require(_flags != address(0), "Valid address must be given");
        flexibleStorage.setAddressValue(SETTINGS_CONTRACT_NAME, settingName, _flags);
    }

    function setEtherWrapperMaxETH(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _maxETH
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _maxETH);
    }

    function setEtherWrapperMintFeeRate(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _rate
    ) external {
        require(_rate <= uint(MAX_WRAPPER_MINT_FEE_RATE), "rate > MAX_WRAPPER_MINT_FEE_RATE");
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _rate);
    }

    function setEtherWrapperBurnFeeRate(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _rate
    ) external {
        require(_rate <= uint(MAX_WRAPPER_BURN_FEE_RATE), "rate > MAX_WRAPPER_BURN_FEE_RATE");
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _rate);
    }

    function setWrapperMaxTokenAmount(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        address _wrapper,
        uint _maxTokenAmount
    ) external {
        flexibleStorage.setUIntValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _wrapper)),
            _maxTokenAmount
        );
    }

    function setWrapperMintFeeRate(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        address _wrapper,
        int _rate,
        int getWrapperBurnFeeRate
    ) external {
        require(_rate <= MAX_WRAPPER_MINT_FEE_RATE, "rate > MAX_WRAPPER_MINT_FEE_RATE");
        require(_rate >= -MAX_WRAPPER_MINT_FEE_RATE, "rate < -MAX_WRAPPER_MINT_FEE_RATE");

        // if mint rate is negative, burn fee rate should be positive and at least equal in magnitude
        // otherwise risk of flash loan attack
        if (_rate < 0) {
            require(-_rate <= getWrapperBurnFeeRate, "-rate > wrapperBurnFeeRate");
        }

        flexibleStorage.setIntValue(SETTINGS_CONTRACT_NAME, keccak256(abi.encodePacked(settingName, _wrapper)), _rate);
    }

    function setWrapperBurnFeeRate(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        address _wrapper,
        int _rate,
        int getWrapperMintFeeRate
    ) external {
        require(_rate <= MAX_WRAPPER_BURN_FEE_RATE, "rate > MAX_WRAPPER_BURN_FEE_RATE");
        require(_rate >= -MAX_WRAPPER_BURN_FEE_RATE, "rate < -MAX_WRAPPER_BURN_FEE_RATE");

        // if burn rate is negative, burn fee rate should be negative and at least equal in magnitude
        // otherwise risk of flash loan attack
        if (_rate < 0) {
            require(-_rate <= getWrapperMintFeeRate, "-rate > wrapperMintFeeRate");
        }

        flexibleStorage.setIntValue(SETTINGS_CONTRACT_NAME, keccak256(abi.encodePacked(settingName, _wrapper)), _rate);
    }

    function setInteractionDelay(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        address _collateral,
        uint _interactionDelay
    ) external {
        require(_interactionDelay <= SafeDecimalMath.unit() * 3600, "Max 1 hour");
        flexibleStorage.setUIntValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _collateral)),
            _interactionDelay
        );
    }

    function setCollapseFeeRate(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        address _collateral,
        uint _collapseFeeRate
    ) external {
        flexibleStorage.setUIntValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _collateral)),
            _collapseFeeRate
        );
    }

    function setAtomicMaxVolumePerBlock(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _maxVolume
    ) external {
        require(_maxVolume <= MAX_ATOMIC_VOLUME_PER_BLOCK, "Atomic max volume exceed maximum uint192");
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _maxVolume);
    }

    function setAtomicTwapWindow(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint _window
    ) external {
        require(_window >= MIN_ATOMIC_TWAP_WINDOW, "Atomic twap window under minimum 1 min");
        require(_window <= MAX_ATOMIC_TWAP_WINDOW, "Atomic twap window exceed maximum 1 day");
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, _window);
    }

    function setAtomicEquivalentForDexPricing(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        bytes32 _currencyKey,
        address _equivalent
    ) external {
        require(_equivalent != address(0), "Atomic equivalent is 0 address");
        flexibleStorage.setAddressValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _currencyKey)),
            _equivalent
        );
    }

    function setAtomicExchangeFeeRate(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        bytes32 _currencyKey,
        uint _exchangeFeeRate
    ) external {
        require(_exchangeFeeRate <= MAX_EXCHANGE_FEE_RATE, "MAX_EXCHANGE_FEE_RATE exceeded");
        flexibleStorage.setUIntValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _currencyKey)),
            _exchangeFeeRate
        );
    }

    function setAtomicVolatilityConsiderationWindow(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        bytes32 _currencyKey,
        uint _window
    ) external {
        if (_window != 0) {
            require(
                _window >= MIN_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW,
                "Atomic volatility consideration window under minimum 1 min"
            );
            require(
                _window <= MAX_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW,
                "Atomic volatility consideration window exceed maximum 1 day"
            );
        }
        flexibleStorage.setUIntValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _currencyKey)),
            _window
        );
    }

    function setAtomicVolatilityUpdateThreshold(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        bytes32 _currencyKey,
        uint _threshold
    ) external {
        flexibleStorage.setUIntValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _currencyKey)),
            _threshold
        );
    }

    function setPureChainlinkPriceForAtomicSwapsEnabled(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        bytes32 _currencyKey,
        bool _enabled
    ) external {
        flexibleStorage.setBoolValue(
            SETTINGS_CONTRACT_NAME,
            keccak256(abi.encodePacked(settingName, _currencyKey)),
            _enabled
        );
    }

    function setCrossChainSynthTransferEnabled(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        bytes32 _currencyKey,
        uint _value
    ) external {
        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, keccak256(abi.encodePacked(settingName, _currencyKey)), _value);
    }

    function setExchangeMaxDynamicFee(
        IFlexibleStorage flexibleStorage,
        bytes32 settingName,
        uint maxFee
    ) external {
        require(maxFee != 0, "Max dynamic fee cannot be 0");
        require(maxFee <= MAX_EXCHANGE_FEE_RATE, "MAX_EXCHANGE_FEE_RATE exceeded");

        flexibleStorage.setUIntValue(SETTINGS_CONTRACT_NAME, settingName, maxFee);
    }
}

Contract ABI

[{"constant":true,"inputs":[],"name":"MAX_ATOMIC_TWAP_WINDOW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_ATOMIC_VOLUME_PER_BLOCK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"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":"MAX_WRAPPER_BURN_FEE_RATE","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_WRAPPER_MINT_FEE_RATE","outputs":[{"internalType":"int256","name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_ATOMIC_TWAP_WINDOW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_ATOMIC_VOLATILITY_CONSIDERATION_WINDOW","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":true,"inputs":[],"name":"SETTINGS_CONTRACT_NAME","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contractName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"}]

612271610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106103985760003560e01c806394286a1e116101e8578063cff3fbb211610119578063f02d9a5b116100b7578063fbfd964611610086578063fbfd964614610b16578063fcaee852146103b7578063fd194a35146103b7578063fe250a5514610b5d57610398565b8063f02d9a5b14610abf578063f1076b2514610afe578063f344da6714610b06578063fb1b4c7e14610b0e57610398565b8063d9158b03116100f3578063d9158b0314610a39578063da91c7b814610830578063e6abf7cc14610a78578063e78e6bb914610ab757610398565b8063cff3fbb214610877578063d4aebcef146103b7578063d62ae3991461094257610398565b8063af8bc66011610186578063c264b8f311610160578063c264b8f314610749578063c35b995c146109a1578063c404a0de146109e4578063c58c9ae414610a3157610398565b8063af8bc6601461095a578063b2ea705414610749578063b3ebdca41461096257610398565b8063a4ce5b71116101c2578063a4ce5b711461094a578063a6c46110146103b7578063aad2373914610942578063add0989d1461095257610398565b806394286a1e1461093a57806398be8e3f146109425780639f91787d1461093a57610398565b80636c5a9809116102cd5780637ce2cc7f1161026b578063834f26de1161023a578063834f26de146103b757806383c2ab4d146103b75780638ab5a4a21461074957806392dabaf2146108fb57610398565b80637ce2cc7f146108285780637e1ba6a4146108305780637eb29414146108775780638134ddb7146108b657610398565b806372c6c341116102a757806372c6c3411461079057806375d0c0dc146107985780637c14e56b146107a05780637c1d99d6146107e757610398565b80636c5a9809146105e45780636d4851f1146107515780636db97ffa146103b757610398565b8063446ca4fd1161033a5780635d3045ab116103145780635d3045ab1461067e5780635f7ad871146106c357806363daca091461070a578063657c6dc71461074957610398565b8063446ca4fd146105e457806353c0bf1c14610629578063580a975c1461067657610398565b806311d78c0c1161037657806311d78c0c1461043757806319305b3c146104825780631a5bb1f7146104c157806333ddab68146105a557610398565b8063085f95cd1461039d5780630e7bf1c5146103b757806310ada720146103f8575b600080fd5b6103a5610b9c565b60408051918252519081900360200190f35b8180156103c357600080fd5b506103f6600480360360608110156103da57600080fd5b506001600160a01b038135169060208101359060400135610ba8565b005b81801561040457600080fd5b506103a56004803603606081101561041b57600080fd5b506001600160a01b038135169060208101359060400135610c2b565b81801561044357600080fd5b506103f6600480360360a081101561045a57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060800135610d91565b81801561048e57600080fd5b506103f6600480360360608110156104a557600080fd5b506001600160a01b038135169060208101359060400135610f48565b8180156104cd57600080fd5b506103f6600480360360808110156104e457600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561051457600080fd5b82018360208201111561052657600080fd5b8035906020019184602083028401116401000000008311171561054857600080fd5b91939092909160208101903564010000000081111561056657600080fd5b82018360208201111561057857600080fd5b8035906020019184602083028401116401000000008311171561059a57600080fd5b509092509050610f8e565b8180156105b157600080fd5b506103f6600480360360608110156105c857600080fd5b506001600160a01b038135169060208101359060400135611139565b8180156105f057600080fd5b506103f66004803603608081101561060757600080fd5b506001600160a01b0381351690602081013590604081013590606001356111bb565b81801561063557600080fd5b506103f6600480360360a081101561064c57600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060800135611263565b6103a5611425565b81801561068a57600080fd5b506103f6600480360360808110156106a157600080fd5b506001600160a01b03813516906020810135906040810135906060013561142c565b8180156106cf57600080fd5b506103f6600480360360808110156106e657600080fd5b506001600160a01b03813581169160208101359160408201359160600135166114b4565b81801561071657600080fd5b506103f66004803603606081101561072d57600080fd5b506001600160a01b03813516906020810135906040013561159c565b6103a561164c565b81801561075d57600080fd5b506103f66004803603606081101561077457600080fd5b506001600160a01b038135169060208101359060400135611658565b6103a561169f565b6103a56116b4565b8180156107ac57600080fd5b506103f6600480360360808110156107c357600080fd5b506001600160a01b03813516906020810135906040810135906060013515156116c9565b8180156107f357600080fd5b506103f66004803603606081101561080a57600080fd5b506001600160a01b0381351690602081013590604001351515611754565b6103a56117bb565b81801561083c57600080fd5b506103f66004803603608081101561085357600080fd5b506001600160a01b03813581169160208101359160408201351690606001356117c2565b81801561088357600080fd5b506103f66004803603606081101561089a57600080fd5b506001600160a01b03813516906020810135906040013561185f565b8180156108c257600080fd5b506103f6600480360360808110156108d957600080fd5b506001600160a01b0381351690602081013590604081013590606001356118a6565b81801561090757600080fd5b506103f66004803603606081101561091e57600080fd5b506001600160a01b038135169060208101359060400135611903565b6103a5611960565b6103a5611965565b6103a561196c565b6103a5611978565b6103a561197e565b81801561096e57600080fd5b506103f66004803603606081101561098557600080fd5b506001600160a01b038135169060208101359060400135611983565b8180156109ad57600080fd5b506103f6600480360360608110156109c457600080fd5b506001600160a01b03813581169160208101359160409091013516611a06565b8180156109f057600080fd5b506103f6600480360360a0811015610a0757600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060800135611aca565b6103a5611bd0565b818015610a4557600080fd5b506103f660048036036060811015610a5c57600080fd5b506001600160a01b038135169060208101359060400135611bd7565b818015610a8457600080fd5b506103f660048036036060811015610a9b57600080fd5b506001600160a01b038135169060208101359060400135611c2f565b6103a5611cde565b818015610acb57600080fd5b506103f660048036036060811015610ae257600080fd5b506001600160a01b038135169060208101359060400135611ce9565b6103a5611d50565b6103a5611d57565b6103a5611d5e565b818015610b2257600080fd5b506103f660048036036080811015610b3957600080fd5b506001600160a01b0381358116916020810135916040820135169060600135611d6a565b818015610b6957600080fd5b506103f660048036036060811015610b8057600080fd5b506001600160a01b038135169060208101359060400135611e1f565b670429d069189e000081565b60408051631d5b277f60e01b81526d53797374656d53657474696e677360901b6004820152602481018490526044810183905290516001600160a01b03851691631d5b277f91606480830192600092919082900301818387803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50505050505050565b60006032821115610c78576040805162461bcd60e51b81526020600482015260126024820152710a8d0e4cae6d0ded8c840e8dede40d0d2ced60731b604482015290519081900360640190fd5b610d096064610cfd731a60e2e2a8be0bc2b6381dd31fd3fd5f9a28de4c63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc457600080fd5b505af4158015610cd8573d6000803e3d6000fd5b505050506040513d6020811015610cee57600080fd5b5051859063ffffffff611e7c16565b9063ffffffff611ede16565b9050836001600160a01b0316631d5b277f6d53797374656d53657474696e677360901b85846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610d7257600080fd5b505af1158015610d86573d6000803e3d6000fd5b505050509392505050565b610e29610e1483731a60e2e2a8be0bc2b6381dd31fd3fd5f9a28de4c63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015610ddc57600080fd5b505af4158015610df0573d6000803e3d6000fd5b505050506040513d6020811015610e0657600080fd5b50519063ffffffff611f4816565b670de0b6b3a76400009063ffffffff611fa216565b831115610e675760405162461bcd60e51b815260040180806020018281038252603881526020018061202d6038913960400191505060405180910390fd5b6000610e8182671bc16d674ec8000063ffffffff611fc016565b905080841015610ec25760405162461bcd60e51b81526004018080602001828103825260288152602001806121896028913960400191505060405180910390fd5b60408051631d5b277f60e01b81526d53797374656d53657474696e677360901b6004820152602481018790526044810186905290516001600160a01b03881691631d5b277f91606480830192600092919082900301818387803b158015610f2857600080fd5b505af1158015610f3c573d6000803e3d6000fd5b50505050505050505050565b6001600160c01b03811115610ba85760405162461bcd60e51b81526004018080602001828103825260288152602001806120866028913960400191505060405180910390fd5b828114610fe2576040805162461bcd60e51b815260206004820152601860248201527f4172726179206c656e6774687320646f6e74206d617463680000000000000000604482015290519081900360640190fd5b60005b83811015610c225767016345785d8a000083838381811061100257fe5b90506020020135111561105c576040805162461bcd60e51b815260206004820152601e60248201527f4d41585f45584348414e47455f4645455f524154452065786365656465640000604482015290519081900360640190fd5b866001600160a01b0316631d5b277f6d53797374656d53657474696e677360901b8888888681811061108a57fe5b905060200201356040516020018083815260200182815260200192505050604051602081830303815290604052805190602001208686868181106110ca57fe5b905060200201356040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b15801561111557600080fd5b505af1158015611129573d6000803e3d6000fd5b505060019092019150610fe59050565b603c8110156111795760405162461bcd60e51b81526004018080602001828103825260268152602001806121096026913960400191505060405180910390fd5b62015180811115610ba85760405162461bcd60e51b81526004018080602001828103825260278152602001806121b16027913960400191505060405180910390fd5b6040805160208082018690528183018590528251808303840181526060830180855281519190920120631d5b277f60e01b9091526d53797374656d53657474696e677360901b6064830152608482015260a4810183905290516001600160a01b03861691631d5b277f9160c480830192600092919082900301818387803b15801561124557600080fd5b505af1158015611259573d6000803e3d6000fd5b5050505050505050565b670de0b6b3a76400008213156112c0576040805162461bcd60e51b815260206004820181905260248201527f72617465203e204d41585f575241505045525f4d494e545f4645455f52415445604482015290519081900360640190fd5b670de0b6b3a763ffff198212156113085760405162461bcd60e51b81526004018080602001828103825260218152602001806120656021913960400191505060405180910390fd5b60008212156113695780826000031315611369576040805162461bcd60e51b815260206004820152601a60248201527f2d72617465203e20777261707065724275726e46656552617465000000000000604482015290519081900360640190fd5b6040805160208082018790526bffffffffffffffffffffffff19606087901b168284015282516034818403018152605483018085528151919092012063d71a9b0160e01b9091526d53797374656d53657474696e677360901b605883015260788201526098810184905290516001600160a01b0387169163d71a9b019160b880830192600092919082900301818387803b15801561140657600080fd5b505af115801561141a573d6000803e3d6000fd5b505050505050505050565b62093a8081565b80156111bb57603c8110156114725760405162461bcd60e51b815260040180806020018281038252603a8152602001806120cf603a913960400191505060405180910390fd5b620151808111156111bb5760405162461bcd60e51b815260040180806020018281038252603b815260200180612202603b913960400191505060405180910390fd5b6001600160a01b03811661150f576040805162461bcd60e51b815260206004820152601e60248201527f41746f6d6963206571756976616c656e74206973203020616464726573730000604482015290519081900360640190fd5b60408051602080820186905281830185905282518083038401815260608301808552815191909201206309b9412f60e31b9091526d53797374656d53657474696e677360901b606483015260848201526001600160a01b0383811660a4830152915191861691634dca09789160c48082019260009290919082900301818387803b15801561124557600080fd5b620151808110156115f4576040805162461bcd60e51b815260206004820152601f60248201527f76616c7565203c204d494e5f4645455f504552494f445f4455524154494f4e00604482015290519081900360640190fd5b624f1a00811115610ba8576040805162461bcd60e51b815260206004820152601f60248201527f76616c7565203e204d41585f4645455f504552494f445f4455524154494f4e00604482015290519081900360640190fd5b670de0b6b3a764000081565b670de0b6b3a7640000811115610ba85760405162461bcd60e51b815260040180806020018281038252603381526020018061212f6033913960400191505060405180910390fd5b6d53797374656d53657474696e677360901b81565b6d53797374656d53657474696e677360901b90565b6040805160208082018690528183018590528251808303840181526060830180855281519190920120630fca29bf60e21b9091526d53797374656d53657474696e677360901b6064830152608482015282151560a482015290516001600160a01b03861691633f28a6fc9160c480830192600092919082900301818387803b15801561124557600080fd5b60408051630fca29bf60e21b81526d53797374656d53657474696e677360901b600482015260248101849052821515604482015290516001600160a01b03851691633f28a6fc91606480830192600092919082900301818387803b158015610c0e57600080fd5b622dc6c081565b6040805160208082018690526bffffffffffffffffffffffff19606086901b1682840152825160348184030181526054830180855281519190920120631d5b277f60e01b9091526d53797374656d53657474696e677360901b605883015260788201526098810183905290516001600160a01b03861691631d5b277f9160b880830192600092919082900301818387803b15801561124557600080fd5b670429d069189e0000811115610ba85760405162461bcd60e51b8152600401808060200182810382526021815260200180611feb6021913960400191505060405180910390fd5b67016345785d8a00008111156111bb576040805162461bcd60e51b815260206004820152601e60248201527f4d41585f45584348414e47455f4645455f524154452065786365656465640000604482015290519081900360640190fd5b670de0b6b3a7640000811115610ba8576040805162461bcd60e51b815260206004820181905260248201527f72617465203e204d41585f575241505045525f4255524e5f4645455f52415445604482015290519081900360640190fd5b603c81565b6201518081565b671bc16d674ec8000081565b61012c81565b603281565b6203f4808111156119c55760405162461bcd60e51b81526004018080602001828103825260278152602001806121626027913960400191505060405180910390fd5b61012c811015610ba85760405162461bcd60e51b815260040180806020018281038252602a8152602001806121d8602a913960400191505060405180910390fd5b6001600160a01b038116611a61576040805162461bcd60e51b815260206004820152601b60248201527f56616c69642061646472657373206d75737420626520676976656e0000000000604482015290519081900360640190fd5b604080516309b9412f60e31b81526d53797374656d53657474696e677360901b6004820152602481018490526001600160a01b038381166044830152915191851691634dca09789160648082019260009290919082900301818387803b158015610c0e57600080fd5b670de0b6b3a7640000821315611b27576040805162461bcd60e51b815260206004820181905260248201527f72617465203e204d41585f575241505045525f4255524e5f4645455f52415445604482015290519081900360640190fd5b670de0b6b3a763ffff19821215611b6f5760405162461bcd60e51b815260040180806020018281038252602181526020018061200c6021913960400191505060405180910390fd5b60008212156113695780826000031315611369576040805162461bcd60e51b815260206004820152601a60248201527f2d72617465203e20777261707065724d696e7446656552617465000000000000604482015290519081900360640190fd5b62b71b0081565b62093a80811115610ba8576040805162461bcd60e51b815260206004820181905260248201527f7374616b652074696d6520657863656564206d6178696d756d2031207765656b604482015290519081900360640190fd5b80611c81576040805162461bcd60e51b815260206004820152601b60248201527f4d61782064796e616d6963206665652063616e6e6f7420626520300000000000604482015290519081900360640190fd5b67016345785d8a0000811115610ba8576040805162461bcd60e51b815260206004820152601e60248201527f4d41585f45584348414e47455f4645455f524154452065786365656465640000604482015290519081900360640190fd5b6001600160c01b0381565b622dc6c08110158015611cff575062b71b008111155b610ba8576040805162461bcd60e51b815260206004820152601d60248201527f4f7574206f662072616e67652078446f6d61696e206761734c696d6974000000604482015290519081900360640190fd5b6203f48081565b624f1a0081565b67016345785d8a000081565b731a60e2e2a8be0bc2b6381dd31fd3fd5f9a28de4c63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015611dae57600080fd5b505af4158015611dc2573d6000803e3d6000fd5b505050506040513d6020811015611dd857600080fd5b5051610e10028111156117c2576040805162461bcd60e51b815260206004820152600a60248201526926b0bc1018903437bab960b11b604482015290519081900360640190fd5b670de0b6b3a7640000811115610ba8576040805162461bcd60e51b815260206004820181905260248201527f72617465203e204d41585f575241505045525f4d494e545f4645455f52415445604482015290519081900360640190fd5b600082611e8b57506000611ed8565b82820282848281611e9857fe5b0414611ed55760405162461bcd60e51b81526004018080602001828103825260218152602001806120ae6021913960400191505060405180910390fd5b90505b92915050565b6000808211611f34576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481611f3f57fe5b04949350505050565b600082820183811015611ed5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611ed582610cfd85670de0b6b3a764000063ffffffff611e7c16565b6000670de0b6b3a7640000611fdb848463ffffffff611e7c16565b81611fe257fe5b04939250505056fe70656e616c7479203e204d41585f4c49515549444154494f4e5f50454e414c545972617465203c202d4d41585f575241505045525f4255524e5f4645455f524154456c69717569646174696f6e526174696f203e204d41585f4c49515549444154494f4e5f524154494f202f202831202b2070656e616c74792972617465203c202d4d41585f575241505045525f4d494e545f4645455f5241544541746f6d6963206d617820766f6c756d6520657863656564206d6178696d756d2075696e74313932536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7741746f6d696320766f6c6174696c69747920636f6e73696465726174696f6e2077696e646f7720756e646572206d696e696d756d2031206d696e41746f6d696320747761702077696e646f7720756e646572206d696e696d756d2031206d696e4e65772069737375616e636520726174696f2063616e6e6f7420657863656564204d41585f49535355414e43455f524154494f4d757374206265206c657373207468616e204d41585f4c49515549444154494f4e5f44454c41596c69717569646174696f6e526174696f203c204d494e5f4c49515549444154494f4e5f524154494f41746f6d696320747761702077696e646f7720657863656564206d6178696d756d2031206461794d7573742062652067726561746572207468616e204d494e5f4c49515549444154494f4e5f44454c415941746f6d696320766f6c6174696c69747920636f6e73696465726174696f6e2077696e646f7720657863656564206d6178696d756d203120646179a265627a7a723158203bf47e39a80ae3020dce4b17f28d143999112a8890a5cfd852cd55139afb617564736f6c63430005100032

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

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.