ETH Price: $3,567.90 (+2.78%)

Contract

0xC51aeDBEC3aCD26650a7E85B6909E8AEc4d0F19e
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x6080604045525472022-03-17 21:03:08825 days ago1647550988IN
 Create: FuturesMarketData
0 ETH0.000001950.001

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FuturesMarketData

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 optimistic.etherscan.io on 2022-03-17
*/

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

* Synthetix: FuturesMarketData.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/FuturesMarketData.sol
* Docs: https://docs.synthetix.io/contracts/FuturesMarketData
*
* Contract Dependencies: (none)
* Libraries: (none)
*
* 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.5.16;

interface IFuturesMarketBaseTypes {
    /* ========== TYPES ========== */

    enum Status {
        Ok,
        InvalidPrice,
        PriceOutOfBounds,
        CanLiquidate,
        CannotLiquidate,
        MaxMarketSizeExceeded,
        MaxLeverageExceeded,
        InsufficientMargin,
        NotPermitted,
        NilOrder,
        NoPositionOpen,
        PriceTooVolatile
    }

    // If margin/size are positive, the position is long; if negative then it is short.
    struct Position {
        uint64 id;
        uint64 lastFundingIndex;
        uint128 margin;
        uint128 lastPrice;
        int128 size;
    }

    // next-price order storage
    struct NextPriceOrder {
        int128 sizeDelta; // difference in position to pass to modifyPosition
        uint128 targetRoundId; // price oracle roundId using which price this order needs to exucted
        uint128 commitDeposit; // the commitDeposit paid upon submitting that needs to be refunded if order succeeds
        uint128 keeperDeposit; // the keeperDeposit paid upon submitting that needs to be paid / refunded on tx confirmation
        bytes32 trackingCode; // tracking code to emit on execution for volume source fee sharing
    }
}


interface IFuturesMarket {
    /* ========== FUNCTION INTERFACE ========== */

    /* ---------- Market Details ---------- */

    function marketKey() external view returns (bytes32 key);

    function baseAsset() external view returns (bytes32 key);

    function marketSize() external view returns (uint128 size);

    function marketSkew() external view returns (int128 skew);

    function fundingLastRecomputed() external view returns (uint32 timestamp);

    function fundingSequence(uint index) external view returns (int128 netFunding);

    function positions(address account)
        external
        view
        returns (
            uint64 id,
            uint64 fundingIndex,
            uint128 margin,
            uint128 lastPrice,
            int128 size
        );

    function assetPrice() external view returns (uint price, bool invalid);

    function marketSizes() external view returns (uint long, uint short);

    function marketDebt() external view returns (uint debt, bool isInvalid);

    function currentFundingRate() external view returns (int fundingRate);

    function unrecordedFunding() external view returns (int funding, bool invalid);

    function fundingSequenceLength() external view returns (uint length);

    /* ---------- Position Details ---------- */

    function notionalValue(address account) external view returns (int value, bool invalid);

    function profitLoss(address account) external view returns (int pnl, bool invalid);

    function accruedFunding(address account) external view returns (int funding, bool invalid);

    function remainingMargin(address account) external view returns (uint marginRemaining, bool invalid);

    function accessibleMargin(address account) external view returns (uint marginAccessible, bool invalid);

    function liquidationPrice(address account) external view returns (uint price, bool invalid);

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

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

    function orderFee(int sizeDelta) external view returns (uint fee, bool invalid);

    function postTradeDetails(int sizeDelta, address sender)
        external
        view
        returns (
            uint margin,
            int size,
            uint price,
            uint liqPrice,
            uint fee,
            IFuturesMarketBaseTypes.Status status
        );

    /* ---------- Market Operations ---------- */

    function recomputeFunding() external returns (uint lastIndex);

    function transferMargin(int marginDelta) external;

    function withdrawAllMargin() external;

    function modifyPosition(int sizeDelta) external;

    function modifyPositionWithTracking(int sizeDelta, bytes32 trackingCode) external;

    function submitNextPriceOrder(int sizeDelta) external;

    function submitNextPriceOrderWithTracking(int sizeDelta, bytes32 trackingCode) external;

    function cancelNextPriceOrder(address account) external;

    function executeNextPriceOrder(address account) external;

    function closePosition() external;

    function closePositionWithTracking(bytes32 trackingCode) external;

    function liquidatePosition(address account) external;
}


interface IFuturesMarketManager {
    function markets(uint index, uint pageSize) external view returns (address[] memory);

    function numMarkets() external view returns (uint);

    function allMarkets() external view returns (address[] memory);

    function marketForKey(bytes32 marketKey) external view returns (address);

    function marketsForKeys(bytes32[] calldata marketKeys) external view returns (address[] memory);

    function totalDebt() external view returns (uint debt, bool isInvalid);
}


interface IFuturesMarketSettings {
    struct Parameters {
        uint takerFee;
        uint makerFee;
        uint takerFeeNextPrice;
        uint makerFeeNextPrice;
        uint nextPriceConfirmWindow;
        uint maxLeverage;
        uint maxMarketValueUSD;
        uint maxFundingRate;
        uint skewScaleUSD;
    }

    function takerFee(bytes32 _baseAsset) external view returns (uint);

    function makerFee(bytes32 _baseAsset) external view returns (uint);

    function takerFeeNextPrice(bytes32 _baseAsset) external view returns (uint);

    function makerFeeNextPrice(bytes32 _baseAsset) external view returns (uint);

    function nextPriceConfirmWindow(bytes32 _baseAsset) external view returns (uint);

    function maxLeverage(bytes32 _baseAsset) external view returns (uint);

    function maxMarketValueUSD(bytes32 _baseAsset) external view returns (uint);

    function maxFundingRate(bytes32 _baseAsset) external view returns (uint);

    function skewScaleUSD(bytes32 _baseAsset) external view returns (uint);

    function parameters(bytes32 _baseAsset)
        external
        view
        returns (
            uint _takerFee,
            uint _makerFee,
            uint _takerFeeNextPrice,
            uint _makerFeeNextPrice,
            uint _nextPriceConfirmWindow,
            uint _maxLeverage,
            uint _maxMarketValueUSD,
            uint _maxFundingRate,
            uint _skewScaleUSD
        );

    function minKeeperFee() external view returns (uint);

    function liquidationFeeRatio() external view returns (uint);

