ETH Price: $2,044.82 (-0.88%)

Contract

0xDaDa1F4c355204e92265F0029Aa00A37E07698ea
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set ATM To Marke...106690712020-08-16 4:52:032034 days ago1597553523IN
0xDaDa1F4c...7E07698ea
0 ETH0.0044458480
Set ATM To Marke...106690682020-08-16 4:51:462034 days ago1597553506IN
0xDaDa1F4c...7E07698ea
0 ETH0.0043798480

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ATMSettings

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2020-08-17
*/

pragma solidity 0.5.17;
pragma experimental ABIEncoderV2;


library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following 
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        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-contracts/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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

library AddressLib {
    address public constant ADDRESS_EMPTY = address(0x0);

    /**
     * @dev Checks if this address is all 0s
     * @param self The address this function was called on
     * @return boolean
     */
    function isEmpty(address self) internal pure returns (bool) {
        return self == ADDRESS_EMPTY;
    }

    /**
     * @dev Checks if this address is the same as another address
     * @param self The address this function was called on
     * @param other Address to check against itself
     * @return boolean
     */
    function isEqualTo(address self, address other) internal pure returns (bool) {
        return self == other;
    }

    /**
     * @dev Checks if this address is different to another address
     * @param self The address this function was called on
     * @param other Address to check against itself
     * @return boolean
     */
    function isNotEqualTo(address self, address other) internal pure returns (bool) {
        return self != other;
    }

    /**
     * @dev Checks if this address is not all 0s
     * @param self The address this function was called on
     * @return boolean
     */
    function isNotEmpty(address self) internal pure returns (bool) {
        return self != ADDRESS_EMPTY;
    }

    /**
     * @dev Throws an error if address is all 0s
     * @param self The address this function was called on
     * @param message Error message if address is all 0s
     */
    function requireNotEmpty(address self, string memory message) internal pure {
        require(isNotEmpty(self), message);
    }

    /**
     * @dev Throws an error if address is not all 0s
     * @param self The address this function was called on
     * @param message Error message if address is not all 0s
     */
    function requireEmpty(address self, string memory message) internal pure {
        require(isEmpty(self), message);
    }

    /**
     * @dev Throws an error if address is not the same as another address
     * @param self The address this function was called on
     * @param other The address to check against itself
     * @param message Error message if addresses are not the same
     */
    function requireEqualTo(address self, address other, string memory message)
        internal
        pure
    {
        require(isEqualTo(self, other), message);
    }

    /**
     * @dev Throws an error if address is the same as another address
     * @param self The address this function was called on
     * @param other The address to check against itself
     * @param message Error message if addresses are the same
     */
    function requireNotEqualTo(address self, address other, string memory message)
        internal
        pure
    {
        require(isNotEqualTo(self, other), message);
    }
}

library AssetSettingsLib {
    using SafeMath for uint256;
    using AddressLib for address;
    using Address for address;

    /**
        @notice This struct manages the asset settings in the platform.
        @param cTokenAddress cToken address associated to the asset. 
        @param maxLoanAmount max loan amount configured for the asset.
     */
    struct AssetSettings {
        // It prepresents the cTokenAddress or 0x0.
        address cTokenAddress;
        // It represents the maximum loan amount to borrow.
        uint256 maxLoanAmount;
    }

    /**
        @notice It initializes the struct instance with the given parameters.
        @param cTokenAddress the initial cToken address.
        @param maxLoanAmount the initial max loan amount.
     */
    function initialize(
        AssetSettings storage self,
        address cTokenAddress,
        uint256 maxLoanAmount
    ) internal {
        require(maxLoanAmount > 0, "INIT_MAX_AMOUNT_REQUIRED");
        require(
            cTokenAddress.isEmpty() || cTokenAddress.isContract(),
            "CTOKEN_MUST_BE_CONTRACT_OR_EMPTY"
        );
        self.cTokenAddress = cTokenAddress;
        self.maxLoanAmount = maxLoanAmount;
    }

    /**
        @notice Checks whether the current asset settings exists or not.
        @dev It throws a require error if the asset settings already exists.
        @param self the current asset settings.
     */
    function requireNotExists(AssetSettings storage self) internal view {
        require(exists(self) == false, "ASSET_SETTINGS_ALREADY_EXISTS");
    }

    /**
        @notice Checks whether the current asset settings exists or not.
        @dev It throws a require error if the asset settings doesn't exist.
        @param self the current asset settings.
     */
    function requireExists(AssetSettings storage self) internal view {
        require(exists(self) == true, "ASSET_SETTINGS_NOT_EXISTS");
    }

    /**
        @notice Tests whether the current asset settings exists or not.
        @param self the current asset settings.
        @return true if the current settings exists (max loan amount higher than zero). Otherwise it returns false.
     */
    function exists(AssetSettings storage self) internal view returns (bool) {
        return self.maxLoanAmount > 0;
    }

    /**
        @notice Tests whether a given amount is greater than the current max loan amount.
        @param self the current asset settings.
        @param amount to test.
        @return true if the given amount is greater than the current max loan amount. Otherwise it returns false.
     */
    function exceedsMaxLoanAmount(AssetSettings storage self, uint256 amount)
        internal
        view
        returns (bool)
    {
        return amount > self.maxLoanAmount;
    }

    /**
        @notice It updates the cToken address.
        @param self the current asset settings.
        @param newCTokenAddress the new cToken address to set.
     */
    function updateCTokenAddress(AssetSettings storage self, address newCTokenAddress)
        internal
    {
        requireExists(self);
        require(self.cTokenAddress != newCTokenAddress, "NEW_CTOKEN_ADDRESS_REQUIRED");
        self.cTokenAddress = newCTokenAddress;
    }

    /**
        @notice It updates the max loan amount.
        @param self the current asset settings.
        @param newMaxLoanAmount the new max loan amount to set.
     */
    function updateMaxLoanAmount(AssetSettings storage self, uint256 newMaxLoanAmount)
        internal
    {
        requireExists(self);
        require(self.maxLoanAmount != newMaxLoanAmount, "NEW_MAX_LOAN_AMOUNT_REQUIRED");
        require(newMaxLoanAmount > 0, "MAX_LOAN_AMOUNT_NOT_ZERO");
        self.maxLoanAmount = newMaxLoanAmount;
    }
}

library PlatformSettingsLib {
    /**
        It defines a platform settings. It includes: value, min, and max values.
     */
    struct PlatformSetting {
        uint256 value;
        uint256 min;
        uint256 max;
        bool exists;
    }

    /**
        @notice It creates a new platform setting given a name, min and max values.
        @param value initial value for the setting.
        @param min min value allowed for the setting.
        @param max max value allowed for the setting.
     */
    function initialize(
        PlatformSetting storage self,
        uint256 value,
        uint256 min,
        uint256 max
    ) internal {
        requireNotExists(self);
        require(value >= min, "VALUE_MUST_BE_GT_MIN_VALUE");
        require(value <= max, "VALUE_MUST_BE_LT_MAX_VALUE");
        self.value = value;
        self.min = min;
        self.max = max;
        self.exists = true;
    }

    /**
        @notice Checks whether the current platform setting exists or not.
        @dev It throws a require error if the platform setting already exists.
        @param self the current platform setting.
     */
    function requireNotExists(PlatformSetting storage self) internal view {
        require(self.exists == false, "PLATFORM_SETTING_ALREADY_EXISTS");
    }

    /**
        @notice Checks whether the current platform setting exists or not.
        @dev It throws a require error if the current platform setting doesn't exist.
        @param self the current platform setting.
     */
    function requireExists(PlatformSetting storage self) internal view {
        require(self.exists == true, "PLATFORM_SETTING_NOT_EXISTS");
    }

    /**
        @notice It updates a current platform setting.
        @dev It throws a require error if:
            - The new value is equal to the current value.
            - The new value is not lower than the max value.
            - The new value is not greater than the min value
        @param self the current platform setting.
        @param newValue the new value to set in the platform setting.
     */
    function update(PlatformSetting storage self, uint256 newValue)
        internal
        returns (uint256 oldValue)
    {
        requireExists(self);
        require(self.value != newValue, "NEW_VALUE_REQUIRED");
        require(newValue >= self.min, "NEW_VALUE_MUST_BE_GT_MIN_VALUE");
        require(newValue <= self.max, "NEW_VALUE_MUST_BE_LT_MAX_VALUE");
        oldValue = self.value;
        self.value = newValue;
    }

    /**
        @notice It removes a current platform setting.
        @param self the current platform setting to remove.
     */
    function remove(PlatformSetting storage self) internal {
        requireExists(self);
        self.value = 0;
        self.min = 0;
        self.max = 0;
        self.exists = false;
    }
}

interface SettingsInterface {
    /**
        @notice This event is emitted when a new platform setting is created.
        @param settingName new setting name.
        @param sender address that created it.
        @param value value for the new setting.
     */
    event PlatformSettingCreated(
        bytes32 indexed settingName,
        address indexed sender,
        uint256 value,
        uint256 minValue,
        uint256 maxValue
    );

    /**
        @notice This event is emitted when a current platform setting is removed.
        @param settingName setting name removed.
        @param sender address that removed it.
     */
    event PlatformSettingRemoved(
        bytes32 indexed settingName,
        uint256 lastValue,
        address indexed sender
    );

    /**
        @notice This event is emitted when a platform setting is updated.
        @param settingName settings name updated.
        @param sender address that updated it.
        @param oldValue old value for the setting.
        @param newValue new value for the setting.
     */
    event PlatformSettingUpdated(
        bytes32 indexed settingName,
        address indexed sender,
        uint256 oldValue,
        uint256 newValue
    );

    /**
        @notice This event is emitted when a lending pool is paused.
        @param account address that paused the lending pool.
        @param lendingPoolAddress lending pool address which was paused.
     */
    event LendingPoolPaused(address indexed account, address indexed lendingPoolAddress);

    /**
        @notice This event is emitted when a lending pool is unpaused.
        @param account address that paused the lending pool.
        @param lendingPoolAddress lending pool address which was unpaused.
     */
    event LendingPoolUnpaused(
        address indexed account,
        address indexed lendingPoolAddress
    );

    /**
        @notice This event is emitted when an new asset settings is created.
        @param sender the transaction sender address.
        @param assetAddress the asset address used to create the settings.
        @param cTokenAddress cToken address to configure for the asset.
        @param maxLoanAmount max loan amount to configure for the asset.
     */
    event AssetSettingsCreated(
        address indexed sender,
        address indexed assetAddress,
        address cTokenAddress,
        uint256 maxLoanAmount
    );

    /**
        @notice This event is emitted when an asset settings is removed.
        @param sender the transaction sender address.
        @param assetAddress the asset address used to remove the settings.
     */
    event AssetSettingsRemoved(address indexed sender, address indexed assetAddress);

    /**
        @notice This event is emitted when an asset settings (address type) is updated.
        @param assetSettingName asset setting name updated.
        @param sender the transaction sender address.
        @param assetAddress the asset address used to update the asset settings.
        @param oldValue old value used for the asset setting.
        @param newValue the value updated.
     */
    event AssetSettingsAddressUpdated(
        bytes32 indexed assetSettingName,
        address indexed sender,
        address indexed assetAddress,
        address oldValue,
        address newValue
    );