    function liquidationBufferRatio() external view returns (uint);

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


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

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

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


pragma experimental ABIEncoderV2;

// Internal references


// https://docs.synthetix.io/contracts/source/contracts/FuturesMarketData
// A utility contract to allow the front end to query market data in a single call.
contract FuturesMarketData {
    /* ========== TYPES ========== */

    struct FuturesGlobals {
        uint minInitialMargin;
        uint liquidationFeeRatio;
        uint liquidationBufferRatio;
        uint minKeeperFee;
    }

    struct MarketSummary {
        address market;
        bytes32 asset;
        bytes32 key;
        uint maxLeverage;
        uint price;
        uint marketSize;
        int marketSkew;
        uint marketDebt;
        int currentFundingRate;
        FeeRates feeRates;
    }

    struct MarketLimits {
        uint maxLeverage;
        uint maxMarketValueUSD;
    }

    struct Sides {
        uint long;
        uint short;
    }

    struct MarketSizeDetails {
        uint marketSize;
        FuturesMarketData.Sides sides;
        uint marketDebt;
        int marketSkew;
    }

    struct PriceDetails {
        uint price;
        bool invalid;
    }

    struct FundingParameters {
        uint maxFundingRate;
        uint skewScaleUSD;
    }

    struct FeeRates {
        uint takerFee;
        uint makerFee;
        uint takerFeeNextPrice;
        uint makerFeeNextPrice;
    }

    struct FundingDetails {
        int currentFundingRate;
        int unrecordedFunding;
        uint fundingLastRecomputed;
    }

    struct MarketData {
        address market;
        bytes32 baseAsset;
        bytes32 marketKey;
        FuturesMarketData.FeeRates feeRates;
        FuturesMarketData.MarketLimits limits;
        FuturesMarketData.FundingParameters fundingParameters;
        FuturesMarketData.MarketSizeDetails marketSizeDetails;
        FuturesMarketData.PriceDetails priceDetails;
    }

    struct PositionData {
        IFuturesMarketBaseTypes.Position position;
        int notionalValue;
        int profitLoss;
        int accruedFunding;
        uint remainingMargin;
        uint accessibleMargin;
        uint liquidationPrice;
        bool canLiquidatePosition;
    }

    /* ========== STORAGE VARIABLES ========== */

    IAddressResolver public resolverProxy;

    /* ========== CONSTRUCTOR ========== */

    constructor(IAddressResolver _resolverProxy) public {
        resolverProxy = _resolverProxy;
    }

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

    function _futuresMarketManager() internal view returns (IFuturesMarketManager) {
        return
            IFuturesMarketManager(
                resolverProxy.requireAndGetAddress("FuturesMarketManager", "Missing FuturesMarketManager Address")
            );
    }

    function _futuresMarketSettings() internal view returns (IFuturesMarketSettings) {
        return
            IFuturesMarketSettings(
                resolverProxy.requireAndGetAddress("FuturesMarketSettings", "Missing FuturesMarketSettings Address")
            );
    }

    function globals() external view returns (FuturesGlobals memory) {
        IFuturesMarketSettings settings = _futuresMarketSettings();
        return
            FuturesGlobals({
                minInitialMargin: settings.minInitialMargin(),
                liquidationFeeRatio: settings.liquidationFeeRatio(),
                liquidationBufferRatio: settings.liquidationBufferRatio(),
                minKeeperFee: settings.minKeeperFee()
            });
    }

    function parameters(bytes32 marketKey) external view returns (IFuturesMarketSettings.Parameters memory) {
        return _parameters(marketKey);
    }

    function _parameters(bytes32 marketKey) internal view returns (IFuturesMarketSettings.Parameters memory) {
        (
            uint takerFee,
            uint makerFee,
            uint takerFeeNextPrice,
            uint makerFeeNextPrice,
            uint nextPriceConfirmWindow,
            uint maxLeverage,
            uint maxMarketValueUSD,
            uint maxFundingRate,
            uint skewScaleUSD
        ) = _futuresMarketSettings().parameters(marketKey);
        return
            IFuturesMarketSettings.Parameters(
                takerFee,
                makerFee,
                takerFeeNextPrice,
                makerFeeNextPrice,
                nextPriceConfirmWindow,
                maxLeverage,
                maxMarketValueUSD,
                maxFundingRate,
                skewScaleUSD
            );
    }

    function _marketSummaries(address[] memory markets) internal view returns (MarketSummary[] memory) {
        uint numMarkets = markets.length;
        MarketSummary[] memory summaries = new MarketSummary[](numMarkets);
        for (uint i; i < numMarkets; i++) {
            IFuturesMarket market = IFuturesMarket(markets[i]);
            bytes32 marketKey = market.marketKey();
            bytes32 baseAsset = market.baseAsset();
            IFuturesMarketSettings.Parameters memory params = _parameters(marketKey);

            (uint price, ) = market.assetPrice();
            (uint debt, ) = market.marketDebt();

            summaries[i] = MarketSummary(
                address(market),
                baseAsset,
                marketKey,
                params.maxLeverage,
                price,
                market.marketSize(),
                market.marketSkew(),
                debt,
                market.currentFundingRate(),
                FeeRates(params.takerFee, params.makerFee, params.takerFeeNextPrice, params.makerFeeNextPrice)
            );
        }

        return summaries;
    }

    function marketSummaries(address[] calldata markets) external view returns (MarketSummary[] memory) {
        return _marketSummaries(markets);
    }

    function marketSummariesForKeys(bytes32[] calldata marketKeys) external view returns (MarketSummary[] memory) {
        return _marketSummaries(_futuresMarketManager().marketsForKeys(marketKeys));
    }

    function allMarketSummaries() external view returns (MarketSummary[] memory) {
        return _marketSummaries(_futuresMarketManager().allMarkets());
    }

    function _fundingParameters(IFuturesMarketSettings.Parameters memory params)
        internal
        pure
        returns (FundingParameters memory)
    {
        return FundingParameters(params.maxFundingRate, params.skewScaleUSD);
    }

    function _marketSizes(IFuturesMarket market) internal view returns (Sides memory) {
        (uint long, uint short) = market.marketSizes();
        return Sides(long, short);
    }

    function _marketDetails(IFuturesMarket market) internal view returns (MarketData memory) {
        (uint price, bool invalid) = market.assetPrice();
        (uint marketDebt, ) = market.marketDebt();
        bytes32 baseAsset = market.baseAsset();
        bytes32 marketKey = market.marketKey();

        IFuturesMarketSettings.Parameters memory params = _parameters(marketKey);

        return
            MarketData(
                address(market),
                baseAsset,
                marketKey,
                FeeRates(params.takerFee, params.makerFee, params.takerFeeNextPrice, params.makerFeeNextPrice),
                MarketLimits(params.maxLeverage, params.maxMarketValueUSD),
                _fundingParameters(params),
                MarketSizeDetails(market.marketSize(), _marketSizes(market), marketDebt, market.marketSkew()),
                PriceDetails(price, invalid)
            );
    }

    function marketDetails(IFuturesMarket market) external view returns (MarketData memory) {
        return _marketDetails(market);
    }

    function marketDetailsForKey(bytes32 marketKey) external view returns (MarketData memory) {
        return _marketDetails(IFuturesMarket(_futuresMarketManager().marketForKey(marketKey)));
    }

    function _position(IFuturesMarket market, address account)
        internal
        view
        returns (IFuturesMarketBaseTypes.Position memory)
    {
        (
            uint64 positionId,
            uint64 positionEntryIndex,
            uint128 positionMargin,
            uint128 positionEntryPrice,
            int128 positionSize
        ) = market.positions(account);
        return
            IFuturesMarketBaseTypes.Position(
                positionId,
                positionEntryIndex,
                positionMargin,
                positionEntryPrice,
                positionSize
            );
    }

    function _notionalValue(IFuturesMarket market, address account) internal view returns (int) {
        (int value, ) = market.notionalValue(account);
        return value;
    }

    function _profitLoss(IFuturesMarket market, address account) internal view returns (int) {
        (int value, ) = market.profitLoss(account);
        return value;
    }

    function _accruedFunding(IFuturesMarket market, address account) internal view returns (int) {
        (int value, ) = market.accruedFunding(account);
        return value;
    }

    function _remainingMargin(IFuturesMarket market, address account) internal view returns (uint) {
        (uint value, ) = market.remainingMargin(account);
        return value;
    }

    function _accessibleMargin(IFuturesMarket market, address account) internal view returns (uint) {
        (uint value, ) = market.accessibleMargin(account);
        return value;
    }

    function _liquidationPrice(IFuturesMarket market, address account) internal view returns (uint) {
        (uint liquidationPrice, ) = market.liquidationPrice(account);
        return liquidationPrice;
    }

    function _positionDetails(IFuturesMarket market, address account) internal view returns (PositionData memory) {
        return
            PositionData(
                _position(market, account),
                _notionalValue(market, account),
                _profitLoss(market, account),
                _accruedFunding(market, account),
                _remainingMargin(market, account),
                _accessibleMargin(market, account),
                _liquidationPrice(market, account),
                market.canLiquidate(account)
            );
    }

    function positionDetails(IFuturesMarket market, address account) external view returns (PositionData memory) {
        return _positionDetails(market, account);
    }

    function positionDetailsForMarketKey(bytes32 marketKey, address account) external view returns (PositionData memory) {
        return _positionDetails(IFuturesMarket(_futuresMarketManager().marketForKey(marketKey)), account);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IAddressResolver","name":"_resolverProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[],"name":"allMarketSummaries","outputs":[{"components":[{"internalType":"address","name":"market","type":"address"},{"internalType":"bytes32","name":"asset","type":"bytes32"},{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"marketSize","type":"uint256"},{"internalType":"int256","name":"marketSkew","type":"int256"},{"internalType":"uint256","name":"marketDebt","type":"uint256"},{"internalType":"int256","name":"currentFundingRate","type":"int256"},{"components":[{"internalType":"uint256","name":"takerFee","type":"uint256"},{"internalType":"uint256","name":"makerFee","type":"uint256"},{"internalType":"uint256","name":"takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"makerFeeNextPrice","type":"uint256"}],"internalType":"struct FuturesMarketData.FeeRates","name":"feeRates","type":"tuple"}],"internalType":"struct FuturesMarketData.MarketSummary[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"globals","outputs":[{"components":[{"internalType":"uint256","name":"minInitialMargin","type":"uint256"},{"internalType":"uint256","name":"liquidationFeeRatio","type":"uint256"},{"internalType":"uint256","name":"liquidationBufferRatio","type":"uint256"},{"internalType":"uint256","name":"minKeeperFee","type":"uint256"}],"internalType":"struct FuturesMarketData.FuturesGlobals","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"contract IFuturesMarket","name":"market","type":"address"}],"name":"marketDetails","outputs":[{"components":[{"internalType":"address","name":"market","type":"address"},{"internalType":"bytes32","name":"baseAsset","type":"bytes32"},{"internalType":"bytes32","name":"marketKey","type":"bytes32"},{"components":[{"internalType":"uint256","name":"takerFee","type":"uint256"},{"internalType":"uint256","name":"makerFee","type":"uint256"},{"internalType":"uint256","name":"takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"makerFeeNextPrice","type":"uint256"}],"internalType":"struct FuturesMarketData.FeeRates","name":"feeRates","type":"tuple"},{"components":[{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"maxMarketValueUSD","type":"uint256"}],"internalType":"struct FuturesMarketData.MarketLimits","name":"limits","type":"tuple"},{"components":[{"internalType":"uint256","name":"maxFundingRate","type":"uint256"},{"internalType":"uint256","name":"skewScaleUSD","type":"uint256"}],"internalType":"struct FuturesMarketData.FundingParameters","name":"fundingParameters","type":"tuple"},{"components":[{"internalType":"uint256","name":"marketSize","type":"uint256"},{"components":[{"internalType":"uint256","name":"long","type":"uint256"},{"internalType":"uint256","name":"short","type":"uint256"}],"internalType":"struct FuturesMarketData.Sides","name":"sides","type":"tuple"},{"internalType":"uint256","name":"marketDebt","type":"uint256"},{"internalType":"int256","name":"marketSkew","type":"int256"}],"internalType":"struct FuturesMarketData.MarketSizeDetails","name":"marketSizeDetails","type":"tuple"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"invalid","type":"bool"}],"internalType":"struct FuturesMarketData.PriceDetails","name":"priceDetails","type":"tuple"}],"internalType":"struct FuturesMarketData.MarketData","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"marketKey","type":"bytes32"}],"name":"marketDetailsForKey","outputs":[{"components":[{"internalType":"address","name":"market","type":"address"},{"internalType":"bytes32","name":"baseAsset","type":"bytes32"},{"internalType":"bytes32","name":"marketKey","type":"bytes32"},{"components":[{"internalType":"uint256","name":"takerFee","type":"uint256"},{"internalType":"uint256","name":"makerFee","type":"uint256"},{"internalType":"uint256","name":"takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"makerFeeNextPrice","type":"uint256"}],"internalType":"struct FuturesMarketData.FeeRates","name":"feeRates","type":"tuple"},{"components":[{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"maxMarketValueUSD","type":"uint256"}],"internalType":"struct FuturesMarketData.MarketLimits","name":"limits","type":"tuple"},{"components":[{"internalType":"uint256","name":"maxFundingRate","type":"uint256"},{"internalType":"uint256","name":"skewScaleUSD","type":"uint256"}],"internalType":"struct FuturesMarketData.FundingParameters","name":"fundingParameters","type":"tuple"},{"components":[{"internalType":"uint256","name":"marketSize","type":"uint256"},{"components":[{"internalType":"uint256","name":"long","type":"uint256"},{"internalType":"uint256","name":"short","type":"uint256"}],"internalType":"struct FuturesMarketData.Sides","name":"sides","type":"tuple"},{"internalType":"uint256","name":"marketDebt","type":"uint256"},{"internalType":"int256","name":"marketSkew","type":"int256"}],"internalType":"struct FuturesMarketData.MarketSizeDetails","name":"marketSizeDetails","type":"tuple"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"invalid","type":"bool"}],"internalType":"struct FuturesMarketData.PriceDetails","name":"priceDetails","type":"tuple"}],"internalType":"struct FuturesMarketData.MarketData","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address[]","name":"markets","type":"address[]"}],"name":"marketSummaries","outputs":[{"components":[{"internalType":"address","name":"market","type":"address"},{"internalType":"bytes32","name":"asset","type":"bytes32"},{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"marketSize","type":"uint256"},{"internalType":"int256","name":"marketSkew","type":"int256"},{"internalType":"uint256","name":"marketDebt","type":"uint256"},{"internalType":"int256","name":"currentFundingRate","type":"int256"},{"components":[{"internalType":"uint256","name":"takerFee","type":"uint256"},{"internalType":"uint256","name":"makerFee","type":"uint256"},{"internalType":"uint256","name":"takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"makerFeeNextPrice","type":"uint256"}],"internalType":"struct FuturesMarketData.FeeRates","name":"feeRates","type":"tuple"}],"internalType":"struct FuturesMarketData.MarketSummary[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32[]","name":"marketKeys","type":"bytes32[]"}],"name":"marketSummariesForKeys","outputs":[{"components":[{"internalType":"address","name":"market","type":"address"},{"internalType":"bytes32","name":"asset","type":"bytes32"},{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"marketSize","type":"uint256"},{"internalType":"int256","name":"marketSkew","type":"int256"},{"internalType":"uint256","name":"marketDebt","type":"uint256"},{"internalType":"int256","name":"currentFundingRate","type":"int256"},{"components":[{"internalType":"uint256","name":"takerFee","type":"uint256"},{"internalType":"uint256","name":"makerFee","type":"uint256"},{"internalType":"uint256","name":"takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"makerFeeNextPrice","type":"uint256"}],"internalType":"struct FuturesMarketData.FeeRates","name":"feeRates","type":"tuple"}],"internalType":"struct FuturesMarketData.MarketSummary[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"marketKey","type":"bytes32"}],"name":"parameters","outputs":[{"components":[{"internalType":"uint256","name":"takerFee","type":"uint256"},{"internalType":"uint256","name":"makerFee","type":"uint256"},{"internalType":"uint256","name":"takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"makerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"nextPriceConfirmWindow","type":"uint256"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"maxMarketValueUSD","type":"uint256"},{"internalType":"uint256","name":"maxFundingRate","type":"uint256"},{"internalType":"uint256","name":"skewScaleUSD","type":"uint256"}],"internalType":"struct IFuturesMarketSettings.Parameters","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"contract IFuturesMarket","name":"market","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"positionDetails","outputs":[{"components":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint64","name":"lastFundingIndex","type":"uint64"},{"internalType":"uint128","name":"margin","type":"uint128"},{"internalType":"uint128","name":"lastPrice","type":"uint128"},{"internalType":"int128","name":"size","type":"int128"}],"internalType":"struct IFuturesMarketBaseTypes.Position","name":"position","type":"tuple"},{"internalType":"int256","name":"notionalValue","type":"int256"},{"internalType":"int256","name":"profitLoss","type":"int256"},{"internalType":"int256","name":"accruedFunding","type":"int256"},{"internalType":"uint256","name":"remainingMargin","type":"uint256"},{"internalType":"uint256","name":"accessibleMargin","type":"uint256"},{"internalType":"uint256","name":"liquidationPrice","type":"uint256"},{"internalType":"bool","name":"canLiquidatePosition","type":"bool"}],"internalType":"struct FuturesMarketData.PositionData","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"marketKey","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"positionDetailsForMarketKey","outputs":[{"components":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint64","name":"lastFundingIndex","type":"uint64"},{"internalType":"uint128","name":"margin","type":"uint128"},{"internalType":"uint128","name":"lastPrice","type":"uint128"},{"internalType":"int128","name":"size","type":"int128"}],"internalType":"struct IFuturesMarketBaseTypes.Position","name":"position","type":"tuple"},{"internalType":"int256","name":"notionalValue","type":"int256"},{"internalType":"int256","name":"profitLoss","type":"int256"},{"internalType":"int256","name":"accruedFunding","type":"int256"},{"internalType":"uint256","name":"remainingMargin","type":"uint256"},{"internalType":"uint256","name":"accessibleMargin","type":"uint256"},{"internalType":"uint256","name":"liquidationPrice","type":"uint256"},{"internalType":"bool","name":"canLiquidatePosition","type":"bool"}],"internalType":"struct FuturesMarketData.PositionData","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolverProxy","outputs":[{"internalType":"contract IAddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620022e8380380620022e883398101604081905262000034916200006d565b600080546001600160a01b0319166001600160a01b0392909216919091179055620000d6565b80516200006781620000bc565b92915050565b6000602082840312156200008057600080fd5b60006200008e84846200005a565b949350505050565b60006200006782620000b0565b6000620000678262000096565b6001600160a01b031690565b620000c781620000a3565b8114620000d357600080fd5b50565b61220280620000e66000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806383ce90221161006657806383ce902214610136578063985f289e14610149578063a9e0bef71461015c578063c1d1df561461016f578063c3124525146101825761009e565b806302506804146100a35780633c88ee18146100cc5780636a59e495146100e1578063730e0037146100f6578063808bad3414610116575b600080fd5b6100b66100b13660046117e3565b610197565b6040516100c391906120a4565b60405180910390f35b6100d46101ae565b6040516100c3919061201e565b6100e9610239565b6040516100c3919061203d565b610109610104366004611859565b610248565b6040516100c39190612095565b610129610124366004611877565b610259565b6040516100c391906120b3565b6100d461014436600461174e565b610272565b61012961015736600461181f565b6102c3565b6100d461016a36600461174e565b610357565b61010961017d3660046117e3565b610395565b61018a610428565b6040516100c39190612087565b61019f6113ea565b6101a882610622565b92915050565b60606102346101bb61070d565b6001600160a01b031663375a7cba6040518163ffffffff1660e01b815260040160006040518083038186803b1580156101f357600080fd5b505afa158015610207573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261022f9190810190611790565b61078c565b905090565b6000546001600160a01b031681565b610250611436565b6101a882610bee565b610261611499565b61026b8383610fad565b9392505050565b606061026b61027f61070d565b6001600160a01b0316628d3aca85856040518363ffffffff1660e01b81526004016102ab92919061200c565b60006040518083038186803b1580156101f357600080fd5b6102cb611499565b61026b6102d661070d565b6001600160a01b031663e63bfadb856040518263ffffffff1660e01b8152600401610301919061202f565b60206040518083038186803b15801561031957600080fd5b505afa15801561032d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103519190810190611728565b83610fad565b606061026b83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061078c92505050565b61039d611436565b6101a86103a861070d565b6001600160a01b031663e63bfadb846040518263ffffffff1660e01b81526004016103d3919061202f565b60206040518083038186803b1580156103eb57600080fd5b505afa1580156103ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104239190810190611728565b610bee565b6104306114e6565b600061043a6110b1565b90506040518060800160405280826001600160a01b0316638f20f2ea6040518163ffffffff1660e01b815260040160206040518083038186803b15801561048057600080fd5b505afa158015610494573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104b89190810190611801565b8152602001826001600160a01b031663cfe711036040518163ffffffff1660e01b815260040160206040518083038186803b1580156104f657600080fd5b505afa15801561050a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061052e9190810190611801565b8152602001826001600160a01b03166354e67b566040518163ffffffff1660e01b815260040160206040518083038186803b15801561056c57600080fd5b505afa158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105a49190810190611801565b8152602001826001600160a01b031663139955026040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e257600080fd5b505afa1580156105f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061061a9190810190611801565b905291505090565b61062a6113ea565b60008060008060008060008060006106406110b1565b6001600160a01b031663025068048c6040518263ffffffff1660e01b815260040161066b919061202f565b6101206040518083038186803b15801561068457600080fd5b505afa158015610698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506106bc9190810190611932565b6040805161012081018252998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e08301526101008201529b9a5050505050505050505050565b6000805460405163dacb2d0160e01b81526001600160a01b039091169063dacb2d019061073c9060040161204b565b60206040518083038186803b15801561075457600080fd5b505afa158015610768573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506102349190810190611728565b60606000825190506060816040519080825280602002602001820160405280156107d057816020015b6107bd61150e565b8152602001906001900390816107b55790505b50905060005b82811015610be65760008582815181106107ec57fe5b602002602001015190506000816001600160a01b031663d7103a466040518163ffffffff1660e01b815260040160206040518083038186803b15801561083157600080fd5b505afa158015610845573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108699190810190611801565b90506000826001600160a01b031663cdf456e16040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a657600080fd5b505afa1580156108ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108de9190810190611801565b90506108e86113ea565b6108f183610622565b90506000846001600160a01b031663d24378eb6040518163ffffffff1660e01b8152600401604080518083038186803b15801561092d57600080fd5b505afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061096591908101906118b4565b5090506000856001600160a01b031663e8c634706040518163ffffffff1660e01b8152600401604080518083038186803b1580156109a257600080fd5b505afa1580156109b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109da91908101906118b4565b509050604051806101400160405280876001600160a01b031681526020018581526020018681526020018460a001518152602001838152602001876001600160a01b031663eb56105d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a4d57600080fd5b505afa158015610a61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a8591908101906118e4565b6001600160801b03168152602001876001600160a01b0316632b58ecef6040518163ffffffff1660e01b815260040160206040518083038186803b158015610acc57600080fd5b505afa158015610ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b049190810190611896565b600f0b8152602001828152602001876001600160a01b0316633aef4d0b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4b57600080fd5b505afa158015610b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b839190810190611801565b815260200160405180608001604052808660000151815260200186602001518152602001866040015181526020018660600151815250815250888881518110610bc857fe5b602002602001018190525050505050505080806001019150506107d6565b509392505050565b610bf6611436565b600080836001600160a01b031663d24378eb6040518163ffffffff1660e01b8152600401604080518083038186803b158015610c3157600080fd5b505afa158015610c45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c6991908101906118b4565b915091506000846001600160a01b031663e8c634706040518163ffffffff1660e01b8152600401604080518083038186803b158015610ca757600080fd5b505afa158015610cbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610cdf91908101906118b4565b5090506000856001600160a01b031663cdf456e16040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1d57600080fd5b505afa158015610d31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d559190810190611801565b90506000866001600160a01b031663d7103a466040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9257600080fd5b505afa158015610da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610dca9190810190611801565b9050610dd46113ea565b610ddd82610622565b9050604051806101000160405280896001600160a01b0316815260200184815260200183815260200160405180608001604052808460000151815260200184602001518152602001846040015181526020018460600151815250815260200160405180604001604052808460a0015181526020018460c001518152508152602001610e67836110e0565b815260200160405180608001604052808b6001600160a01b031663eb56105d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb057600080fd5b505afa158015610ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ee891908101906118e4565b6001600160801b03168152602001610eff8c611109565b81526020018781526020018b6001600160a01b0316632b58ecef6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4357600080fd5b505afa158015610f57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f7b9190810190611896565b600f0b815250815260200160405180604001604052808981526020018815158152508152509650505050505050919050565b610fb5611499565b604051806101000160405280610fcb858561119e565b8152602001610fda8585611278565b8152602001610fe985856112ff565b8152602001610ff8858561132e565b8152602001611007858561135d565b8152602001611016858561138c565b815260200161102585856113bb565b8152602001846001600160a01b031663b9f4ff55856040518263ffffffff1660e01b81526004016110569190611ffe565b60206040518083038186803b15801561106e57600080fd5b505afa158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110a691908101906117c5565b151590529392505050565b6000805460405163dacb2d0160e01b81526001600160a01b039091169063dacb2d019061073c90600401612069565b6110e8611570565b506040805180820190915260e0820151815261010090910151602082015290565b611111611570565b600080836001600160a01b0316635fc890c26040518163ffffffff1660e01b8152600401604080518083038186803b15801561114c57600080fd5b505afa158015611160573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111849190810190611902565b604080518082019091529182526020820152949350505050565b6111a661158a565b6000806000806000876001600160a01b03166355f57510886040518263ffffffff1660e01b81526004016111da9190611ffe565b60a06040518083038186803b1580156111f257600080fd5b505afa158015611206573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061122a91908101906119f6565b6040805160a08101825267ffffffffffffffff96871681529590941660208601526001600160801b0392831693850193909352166060830152600f0b60808201529550505050505092915050565b600080836001600160a01b031663b895daab846040518263ffffffff1660e01b81526004016112a79190611ffe565b604080518083038186803b1580156112be57600080fd5b505afa1580156112d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506112f691908101906118b4565b50949350505050565b600080836001600160a01b031663b111dfac846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b0316631bf556d0846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b0316639cfbf4e4846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b031663785cdeec846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b031663964db90c846040518263ffffffff1660e01b81526004016112a79190611ffe565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516101008101825260008082526020820181905291810191909152606081016114606114e6565b815260200161146d611570565b815260200161147a611570565b81526020016114876115b8565b81526020016114946115e6565b905290565b6040518061010001604052806114ad61158a565b81526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b60405180610140016040528060006001600160a01b0316815260200160008019168152602001600080191681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016114946114e6565b604051806040016040528060008152602001600081525090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b6040518060800160405280600081526020016115d2611570565b815260200160008152602001600081525090565b604080518082019091526000808252602082015290565b80356101a881612172565b80516101a881612172565b60008083601f84011261162557600080fd5b50813567ffffffffffffffff81111561163d57600080fd5b60208301915083602082028301111561165557600080fd5b9250929050565b600082601f83011261166d57600080fd5b815161168061167b826120e9565b6120c2565b915081818352602084019350602081019050838560208402820111156116a557600080fd5b60005b838110156116d157816116bb8882611608565b84525060209283019291909101906001016116a8565b5050505092915050565b80516101a881612189565b80356101a881612192565b80516101a881612192565b80356101a88161219b565b80516101a8816121a4565b80516101a8816121ad565b80516101a8816121b6565b60006020828403121561173a57600080fd5b60006117468484611608565b949350505050565b6000806020838503121561176157600080fd5b823567ffffffffffffffff81111561177857600080fd5b61178485828601611613565b92509250509250929050565b6000602082840312156117a257600080fd5b815167ffffffffffffffff8111156117b957600080fd5b6117468482850161165c565b6000602082840312156117d757600080fd5b600061174684846116db565b6000602082840312156117f557600080fd5b600061174684846116e6565b60006020828403121561181357600080fd5b600061174684846116f1565b6000806040838503121561183257600080fd5b600061183e85856116e6565b925050602061184f858286016115fd565b9150509250929050565b60006020828403121561186b57600080fd5b600061174684846116fc565b6000806040838503121561188a57600080fd5b600061183e85856116fc565b6000602082840312156118a857600080fd5b60006117468484611707565b600080604083850312156118c757600080fd5b60006118d385856116f1565b925050602061184f858286016116db565b6000602082840312156118f657600080fd5b60006117468484611712565b6000806040838503121561191557600080fd5b600061192185856116f1565b925050602061184f858286016116f1565b60008060008060008060008060006101208a8c03121561195157600080fd5b600061195d8c8c6116f1565b995050602061196e8c828d016116f1565b985050604061197f8c828d016116f1565b97505060606119908c828d016116f1565b96505060806119a18c828d016116f1565b95505060a06119b28c828d016116f1565b94505060c06119c38c828d016116f1565b93505060e06119d48c828d016116f1565b9250506101006119e68c828d016116f1565b9150509295985092959850929598565b600080600080600060a08688031215611a0e57600080fd5b6000611a1a888861171d565b9550506020611a2b8882890161171d565b9450506040611a3c88828901611712565b9350506060611a4d88828901611712565b9250506080611a5e88828901611707565b9150509295509295909350565b6000611a778383611d63565b50506101a00190565b611a898161211d565b82525050565b6000611a9b8385612114565b93506001600160fb1b03831115611ab157600080fd5b602083029250611ac2838584612166565b50500190565b6000611ad382612110565b611add8185612114565b9350611ae88361210a565b8060005b83811015611b16578151611b008882611a6b565b9750611b0b8361210a565b925050600101611aec565b509495945050505050565b611a8981612128565b611a898161212d565b611a8981612130565b611a898161213b565b6000611b52602483612114565b7f4d697373696e6720467574757265734d61726b65744d616e61676572204164648152637265737360e01b602082015260400192915050565b73233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b9052565b74467574757265734d61726b657453657474696e677360581b9052565b6000611bd1602583612114565b7f4d697373696e6720467574757265734d61726b657453657474696e6773204164815264647265737360d81b602082015260400192915050565b80516080830190611c1c8482611b2a565b506020820151611c2f6020850182611b2a565b506040820151611c426040850182611b2a565b506060820151611c556060850182611b2a565b50505050565b80516040830190611c6c8482611b2a565b506020820151611c556020850182611b2a565b8051610240830190611c918482611a80565b506020820151611ca46020850182611b2a565b506040820151611cb76040850182611b2a565b506060820151611cca6060850182611c0b565b506080820151611cdd60e0850182611c5b565b5060a0820151611cf1610120850182611c5b565b5060c0820151611d05610160850182611d19565b5060e0820151611c55610200850182611fc8565b805160a0830190611d2a8482611b2a565b506020820151611d3d6020850182611c5b565b506040820151611d506060850182611b2a565b506060820151611c556080850182611b2a565b80516101a0830190611d758482611a80565b506020820151611d886020850182611b2a565b506040820151611d9b6040850182611b2a565b506060820151611dae6060850182611b2a565b506080820151611dc16080850182611b2a565b5060a0820151611dd460a0850182611b2a565b5060c0820151611de760c0850182611b2a565b5060e0820151611dfa60e0850182611b2a565b50610100820151611e0f610100850182611b2a565b50610120820151611c55610120850182611c0b565b8051610120830190611e368482611b2a565b506020820151611e496020850182611b2a565b506040820151611e5c6040850182611b2a565b506060820151611e6f6060850182611b2a565b506080820151611e826080850182611b2a565b5060a0820151611e9560a0850182611b2a565b5060c0820151611ea860c0850182611b2a565b5060e0820151611ebb60e0850182611b2a565b50610100820151611c55610100850182611b2a565b8051610180830190611ee28482611f6b565b506020820151611ef560a0850182611b2a565b506040820151611f0860c0850182611b2a565b506060820151611f1b60e0850182611b2a565b506080820151611f2f610100850182611b2a565b5060a0820151611f43610120850182611b2a565b5060c0820151611f57610140850182611b2a565b5060e0820151611c55610160850182611b21565b805160a0830190611f7c8482611ff5565b506020820151611f8f6020850182611ff5565b506040820151611fa26040850182611fec565b506060820151611fb56060850182611fec565b506080820151611c556080850182611b3c565b80516040830190611fd98482611b2a565b506020820151611c556020850182611b21565b611a8981612141565b611a8981612159565b602081016101a88284611a80565b60208082528101611746818486611a8f565b6020808252810161026b8184611ac8565b602081016101a88284611b2a565b602081016101a88284611b33565b6040810161205882611b8b565b81810360208301526101a881611b45565b6040810161207682611ba7565b81810360208301526101a881611bc4565b608081016101a88284611c0b565b61024081016101a88284611c7f565b61012081016101a88284611e24565b61018081016101a88284611ed0565b60405181810167ffffffffffffffff811182821017156120e157600080fd5b604052919050565b600067ffffffffffffffff82111561210057600080fd5b5060209081020190565b60200190565b5190565b90815260200190565b60006101a88261214d565b151590565b90565b60006101a88261211d565b600f0b90565b6001600160801b031690565b6001600160a01b031690565b67ffffffffffffffff1690565b82818337506000910152565b61217b8161211d565b811461218657600080fd5b50565b61217b81612128565b61217b8161212d565b61217b81612130565b61217b8161213b565b61217b81612141565b61217b8161215956fea365627a7a7231582009a99ceadd53d9c3d9b3b0d28b80cb09fbec6096637c3cdca325afaac976ccac6c6578706572696d656e74616cf564736f6c634300051000400000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c806383ce90221161006657806383ce902214610136578063985f289e14610149578063a9e0bef71461015c578063c1d1df561461016f578063c3124525146101825761009e565b806302506804146100a35780633c88ee18146100cc5780636a59e495146100e1578063730e0037146100f6578063808bad3414610116575b600080fd5b6100b66100b13660046117e3565b610197565b6040516100c391906120a4565b60405180910390f35b6100d46101ae565b6040516100c3919061201e565b6100e9610239565b6040516100c3919061203d565b610109610104366004611859565b610248565b6040516100c39190612095565b610129610124366004611877565b610259565b6040516100c391906120b3565b6100d461014436600461174e565b610272565b61012961015736600461181f565b6102c3565b6100d461016a36600461174e565b610357565b61010961017d3660046117e3565b610395565b61018a610428565b6040516100c39190612087565b61019f6113ea565b6101a882610622565b92915050565b60606102346101bb61070d565b6001600160a01b031663375a7cba6040518163ffffffff1660e01b815260040160006040518083038186803b1580156101f357600080fd5b505afa158015610207573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261022f9190810190611790565b61078c565b905090565b6000546001600160a01b031681565b610250611436565b6101a882610bee565b610261611499565b61026b8383610fad565b9392505050565b606061026b61027f61070d565b6001600160a01b0316628d3aca85856040518363ffffffff1660e01b81526004016102ab92919061200c565b60006040518083038186803b1580156101f357600080fd5b6102cb611499565b61026b6102d661070d565b6001600160a01b031663e63bfadb856040518263ffffffff1660e01b8152600401610301919061202f565b60206040518083038186803b15801561031957600080fd5b505afa15801561032d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103519190810190611728565b83610fad565b606061026b83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061078c92505050565b61039d611436565b6101a86103a861070d565b6001600160a01b031663e63bfadb846040518263ffffffff1660e01b81526004016103d3919061202f565b60206040518083038186803b1580156103eb57600080fd5b505afa1580156103ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104239190810190611728565b610bee565b6104306114e6565b600061043a6110b1565b90506040518060800160405280826001600160a01b0316638f20f2ea6040518163ffffffff1660e01b815260040160206040518083038186803b15801561048057600080fd5b505afa158015610494573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104b89190810190611801565b8152602001826001600160a01b031663cfe711036040518163ffffffff1660e01b815260040160206040518083038186803b1580156104f657600080fd5b505afa15801561050a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061052e9190810190611801565b8152602001826001600160a01b03166354e67b566040518163ffffffff1660e01b815260040160206040518083038186803b15801561056c57600080fd5b505afa158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105a49190810190611801565b8152602001826001600160a01b031663139955026040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e257600080fd5b505afa1580156105f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061061a9190810190611801565b905291505090565b61062a6113ea565b60008060008060008060008060006106406110b1565b6001600160a01b031663025068048c6040518263ffffffff1660e01b815260040161066b919061202f565b6101206040518083038186803b15801561068457600080fd5b505afa158015610698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506106bc9190810190611932565b6040805161012081018252998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e08301526101008201529b9a5050505050505050505050565b6000805460405163dacb2d0160e01b81526001600160a01b039091169063dacb2d019061073c9060040161204b565b60206040518083038186803b15801561075457600080fd5b505afa158015610768573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506102349190810190611728565b60606000825190506060816040519080825280602002602001820160405280156107d057816020015b6107bd61150e565b8152602001906001900390816107b55790505b50905060005b82811015610be65760008582815181106107ec57fe5b602002602001015190506000816001600160a01b031663d7103a466040518163ffffffff1660e01b815260040160206040518083038186803b15801561083157600080fd5b505afa158015610845573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108699190810190611801565b90506000826001600160a01b031663cdf456e16040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a657600080fd5b505afa1580156108ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108de9190810190611801565b90506108e86113ea565b6108f183610622565b90506000846001600160a01b031663d24378eb6040518163ffffffff1660e01b8152600401604080518083038186803b15801561092d57600080fd5b505afa158015610941573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061096591908101906118b4565b5090506000856001600160a01b031663e8c634706040518163ffffffff1660e01b8152600401604080518083038186803b1580156109a257600080fd5b505afa1580156109b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109da91908101906118b4565b509050604051806101400160405280876001600160a01b031681526020018581526020018681526020018460a001518152602001838152602001876001600160a01b031663eb56105d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a4d57600080fd5b505afa158015610a61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a8591908101906118e4565b6001600160801b03168152602001876001600160a01b0316632b58ecef6040518163ffffffff1660e01b815260040160206040518083038186803b158015610acc57600080fd5b505afa158015610ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b049190810190611896565b600f0b8152602001828152602001876001600160a01b0316633aef4d0b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4b57600080fd5b505afa158015610b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b839190810190611801565b815260200160405180608001604052808660000151815260200186602001518152602001866040015181526020018660600151815250815250888881518110610bc857fe5b602002602001018190525050505050505080806001019150506107d6565b509392505050565b610bf6611436565b600080836001600160a01b031663d24378eb6040518163ffffffff1660e01b8152600401604080518083038186803b158015610c3157600080fd5b505afa158015610c45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c6991908101906118b4565b915091506000846001600160a01b031663e8c634706040518163ffffffff1660e01b8152600401604080518083038186803b158015610ca757600080fd5b505afa158015610cbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610cdf91908101906118b4565b5090506000856001600160a01b031663cdf456e16040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1d57600080fd5b505afa158015610d31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d559190810190611801565b90506000866001600160a01b031663d7103a466040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9257600080fd5b505afa158015610da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610dca9190810190611801565b9050610dd46113ea565b610ddd82610622565b9050604051806101000160405280896001600160a01b0316815260200184815260200183815260200160405180608001604052808460000151815260200184602001518152602001846040015181526020018460600151815250815260200160405180604001604052808460a0015181526020018460c001518152508152602001610e67836110e0565b815260200160405180608001604052808b6001600160a01b031663eb56105d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb057600080fd5b505afa158015610ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ee891908101906118e4565b6001600160801b03168152602001610eff8c611109565b81526020018781526020018b6001600160a01b0316632b58ecef6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4357600080fd5b505afa158015610f57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f7b9190810190611896565b600f0b815250815260200160405180604001604052808981526020018815158152508152509650505050505050919050565b610fb5611499565b604051806101000160405280610fcb858561119e565b8152602001610fda8585611278565b8152602001610fe985856112ff565b8152602001610ff8858561132e565b8152602001611007858561135d565b8152602001611016858561138c565b815260200161102585856113bb565b8152602001846001600160a01b031663b9f4ff55856040518263ffffffff1660e01b81526004016110569190611ffe565b60206040518083038186803b15801561106e57600080fd5b505afa158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110a691908101906117c5565b151590529392505050565b6000805460405163dacb2d0160e01b81526001600160a01b039091169063dacb2d019061073c90600401612069565b6110e8611570565b506040805180820190915260e0820151815261010090910151602082015290565b611111611570565b600080836001600160a01b0316635fc890c26040518163ffffffff1660e01b8152600401604080518083038186803b15801561114c57600080fd5b505afa158015611160573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111849190810190611902565b604080518082019091529182526020820152949350505050565b6111a661158a565b6000806000806000876001600160a01b03166355f57510886040518263ffffffff1660e01b81526004016111da9190611ffe565b60a06040518083038186803b1580156111f257600080fd5b505afa158015611206573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061122a91908101906119f6565b6040805160a08101825267ffffffffffffffff96871681529590941660208601526001600160801b0392831693850193909352166060830152600f0b60808201529550505050505092915050565b600080836001600160a01b031663b895daab846040518263ffffffff1660e01b81526004016112a79190611ffe565b604080518083038186803b1580156112be57600080fd5b505afa1580156112d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506112f691908101906118b4565b50949350505050565b600080836001600160a01b031663b111dfac846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b0316631bf556d0846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b0316639cfbf4e4846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b031663785cdeec846040518263ffffffff1660e01b81526004016112a79190611ffe565b600080836001600160a01b031663964db90c846040518263ffffffff1660e01b81526004016112a79190611ffe565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516101008101825260008082526020820181905291810191909152606081016114606114e6565b815260200161146d611570565b815260200161147a611570565b81526020016114876115b8565b81526020016114946115e6565b905290565b6040518061010001604052806114ad61158a565b81526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b60405180610140016040528060006001600160a01b0316815260200160008019168152602001600080191681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016114946114e6565b604051806040016040528060008152602001600081525090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b6040518060800160405280600081526020016115d2611570565b815260200160008152602001600081525090565b604080518082019091526000808252602082015290565b80356101a881612172565b80516101a881612172565b60008083601f84011261162557600080fd5b50813567ffffffffffffffff81111561163d57600080fd5b60208301915083602082028301111561165557600080fd5b9250929050565b600082601f83011261166d57600080fd5b815161168061167b826120e9565b6120c2565b915081818352602084019350602081019050838560208402820111156116a557600080fd5b60005b838110156116d157816116bb8882611608565b84525060209283019291909101906001016116a8565b5050505092915050565b80516101a881612189565b80356101a881612192565b80516101a881612192565b80356101a88161219b565b80516101a8816121a4565b80516101a8816121ad565b80516101a8816121b6565b60006020828403121561173a57600080fd5b60006117468484611608565b949350505050565b6000806020838503121561176157600080fd5b823567ffffffffffffffff81111561177857600080fd5b61178485828601611613565b92509250509250929050565b6000602082840312156117a257600080fd5b815167ffffffffffffffff8111156117b957600080fd5b6117468482850161165c565b6000602082840312156117d757600080fd5b600061174684846116db565b6000602082840312156117f557600080fd5b600061174684846116e6565b60006020828403121561181357600080fd5b600061174684846116f1565b6000806040838503121561183257600080fd5b600061183e85856116e6565b925050602061184f858286016115fd565b9150509250929050565b60006020828403121561186b57600080fd5b600061174684846116fc565b6000806040838503121561188a57600080fd5b600061183e85856116fc565b6000602082840312156118a857600080fd5b60006117468484611707565b600080604083850312156118c757600080fd5b60006118d385856116f1565b925050602061184f858286016116db565b6000602082840312156118f657600080fd5b60006117468484611712565b6000806040838503121561191557600080fd5b600061192185856116f1565b925050602061184f858286016116f1565b60008060008060008060008060006101208a8c03121561195157600080fd5b600061195d8c8c6116f1565b995050602061196e8c828d016116f1565b985050604061197f8c828d016116f1565b97505060606119908c828d016116f1565b96505060806119a18c828d016116f1565b95505060a06119b28c828d016116f1565b94505060c06119c38c828d016116f1565b93505060e06119d48c828d016116f1565b9250506101006119e68c828d016116f1565b9150509295985092959850929598565b600080600080600060a08688031215611a0e57600080fd5b6000611a1a888861171d565b9550506020611a2b8882890161171d565b9450506040611a3c88828901611712565b9350506060611a4d88828901611712565b9250506080611a5e88828901611707565b9150509295509295909350565b6000611a778383611d63565b50506101a00190565b611a898161211d565b82525050565b6000611a9b8385612114565b93506001600160fb1b03831115611ab157600080fd5b602083029250611ac2838584612166565b50500190565b6000611ad382612110565b611add8185612114565b9350611ae88361210a565b8060005b83811015611b16578151611b008882611a6b565b9750611b0b8361210a565b925050600101611aec565b509495945050505050565b611a8981612128565b611a898161212d565b611a8981612130565b611a898161213b565b6000611b52602483612114565b7f4d697373696e6720467574757265734d61726b65744d616e61676572204164648152637265737360e01b602082015260400192915050565b73233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b9052565b74467574757265734d61726b657453657474696e677360581b9052565b6000611bd1602583612114565b7f4d697373696e6720467574757265734d61726b657453657474696e6773204164815264647265737360d81b602082015260400192915050565b80516080830190611c1c8482611b2a565b506020820151611c2f6020850182611b2a565b506040820151611c426040850182611b2a565b506060820151611c556060850182611b2a565b50505050565b80516040830190611c6c8482611b2a565b506020820151611c556020850182611b2a565b8051610240830190611c918482611a80565b506020820151611ca46020850182611b2a565b506040820151611cb76040850182611b2a565b506060820151611cca6060850182611c0b565b506080820151611cdd60e0850182611c5b565b5060a0820151611cf1610120850182611c5b565b5060c0820151611d05610160850182611d19565b5060e0820151611c55610200850182611fc8565b805160a0830190611d2a8482611b2a565b506020820151611d3d6020850182611c5b565b506040820151611d506060850182611b2a565b506060820151611c556080850182611b2a565b80516101a0830190611d758482611a80565b506020820151611d886020850182611b2a565b506040820151611d9b6040850182611b2a565b506060820151611dae6060850182611b2a565b506080820151611dc16080850182611b2a565b5060a0820151611dd460a0850182611b2a565b5060c0820151611de760c0850182611b2a565b5060e0820151611dfa60e0850182611b2a565b50610100820151611e0f610100850182611b2a565b50610120820151611c55610120850182611c0b565b8051610120830190611e368482611b2a565b506020820151611e496020850182611b2a565b506040820151611e5c6040850182611b2a565b506060820151611e6f6060850182611b2a565b506080820151611e826080850182611b2a565b5060a0820151611e9560a0850182611b2a565b5060c0820151611ea860c0850182611b2a565b5060e0820151611ebb60e0850182611b2a565b50610100820151611c55610100850182611b2a565b8051610180830190611ee28482611f6b565b506020820151611ef560a0850182611b2a565b506040820151611f0860c0850182611b2a565b506060820151611f1b60e0850182611b2a565b506080820151611f2f610100850182611b2a565b5060a0820151611f43610120850182611b2a565b5060c0820151611f57610140850182611b2a565b5060e0820151611c55610160850182611b21565b805160a0830190611f7c8482611ff5565b506020820151611f8f6020850182611ff5565b506040820151611fa26040850182611fec565b506060820151611fb56060850182611fec565b506080820151611c556080850182611b3c565b80516040830190611fd98482611b2a565b506020820151611c556020850182611b21565b611a8981612141565b611a8981612159565b602081016101a88284611a80565b60208082528101611746818486611a8f565b6020808252810161026b8184611ac8565b602081016101a88284611b2a565b602081016101a88284611b33565b6040810161205882611b8b565b81810360208301526101a881611b45565b6040810161207682611ba7565b81810360208301526101a881611bc4565b608081016101a88284611c0b565b61024081016101a88284611c7f565b61012081016101a88284611e24565b61018081016101a88284611ed0565b60405181810167ffffffffffffffff811182821017156120e157600080fd5b604052919050565b600067ffffffffffffffff82111561210057600080fd5b5060209081020190565b60200190565b5190565b90815260200190565b60006101a88261214d565b151590565b90565b60006101a88261211d565b600f0b90565b6001600160801b031690565b6001600160a01b031690565b67ffffffffffffffff1690565b82818337506000910152565b61217b8161211d565b811461218657600080fd5b50565b61217b81612128565b61217b8161212d565b61217b81612130565b61217b8161213b565b61217b81612141565b61217b8161215956fea365627a7a7231582009a99ceadd53d9c3d9b3b0d28b80cb09fbec6096637c3cdca325afaac976ccac6c6578706572696d656e74616cf564736f6c63430005100040

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

0000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30

-----Decoded View---------------
Arg [0] : _resolverProxy (address): 0x1Cb059b7e74fD21665968C908806143E744D5F30

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


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.