    /**
        @notice This event is emitted when an asset settings (uint256 type) is updated.
        @param assetSettingName asset setting name updated.
        @param sender the transaction sender address.
        @param assetAddress the asset address used to update the asset settings.
        @param oldValue old value used for the asset setting.
        @param newValue the value updated.
     */
    event AssetSettingsUintUpdated(
        bytes32 indexed assetSettingName,
        address indexed sender,
        address indexed assetAddress,
        uint256 oldValue,
        uint256 newValue
    );

    /**
        @notice It creates a new platform setting given a setting name, value, min and max values.
        @param settingName setting name to create.
        @param value the initial value for the given setting name.
        @param minValue the min value for the setting.
        @param maxValue the max value for the setting.
     */
    function createPlatformSetting(
        bytes32 settingName,
        uint256 value,
        uint256 minValue,
        uint256 maxValue
    ) external;

    /**
        @notice It updates an existent platform setting given a setting name.
        @notice It only allows to update the value (not the min or max values).
        @notice In case you need to update the min or max values, you need to remove it, and create it again.
        @param settingName setting name to update.
        @param newValue the new value to set.
     */
    function updatePlatformSetting(bytes32 settingName, uint256 newValue) external;

    /**
        @notice Removes a current platform setting given a setting name.
        @param settingName to remove.
     */
    function removePlatformSetting(bytes32 settingName) external;

    /**
        @notice It gets the current platform setting for a given setting name
        @param settingName to get.
        @return the current platform setting.
     */
    function getPlatformSetting(bytes32 settingName)
        external
        view
        returns (PlatformSettingsLib.PlatformSetting memory);

    /**
        @notice It gets the current platform setting value for a given setting name
        @param settingName to get.
        @return the current platform setting value.
     */
    function getPlatformSettingValue(bytes32 settingName) external view returns (uint256);

    /**
        @notice It tests whether a setting name is already configured.
        @param settingName setting name to test.
        @return true if the setting is already configured. Otherwise it returns false.
     */
    function hasPlatformSetting(bytes32 settingName) external view returns (bool);

    /**
        @notice It gets whether the platform is paused or not.
        @return true if platform is paused. Otherwise it returns false.
     */
    function isPaused() external view returns (bool);

    /**
        @notice It gets whether a lending pool is paused or not.
        @param lendingPoolAddress lending pool address to test.
        @return true if the lending pool is paused. Otherwise it returns false.
     */
    function lendingPoolPaused(address lendingPoolAddress) external view returns (bool);

    /**
        @notice It pauses a specific lending pool.
        @param lendingPoolAddress lending pool address to pause.
     */
    function pauseLendingPool(address lendingPoolAddress) external;

    /**
        @notice It unpauses a specific lending pool.
        @param lendingPoolAddress lending pool address to unpause.
     */
    function unpauseLendingPool(address lendingPoolAddress) external;

    /**
        @notice It creates a new asset settings in the platform.
        @param assetAddress asset address used to create the new setting.
        @param cTokenAddress cToken address used to configure the asset setting.
        @param maxLoanAmount the max loan amount used to configure the asset setting.
     */
    function createAssetSettings(
        address assetAddress,
        address cTokenAddress,
        uint256 maxLoanAmount
    ) external;

    /**
        @notice It removes all the asset settings for a specific asset address.
        @param assetAddress asset address used to remove the asset settings.
     */
    function removeAssetSettings(address assetAddress) external;

    /**
        @notice It updates the maximum loan amount for a specific asset address.
        @param assetAddress asset address to configure.
        @param newMaxLoanAmount the new maximum loan amount to configure.
     */
    function updateMaxLoanAmount(address assetAddress, uint256 newMaxLoanAmount) external;

    /**
        @notice It updates the cToken address for a specific asset address.
        @param assetAddress asset address to configure.
        @param newCTokenAddress the new cToken address to configure.
     */
    function updateCTokenAddress(address assetAddress, address newCTokenAddress) external;

    /**
        @notice Gets the current asset addresses list.
        @return the asset addresses list.
     */
    function getAssets() external view returns (address[] memory);

    /**
        @notice Get the current asset settings for a given asset address.
        @param assetAddress asset address used to get the current settings.
        @return the current asset settings.
     */
    function getAssetSettings(address assetAddress)
        external
        view
        returns (AssetSettingsLib.AssetSettings memory);

    /**
        @notice Tests whether amount exceeds the current maximum loan amount for a specific asset settings.
        @param assetAddress asset address to test the setting.
        @param amount amount to test.
        @return true if amount exceeds current max loan amout. Otherwise it returns false.
     */
    function exceedsMaxLoanAmount(address assetAddress, uint256 amount)
        external
        view
        returns (bool);

    /**
        @notice Tests whether an account has the pauser role.
        @param account account to test.
        @return true if account has the pauser role. Otherwise it returns false.
     */
    function hasPauserRole(address account) external view returns (bool);
}

interface IATMSettings {
    /** Events */

    /**
        @notice This event is emitted when an ATM is paused.
        @param atm paused ATM address.
        @param account address that paused the ATM.
     */
    event ATMPaused(address indexed atm, address indexed account);

    /**
        @notice This event is emitted when an ATM is unpaused.
        @param atm unpaused ATM address.
        @param account address that unpaused the ATM.
     */
    event ATMUnpaused(address indexed account, address indexed atm);

    /**
        @notice This event is emitted when the setting for a Market/ATM is set.
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param atm ATM address to set in the given market.
        @param account address that set the setting.
     */
    event MarketToAtmSet(
        address indexed borrowedToken,
        address indexed collateralToken,
        address indexed atm,
        address account
    );

    /**
        @notice This event is emitted when the setting for a Market/ATM is updated.
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param oldAtm the old ATM address in the given market.
        @param newAtm the new ATM address in the given market.
        @param account address that updated the setting.
     */
    event MarketToAtmUpdated(
        address indexed borrowedToken,
        address indexed collateralToken,
        address indexed oldAtm,
        address newAtm,
        address account
    );

    /**
        @notice This event is emitted when the setting for a Market/ATM is removed.
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param oldAtm last ATM address in the given market.
        @param account address that removed the setting.
     */
    event MarketToAtmRemoved(
        address indexed borrowedToken,
        address indexed collateralToken,
        address indexed oldAtm,
        address account
    );

    /* State Variables */

    /** Modifiers */

    /* Constructor */

    /** External Functions */

    /**
        @notice It pauses an given ATM.
        @param atmAddress ATM address to pause.
     */
    function pauseATM(address atmAddress) external;

    /**
        @notice It unpauses an given ATM.
        @param atmAddress ATM address to unpause.
     */
    function unpauseATM(address atmAddress) external;

    /**
        @notice Gets whether an ATM is paused or not.
        @param atmAddress ATM address to test.
        @return true if ATM is paused. Otherwise it returns false.
     */
    function isATMPaused(address atmAddress) external view returns (bool);

    /**
        @notice Sets an ATM for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param atmAddress ATM address to set.
     */
    function setATMToMarket(
        address borrowedToken,
        address collateralToken,
        address atmAddress
    ) external;

    /**
        @notice Updates a new ATM for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param newAtmAddress the new ATM address to update.
     */
    function updateATMToMarket(
        address borrowedToken,
        address collateralToken,
        address newAtmAddress
    ) external;

    /**
        @notice Removes the ATM address for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
     */
    function removeATMToMarket(address borrowedToken, address collateralToken) external;

    /**
        @notice Gets the ATM configured for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @return the ATM address configured for a given market.
     */
    function getATMForMarket(address borrowedToken, address collateralToken)
        external
        view
        returns (address);

    /**
        @notice Tests whether an ATM is configured for a given market (borrowed token and collateral token) or not.
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param atmAddress ATM address to test.
        @return true if the ATM is configured for the market. Otherwise it returns false.
     */
    function isATMForMarket(
        address borrowedToken,
        address collateralToken,
        address atmAddress
    ) external view returns (bool);
}

contract ATMSettings is IATMSettings {
    using Address for address;
    /** Constants */

    address internal constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    /* State Variables */

    SettingsInterface public settings;

    /**
        @notice It represents a mapping to identify whether a ATM is paused or not.

        i.e.: address(ATM) => true or false.
     */
    mapping(address => bool) public atmPaused;

    /**
        @notice It represents a mapping to identify the ATM used in a given market.
        @notice A market is defined by a borrowed token and a collateral token.

        i.e.: address(DAI) => address(ETH) => address(ATM Teller)
     */
    mapping(address => mapping(address => address)) public marketToAtm;

    /** Modifiers */

    /**
        @notice It checks whether sender address has the pauser role or not.
        @dev It throws a require error if sender hasn't the pauser role.
     */
    modifier withPauserRole() {
        require(settings.hasPauserRole(msg.sender), "SENDER_HASNT_PAUSER_ROLE");
        _;
    }

    /* Constructor */

    constructor(address settingsAddress) public {
        require(settingsAddress != address(0x0), "SETTINGS_MUST_BE_PROVIDED");

        settings = SettingsInterface(settingsAddress);
    }

    /** External Functions */

    /**
        @notice It pauses a given ATM.
        @param atmAddress ATM address to pause.
     */
    function pauseATM(address atmAddress) external withPauserRole() {
        require(settings.isPaused() == false, "PLATFORM_IS_ALREADY_PAUSED");
        require(atmPaused[atmAddress] == false, "ATM_IS_ALREADY_PAUSED");

        atmPaused[atmAddress] = true;

        emit ATMPaused(atmAddress, msg.sender);
    }

    /**
        @notice It unpauses a given ATM.
        @param atmAddress ATM address to unpause.
     */
    function unpauseATM(address atmAddress) external withPauserRole() {
        require(settings.isPaused() == false, "PLATFORM_IS_PAUSED");
        require(atmPaused[atmAddress] == true, "ATM_IS_NOT_PAUSED");

        atmPaused[atmAddress] = false;

        emit ATMUnpaused(msg.sender, atmAddress);
    }

    /**
        @notice Gets whether an ATM is paused (or the platform is paused) or not.
        @param atmAddress ATM address to test.
        @return true if ATM is paused. Otherwise it returns false.
     */
    function isATMPaused(address atmAddress) external view returns (bool) {
        return settings.isPaused() || atmPaused[atmAddress];
    }

    /**
        @notice Sets an ATM for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param atmAddress ATM address to set.
     */
    function setATMToMarket(
        address borrowedToken,
        address collateralToken,
        address atmAddress
    ) external withPauserRole() {
        require(borrowedToken.isContract() == true, "BORROWED_TOKEN_MUST_BE_CONTRACT");
        require(
            collateralToken == ETH_ADDRESS || collateralToken.isContract() == true,
            "COLL_TOKEN_MUST_BE_CONTRACT"
        );
        require(
            marketToAtm[borrowedToken][collateralToken] == address(0x0),
            "ATM_TO_MARKET_ALREADY_EXIST"
        );

        marketToAtm[borrowedToken][collateralToken] = atmAddress;

        emit MarketToAtmSet(borrowedToken, collateralToken, atmAddress, msg.sender);
    }

    /**
        @notice Updates a new ATM for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param newAtmAddress the new ATM address to update.
     */
    function updateATMToMarket(
        address borrowedToken,
        address collateralToken,
        address newAtmAddress
    ) external withPauserRole() {
        require(borrowedToken.isContract() == true, "BORROWED_TOKEN_MUST_BE_CONTRACT");
        require(
            collateralToken == ETH_ADDRESS || collateralToken.isContract() == true,
            "COLL_TOKEN_MUST_BE_CONTRACT"
        );
        require(
            marketToAtm[borrowedToken][collateralToken] != address(0x0),
            "ATM_TO_MARKET_NOT_EXIST"
        );
        require(
            marketToAtm[borrowedToken][collateralToken] != newAtmAddress,
            "PROVIDE_NEW_ATM_FOR_MARKET"
        );

        address oldAtm = marketToAtm[borrowedToken][collateralToken];

        marketToAtm[borrowedToken][collateralToken] = newAtmAddress;

        emit MarketToAtmUpdated(
            borrowedToken,
            collateralToken,
            oldAtm,
            newAtmAddress,
            msg.sender
        );
    }

    /**
        @notice Removes the ATM address for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
     */
    function removeATMToMarket(address borrowedToken, address collateralToken)
        external
        withPauserRole()
    {
        require(borrowedToken.isContract() == true, "BORROWED_TOKEN_MUST_BE_CONTRACT");
        require(
            collateralToken == ETH_ADDRESS || collateralToken.isContract() == true,
            "COLL_TOKEN_MUST_BE_CONTRACT"
        );
        require(
            marketToAtm[borrowedToken][collateralToken] != address(0x0),
            "ATM_TO_MARKET_NOT_EXIST"
        );

        address oldAtmAddress = marketToAtm[borrowedToken][collateralToken];

        delete marketToAtm[borrowedToken][collateralToken];

        emit MarketToAtmRemoved(
            borrowedToken,
            collateralToken,
            oldAtmAddress,
            msg.sender
        );
    }

    /**
        @notice Gets the ATM configured for a given market (borrowed token and collateral token).
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @return the ATM address configured for a given market.
     */
    function getATMForMarket(address borrowedToken, address collateralToken)
        external
        view
        returns (address)
    {
        return marketToAtm[borrowedToken][collateralToken];
    }

    /**
        @notice Tests whether an ATM is configured for a given market (borrowed token and collateral token) or not.
        @param borrowedToken borrowed token address.
        @param collateralToken collateral token address.
        @param atmAddress ATM address to test.
        @return true if the ATM is configured for the market. Otherwise it returns false.
     */
    function isATMForMarket(
        address borrowedToken,
        address collateralToken,
        address atmAddress
    ) external view returns (bool) {
        return marketToAtm[borrowedToken][collateralToken] == atmAddress;
    }

    /** Internal functions */

    /** Private functions */
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"settingsAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"atm","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"ATMPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"atm","type":"address"}],"name":"ATMUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"borrowedToken","type":"address"},{"indexed":true,"internalType":"address","name":"collateralToken","type":"address"},{"indexed":true,"internalType":"address","name":"oldAtm","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"MarketToAtmRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"borrowedToken","type":"address"},{"indexed":true,"internalType":"address","name":"collateralToken","type":"address"},{"indexed":true,"internalType":"address","name":"atm","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"MarketToAtmSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"borrowedToken","type":"address"},{"indexed":true,"internalType":"address","name":"collateralToken","type":"address"},{"indexed":true,"internalType":"address","name":"oldAtm","type":"address"},{"indexed":false,"internalType":"address","name":"newAtm","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"MarketToAtmUpdated","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"atmPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"borrowedToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"}],"name":"getATMForMarket","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"borrowedToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"address","name":"atmAddress","type":"address"}],"name":"isATMForMarket","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"atmAddress","type":"address"}],"name":"isATMPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"marketToAtm","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"atmAddress","type":"address"}],"name":"pauseATM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrowedToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"}],"name":"removeATMToMarket","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrowedToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"address","name":"atmAddress","type":"address"}],"name":"setATMToMarket","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"settings","outputs":[{"internalType":"contract SettingsInterface","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"atmAddress","type":"address"}],"name":"unpauseATM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrowedToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"address","name":"newAtmAddress","type":"address"}],"name":"updateATMToMarket","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620012d9380380620012d983398101604081905262000034916200009f565b6001600160a01b038116620000665760405162461bcd60e51b81526004016200005d9062000103565b60405180910390fd5b600080546001600160a01b0319166001600160a01b03929092169190911790556200014a565b8051620000998162000130565b92915050565b600060208284031215620000b257600080fd5b6000620000c084846200008c565b949350505050565b6000620000d760198362000115565b7f53455454494e47535f4d5553545f42455f50524f564944454400000000000000815260200192915050565b602080825281016200009981620000c8565b90815260200190565b60006001600160a01b03821662000099565b6200013b816200011e565b81146200014757600080fd5b50565b61117f806200015a6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80635fdee655116100715780635fdee655146101325780637f4511b614610145578063d6d77ea114610158578063d73d38c11461016b578063e06174e41461017e578063ff3ede9914610193576100a9565b8063010f5888146100ae5780631fb7cec9146100d75780633d5dd995146100f757806342e9c9fd1461010c5780634911e24e1461011f575b600080fd5b6100c16100bc366004610cea565b6101a6565b6040516100ce9190611029565b60405180910390f35b6100ea6100e5366004610d08565b6101bb565b6040516100ce9190610ff2565b61010a610105366004610cea565b6101ea565b005b6100c161011a366004610d42565b6103b9565b61010a61012d366004610cea565b6103ee565b6100ea610140366004610d08565b6105b6565b61010a610153366004610d42565b6105dc565b6100c1610166366004610cea565b610817565b61010a610179366004610d42565b6108c3565b610186610aac565b6040516100ce9190611037565b61010a6101a1366004610d08565b610abb565b60016020526000908152604090205460ff1681565b6001600160a01b0380831660009081526002602090815260408083208585168452909152902054165b92915050565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc9061021a903390600401611000565b60206040518083038186803b15801561023257600080fd5b505afa158015610246573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061026a9190810190610d8f565b61028f5760405162461bcd60e51b815260040161028690611075565b60405180910390fd5b6000809054906101000a90046001600160a01b03166001600160a01b031663b187bd266040518163ffffffff1660e01b815260040160206040518083038186803b1580156102dc57600080fd5b505afa1580156102f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103149190810190610d8f565b156103315760405162461bcd60e51b815260040161028690611055565b6001600160a01b03811660009081526001602081905260409091205460ff1615151461036f5760405162461bcd60e51b815260040161028690611065565b6001600160a01b038116600081815260016020526040808220805460ff191690555133917f0846ebe02ca298464c232059f1870a953ec7727b70ccf130a4ae0edf98ef328391a350565b6001600160a01b03838116600090815260026020908152604080832086851684529091529020548116908216145b9392505050565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc9061041e903390600401611000565b60206040518083038186803b15801561043657600080fd5b505afa15801561044a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061046e9190810190610d8f565b61048a5760405162461bcd60e51b815260040161028690611075565b6000809054906101000a90046001600160a01b03166001600160a01b031663b187bd266040518163ffffffff1660e01b815260040160206040518083038186803b1580156104d757600080fd5b505afa1580156104eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061050f9190810190610d8f565b1561052c5760405162461bcd60e51b815260040161028690611095565b6001600160a01b03811660009081526001602052604090205460ff16156105655760405162461bcd60e51b8152600401610286906110b5565b6001600160a01b0381166000818152600160208190526040808320805460ff1916909217909155513392917f7721350dceac4818833f9f33632008af73234ae2008cdece0facd6202fb2f2b391a350565b60026020908152600092835260408084209091529082529020546001600160a01b031681565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc9061060c903390600401611000565b60206040518083038186803b15801561062457600080fd5b505afa158015610638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061065c9190810190610d8f565b6106785760405162461bcd60e51b815260040161028690611075565b61068a836001600160a01b0316610c98565b15156001146106ab5760405162461bcd60e51b815260040161028690611085565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14806106e957506106e3826001600160a01b0316610c98565b15156001145b6107055760405162461bcd60e51b8152600401610286906110a5565b6001600160a01b0383811660009081526002602090815260408083208685168452909152902054166107495760405162461bcd60e51b815260040161028690611045565b6001600160a01b0383811660009081526002602090815260408083208685168452909152902054811690821614156107935760405162461bcd60e51b8152600401610286906110c5565b6001600160a01b03838116600081815260026020908152604080832087861680855292529182902080546001600160a01b031981168787161790915591519190931692839290917fe553c9ed29171afc7414791a0b1dc88a2a7e261fa30534bf2eb904ece5c97d6d90610809908790339061100e565b60405180910390a450505050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663b187bd266040518163ffffffff1660e01b815260040160206040518083038186803b15801561086657600080fd5b505afa15801561087a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061089e9190810190610d8f565b806101e45750506001600160a01b031660009081526001602052604090205460ff1690565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc906108f3903390600401611000565b60206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109439190810190610d8f565b61095f5760405162461bcd60e51b815260040161028690611075565b610971836001600160a01b0316610c98565b15156001146109925760405162461bcd60e51b815260040161028690611085565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14806109d057506109ca826001600160a01b0316610c98565b15156001145b6109ec5760405162461bcd60e51b8152600401610286906110a5565b6001600160a01b03838116600090815260026020908152604080832086851684529091529020541615610a315760405162461bcd60e51b8152600401610286906110d5565b6001600160a01b03838116600081815260026020908152604080832087861680855292529182902080546001600160a01b031916948616948517905590519091907f68f1e34109a4b734735f0d5f71b860f59bd8243803b4f954fe72a99f2dae8df390610a9f903390611000565b60405180910390a4505050565b6000546001600160a01b031681565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc90610aeb903390600401611000565b60206040518083038186803b158015610b0357600080fd5b505afa158015610b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b3b9190810190610d8f565b610b575760405162461bcd60e51b815260040161028690611075565b610b69826001600160a01b0316610c98565b1515600114610b8a5760405162461bcd60e51b815260040161028690611085565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480610bc85750610bc2816001600160a01b0316610c98565b15156001145b610be45760405162461bcd60e51b8152600401610286906110a5565b6001600160a01b038281166000908152600260209081526040808320858516845290915290205416610c285760405162461bcd60e51b815260040161028690611045565b6001600160a01b03828116600081815260026020908152604080832086861680855292529182902080546001600160a01b0319811690915591519190931692839290917f12624da807a51aae6b36ec16e7f8be3e24565edf22e87d27a46f5318344d4a3b90610a9f903390611000565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610ccc57508115155b949350505050565b80356101e48161111c565b80516101e481611133565b600060208284031215610cfc57600080fd5b6000610ccc8484610cd4565b60008060408385031215610d1b57600080fd5b6000610d278585610cd4565b9250506020610d3885828601610cd4565b9150509250929050565b600080600060608486031215610d5757600080fd5b6000610d638686610cd4565b9350506020610d7486828701610cd4565b9250506040610d8586828701610cd4565b9150509250925092565b600060208284031215610da157600080fd5b6000610ccc8484610cdf565b610db68161110a565b82525050565b610db6816110ee565b610db6816110f9565b610db681611111565b6000610de46017836110e5565b7f41544d5f544f5f4d41524b45545f4e4f545f4558495354000000000000000000815260200192915050565b6000610e1d6012836110e5565b71141310551193d49357d254d7d4105554d15160721b815260200192915050565b6000610e4b6011836110e5565b7010551357d254d7d393d517d4105554d151607a1b815260200192915050565b6000610e786018836110e5565b7f53454e4445525f4841534e545f5041555345525f524f4c450000000000000000815260200192915050565b6000610eb1601f836110e5565b7f424f52524f5745445f544f4b454e5f4d5553545f42455f434f4e545241435400815260200192915050565b6000610eea601a836110e5565b7f504c4154464f524d5f49535f414c52454144595f504155534544000000000000815260200192915050565b6000610f23601b836110e5565b7f434f4c4c5f544f4b454e5f4d5553545f42455f434f4e54524143540000000000815260200192915050565b6000610f5c6015836110e5565b7410551357d254d7d053149150511657d4105554d151605a1b815260200192915050565b6000610f8d601a836110e5565b7f50524f564944455f4e45575f41544d5f464f525f4d41524b4554000000000000815260200192915050565b6000610fc6601b836110e5565b7f41544d5f544f5f4d41524b45545f414c52454144595f45584953540000000000815260200192915050565b602081016101e48284610dbc565b602081016101e48284610dad565b6040810161101c8285610dbc565b6103e76020830184610dad565b602081016101e48284610dc5565b602081016101e48284610dce565b602080825281016101e481610dd7565b602080825281016101e481610e10565b602080825281016101e481610e3e565b602080825281016101e481610e6b565b602080825281016101e481610ea4565b602080825281016101e481610edd565b602080825281016101e481610f16565b602080825281016101e481610f4f565b602080825281016101e481610f80565b602080825281016101e481610fb9565b90815260200190565b60006101e4826110fe565b151590565b6001600160a01b031690565b60006101e4825b60006101e4826110ee565b611125816110ee565b811461113057600080fd5b50565b611125816110f956fea365627a7a72315820d67a8b0482d006fb4a61a2c90f297d300fe6c085e0adbf8b24e03ed92af05bbd6c6578706572696d656e74616cf564736f6c634300051100400000000000000000000000001d8f58d89c46562d9e6050c8ad0eec93dc8a2db3

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80635fdee655116100715780635fdee655146101325780637f4511b614610145578063d6d77ea114610158578063d73d38c11461016b578063e06174e41461017e578063ff3ede9914610193576100a9565b8063010f5888146100ae5780631fb7cec9146100d75780633d5dd995146100f757806342e9c9fd1461010c5780634911e24e1461011f575b600080fd5b6100c16100bc366004610cea565b6101a6565b6040516100ce9190611029565b60405180910390f35b6100ea6100e5366004610d08565b6101bb565b6040516100ce9190610ff2565b61010a610105366004610cea565b6101ea565b005b6100c161011a366004610d42565b6103b9565b61010a61012d366004610cea565b6103ee565b6100ea610140366004610d08565b6105b6565b61010a610153366004610d42565b6105dc565b6100c1610166366004610cea565b610817565b61010a610179366004610d42565b6108c3565b610186610aac565b6040516100ce9190611037565b61010a6101a1366004610d08565b610abb565b60016020526000908152604090205460ff1681565b6001600160a01b0380831660009081526002602090815260408083208585168452909152902054165b92915050565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc9061021a903390600401611000565b60206040518083038186803b15801561023257600080fd5b505afa158015610246573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061026a9190810190610d8f565b61028f5760405162461bcd60e51b815260040161028690611075565b60405180910390fd5b6000809054906101000a90046001600160a01b03166001600160a01b031663b187bd266040518163ffffffff1660e01b815260040160206040518083038186803b1580156102dc57600080fd5b505afa1580156102f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103149190810190610d8f565b156103315760405162461bcd60e51b815260040161028690611055565b6001600160a01b03811660009081526001602081905260409091205460ff1615151461036f5760405162461bcd60e51b815260040161028690611065565b6001600160a01b038116600081815260016020526040808220805460ff191690555133917f0846ebe02ca298464c232059f1870a953ec7727b70ccf130a4ae0edf98ef328391a350565b6001600160a01b03838116600090815260026020908152604080832086851684529091529020548116908216145b9392505050565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc9061041e903390600401611000565b60206040518083038186803b15801561043657600080fd5b505afa15801561044a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061046e9190810190610d8f565b61048a5760405162461bcd60e51b815260040161028690611075565b6000809054906101000a90046001600160a01b03166001600160a01b031663b187bd266040518163ffffffff1660e01b815260040160206040518083038186803b1580156104d757600080fd5b505afa1580156104eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061050f9190810190610d8f565b1561052c5760405162461bcd60e51b815260040161028690611095565b6001600160a01b03811660009081526001602052604090205460ff16156105655760405162461bcd60e51b8152600401610286906110b5565b6001600160a01b0381166000818152600160208190526040808320805460ff1916909217909155513392917f7721350dceac4818833f9f33632008af73234ae2008cdece0facd6202fb2f2b391a350565b60026020908152600092835260408084209091529082529020546001600160a01b031681565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc9061060c903390600401611000565b60206040518083038186803b15801561062457600080fd5b505afa158015610638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061065c9190810190610d8f565b6106785760405162461bcd60e51b815260040161028690611075565b61068a836001600160a01b0316610c98565b15156001146106ab5760405162461bcd60e51b815260040161028690611085565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14806106e957506106e3826001600160a01b0316610c98565b15156001145b6107055760405162461bcd60e51b8152600401610286906110a5565b6001600160a01b0383811660009081526002602090815260408083208685168452909152902054166107495760405162461bcd60e51b815260040161028690611045565b6001600160a01b0383811660009081526002602090815260408083208685168452909152902054811690821614156107935760405162461bcd60e51b8152600401610286906110c5565b6001600160a01b03838116600081815260026020908152604080832087861680855292529182902080546001600160a01b031981168787161790915591519190931692839290917fe553c9ed29171afc7414791a0b1dc88a2a7e261fa30534bf2eb904ece5c97d6d90610809908790339061100e565b60405180910390a450505050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663b187bd266040518163ffffffff1660e01b815260040160206040518083038186803b15801561086657600080fd5b505afa15801561087a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061089e9190810190610d8f565b806101e45750506001600160a01b031660009081526001602052604090205460ff1690565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc906108f3903390600401611000565b60206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109439190810190610d8f565b61095f5760405162461bcd60e51b815260040161028690611075565b610971836001600160a01b0316610c98565b15156001146109925760405162461bcd60e51b815260040161028690611085565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14806109d057506109ca826001600160a01b0316610c98565b15156001145b6109ec5760405162461bcd60e51b8152600401610286906110a5565b6001600160a01b03838116600090815260026020908152604080832086851684529091529020541615610a315760405162461bcd60e51b8152600401610286906110d5565b6001600160a01b03838116600081815260026020908152604080832087861680855292529182902080546001600160a01b031916948616948517905590519091907f68f1e34109a4b734735f0d5f71b860f59bd8243803b4f954fe72a99f2dae8df390610a9f903390611000565b60405180910390a4505050565b6000546001600160a01b031681565b600054604051633b8b83f760e21b81526001600160a01b039091169063ee2e0fdc90610aeb903390600401611000565b60206040518083038186803b158015610b0357600080fd5b505afa158015610b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b3b9190810190610d8f565b610b575760405162461bcd60e51b815260040161028690611075565b610b69826001600160a01b0316610c98565b1515600114610b8a5760405162461bcd60e51b815260040161028690611085565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1480610bc85750610bc2816001600160a01b0316610c98565b15156001145b610be45760405162461bcd60e51b8152600401610286906110a5565b6001600160a01b038281166000908152600260209081526040808320858516845290915290205416610c285760405162461bcd60e51b815260040161028690611045565b6001600160a01b03828116600081815260026020908152604080832086861680855292529182902080546001600160a01b0319811690915591519190931692839290917f12624da807a51aae6b36ec16e7f8be3e24565edf22e87d27a46f5318344d4a3b90610a9f903390611000565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610ccc57508115155b949350505050565b80356101e48161111c565b80516101e481611133565b600060208284031215610cfc57600080fd5b6000610ccc8484610cd4565b60008060408385031215610d1b57600080fd5b6000610d278585610cd4565b9250506020610d3885828601610cd4565b9150509250929050565b600080600060608486031215610d5757600080fd5b6000610d638686610cd4565b9350506020610d7486828701610cd4565b9250506040610d8586828701610cd4565b9150509250925092565b600060208284031215610da157600080fd5b6000610ccc8484610cdf565b610db68161110a565b82525050565b610db6816110ee565b610db6816110f9565b610db681611111565b6000610de46017836110e5565b7f41544d5f544f5f4d41524b45545f4e4f545f4558495354000000000000000000815260200192915050565b6000610e1d6012836110e5565b71141310551193d49357d254d7d4105554d15160721b815260200192915050565b6000610e4b6011836110e5565b7010551357d254d7d393d517d4105554d151607a1b815260200192915050565b6000610e786018836110e5565b7f53454e4445525f4841534e545f5041555345525f524f4c450000000000000000815260200192915050565b6000610eb1601f836110e5565b7f424f52524f5745445f544f4b454e5f4d5553545f42455f434f4e545241435400815260200192915050565b6000610eea601a836110e5565b7f504c4154464f524d5f49535f414c52454144595f504155534544000000000000815260200192915050565b6000610f23601b836110e5565b7f434f4c4c5f544f4b454e5f4d5553545f42455f434f4e54524143540000000000815260200192915050565b6000610f5c6015836110e5565b7410551357d254d7d053149150511657d4105554d151605a1b815260200192915050565b6000610f8d601a836110e5565b7f50524f564944455f4e45575f41544d5f464f525f4d41524b4554000000000000815260200192915050565b6000610fc6601b836110e5565b7f41544d5f544f5f4d41524b45545f414c52454144595f45584953540000000000815260200192915050565b602081016101e48284610dbc565b602081016101e48284610dad565b6040810161101c8285610dbc565b6103e76020830184610dad565b602081016101e48284610dc5565b602081016101e48284610dce565b602080825281016101e481610dd7565b602080825281016101e481610e10565b602080825281016101e481610e3e565b602080825281016101e481610e6b565b602080825281016101e481610ea4565b602080825281016101e481610edd565b602080825281016101e481610f16565b602080825281016101e481610f4f565b602080825281016101e481610f80565b602080825281016101e481610fb9565b90815260200190565b60006101e4826110fe565b151590565b6001600160a01b031690565b60006101e4825b60006101e4826110ee565b611125816110ee565b811461113057600080fd5b50565b611125816110f956fea365627a7a72315820d67a8b0482d006fb4a61a2c90f297d300fe6c085e0adbf8b24e03ed92af05bbd6c6578706572696d656e74616cf564736f6c63430005110040

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

0000000000000000000000001d8f58d89c46562d9e6050c8ad0eec93dc8a2db3

-----Decoded View---------------
Arg [0] : settingsAddress (address): 0x1D8F58d89C46562D9e6050c8ad0EEc93Dc8A2Db3

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001d8f58d89c46562d9e6050c8ad0eec93dc8a2db3


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

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.