ETH Price: $1,662.47 (+4.17%)
Gas: 20 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multi Chain

Transaction Hash
Method
Block
From
To
Value
Heartbeat173993842023-06-03 9:52:11117 days 7 hrs ago1685785931IN
0xee4650...6b617797
0 ETH0.001672121.1996885
Heartbeat173969922023-06-03 1:48:59117 days 15 hrs ago1685756939IN
0xee4650...6b617797
0 ETH0.002933723.59211191
Heartbeat173926132023-06-02 10:58:35118 days 6 hrs ago1685703515IN
0xee4650...6b617797
0 ETH0.0727742122
Heartbeat173926052023-06-02 10:56:59118 days 6 hrs ago1685703419IN
0xee4650...6b617797
0 ETH0.1208042622
Heartbeat173925152023-06-02 10:37:59118 days 6 hrs ago1685702279IN
0xee4650...6b617797
0 ETH0.1208042622
Heartbeat173925062023-06-02 10:36:11118 days 6 hrs ago1685702171IN
0xee4650...6b617797
0 ETH0.1208042622
Heartbeat173924702023-06-02 10:28:59118 days 6 hrs ago1685701739IN
0xee4650...6b617797
0 ETH0.1208042622
Heartbeat173924652023-06-02 10:27:59118 days 6 hrs ago1685701679IN
0xee4650...6b617797
0 ETH0.1208042622
Heartbeat173924562023-06-02 10:26:11118 days 6 hrs ago1685701571IN
0xee4650...6b617797
0 ETH0.1208042622
Heartbeat173896352023-06-02 0:54:35118 days 16 hrs ago1685667275IN
0xee4650...6b617797
0 ETH0.1208042622
Heartbeat173854182023-06-01 10:38:59119 days 6 hrs ago1685615939IN
0xee4650...6b617797
0 ETH0.1370795724.9639423
Heartbeat173024822023-05-20 18:41:35130 days 22 hrs ago1684608095IN
0xee4650...6b617797
0 ETH0.1282797828
Heartbeat173009982023-05-20 13:41:35131 days 3 hrs ago1684590095IN
0xee4650...6b617797
0 ETH0.1466054732
Heartbeat173009972023-05-20 13:41:23131 days 3 hrs ago1684590083IN
0xee4650...6b617797
0 ETH0.1466054732
Heartbeat173000962023-05-20 10:38:11131 days 6 hrs ago1684579091IN
0xee4650...6b617797
0 ETH0.3034802733.72003
Heartbeat172935912023-05-19 12:39:47132 days 4 hrs ago1684499987IN
0xee4650...6b617797
0 ETH0.1931566838.63133703
Heartbeat163059702022-12-31 16:34:59271 days 40 mins ago1672504499IN
0xee4650...6b617797
0 ETH0.0031283915.64197419
Heartbeat163059492022-12-31 16:30:47271 days 44 mins ago1672504247IN
0xee4650...6b617797
0 ETH0.0017168817.16881623
Heartbeat143910972022-03-15 12:14:04562 days 5 hrs ago1647346444IN
0xee4650...6b617797
0 ETH0.0185857614.22252357
Heartbeat143321182022-03-06 7:53:32571 days 9 hrs ago1646553212IN
0xee4650...6b617797
0 ETH0.0426154723.58281851
Heartbeat142482702022-02-21 8:16:13584 days 8 hrs ago1645431373IN
0xee4650...6b617797
0 ETH0.0512660657.1231915
Heartbeat142066322022-02-14 21:24:41590 days 19 hrs ago1644873881IN
0xee4650...6b617797
0 ETH0.0123960572.99138581
Heartbeat141997692022-02-13 19:45:14591 days 21 hrs ago1644781514IN
0xee4650...6b617797
0 ETH0.0077719962.5004917
Heartbeat141946222022-02-13 0:48:09592 days 16 hrs ago1644713289IN
0xee4650...6b617797
0 ETH0.1101881748.71582288
Heartbeat140887612022-01-27 16:27:25609 days 47 mins ago1643300845IN
0xee4650...6b617797
0 ETH0.03070853180.82033073
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AragonCourt

Compiler Version
v0.5.8+commit.23d335f2

Optimization Enabled:
Yes with 5000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-11-28
*/

/**
* Commit sha: c7bf36f004a2b0e11d7e14234cea7853fd3a523a
* GitHub repository: https://github.com/aragon/aragon-court
* Tool used for the deploy: https://github.com/aragon/aragon-network-deploy
**/

// File: ../../aragon-court/contracts/lib/os/Uint256Helpers.sol

// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/Uint256Helpers.sol
// Adapted to use pragma ^0.5.8 and satisfy our linter rules

pragma solidity ^0.5.8;


library Uint256Helpers {
    uint256 private constant MAX_UINT8 = uint8(-1);
    uint256 private constant MAX_UINT64 = uint64(-1);

    string private constant ERROR_UINT8_NUMBER_TOO_BIG = "UINT8_NUMBER_TOO_BIG";
    string private constant ERROR_UINT64_NUMBER_TOO_BIG = "UINT64_NUMBER_TOO_BIG";

    function toUint8(uint256 a) internal pure returns (uint8) {
        require(a <= MAX_UINT8, ERROR_UINT8_NUMBER_TOO_BIG);
        return uint8(a);
    }

    function toUint64(uint256 a) internal pure returns (uint64) {
        require(a <= MAX_UINT64, ERROR_UINT64_NUMBER_TOO_BIG);
        return uint64(a);
    }
}

// File: ../../aragon-court/contracts/lib/os/SafeMath64.sol

// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/math/SafeMath64.sol
// Adapted to use pragma ^0.5.8 and satisfy our linter rules

pragma solidity ^0.5.8;


/**
 * @title SafeMath64
 * @dev Math operations for uint64 with safety checks that revert on error
 */
library SafeMath64 {
    string private constant ERROR_ADD_OVERFLOW = "MATH64_ADD_OVERFLOW";
    string private constant ERROR_SUB_UNDERFLOW = "MATH64_SUB_UNDERFLOW";
    string private constant ERROR_MUL_OVERFLOW = "MATH64_MUL_OVERFLOW";
    string private constant ERROR_DIV_ZERO = "MATH64_DIV_ZERO";

    /**
    * @dev Multiplies two numbers, reverts on overflow.
    */
    function mul(uint64 _a, uint64 _b) internal pure returns (uint64) {
        uint256 c = uint256(_a) * uint256(_b);
        require(c < 0x010000000000000000, ERROR_MUL_OVERFLOW); // 2**64 (less gas this way)

        return uint64(c);
    }

    /**
    * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
    */
    function div(uint64 _a, uint64 _b) internal pure returns (uint64) {
        require(_b > 0, ERROR_DIV_ZERO); // Solidity only automatically asserts when dividing by 0
        uint64 c = _a / _b;
        // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold

        return c;
    }

    /**
    * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint64 _a, uint64 _b) internal pure returns (uint64) {
        require(_b <= _a, ERROR_SUB_UNDERFLOW);
        uint64 c = _a - _b;

        return c;
    }

    /**
    * @dev Adds two numbers, reverts on overflow.
    */
    function add(uint64 _a, uint64 _b) internal pure returns (uint64) {
        uint64 c = _a + _b;
        require(c >= _a, ERROR_ADD_OVERFLOW);

        return c;
    }

    /**
    * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
    * reverts when dividing by zero.
    */
    function mod(uint64 a, uint64 b) internal pure returns (uint64) {
        require(b != 0, ERROR_DIV_ZERO);
        return a % b;
    }
}

// File: ../../aragon-court/contracts/lib/os/TimeHelpers.sol

// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/TimeHelpers.sol
// Adapted to use pragma ^0.5.8 and satisfy our linter rules

pragma solidity ^0.5.8;



contract TimeHelpers {
    using Uint256Helpers for uint256;

    /**
    * @dev Returns the current block number.
    *      Using a function rather than `block.number` allows us to easily mock the block number in
    *      tests.
    */
    function getBlockNumber() internal view returns (uint256) {
        return block.number;
    }

    /**
    * @dev Returns the current block number, converted to uint64.
    *      Using a function rather than `block.number` allows us to easily mock the block number in
    *      tests.
    */
    function getBlockNumber64() internal view returns (uint64) {
        return getBlockNumber().toUint64();
    }

    /**
    * @dev Returns the current timestamp.
    *      Using a function rather than `block.timestamp` allows us to easily mock it in
    *      tests.
    */
    function getTimestamp() internal view returns (uint256) {
        return block.timestamp; // solium-disable-line security/no-block-members
    }

    /**
    * @dev Returns the current timestamp, converted to uint64.
    *      Using a function rather than `block.timestamp` allows us to easily mock it in
    *      tests.
    */
    function getTimestamp64() internal view returns (uint64) {
        return getTimestamp().toUint64();
    }
}

// File: ../../aragon-court/contracts/court/clock/IClock.sol

pragma solidity ^0.5.8;


interface IClock {
    /**
    * @dev Ensure that the current term of the clock is up-to-date
    * @return Identification number of the current term
    */
    function ensureCurrentTerm() external returns (uint64);

    /**
    * @dev Transition up to a certain number of terms to leave the clock up-to-date
    * @param _maxRequestedTransitions Max number of term transitions allowed by the sender
    * @return Identification number of the term ID after executing the heartbeat transitions
    */
    function heartbeat(uint64 _maxRequestedTransitions) external returns (uint64);

    /**
    * @dev Ensure that a certain term has its randomness set
    * @return Randomness of the current term
    */
    function ensureCurrentTermRandomness() external returns (bytes32);

    /**
    * @dev Tell the last ensured term identification number
    * @return Identification number of the last ensured term
    */
    function getLastEnsuredTermId() external view returns (uint64);

    /**
    * @dev Tell the current term identification number. Note that there may be pending term transitions.
    * @return Identification number of the current term
    */
    function getCurrentTermId() external view returns (uint64);

    /**
    * @dev Tell the number of terms the clock should transition to be up-to-date
    * @return Number of terms the clock should transition to be up-to-date
    */
    function getNeededTermTransitions() external view returns (uint64);

    /**
    * @dev Tell the information related to a term based on its ID
    * @param _termId ID of the term being queried
    * @return startTime Term start time
    * @return randomnessBN Block number used for randomness in the requested term
    * @return randomness Randomness computed for the requested term
    */
    function getTerm(uint64 _termId) external view returns (uint64 startTime, uint64 randomnessBN, bytes32 randomness);

    /**
    * @dev Tell the randomness of a term even if it wasn't computed yet
    * @param _termId Identification number of the term being queried
    * @return Randomness of the requested term
    */
    function getTermRandomness(uint64 _termId) external view returns (bytes32);
}

// File: ../../aragon-court/contracts/court/clock/CourtClock.sol

pragma solidity ^0.5.8;





contract CourtClock is IClock, TimeHelpers {
    using SafeMath64 for uint64;

    string private constant ERROR_TERM_DOES_NOT_EXIST = "CLK_TERM_DOES_NOT_EXIST";
    string private constant ERROR_TERM_DURATION_TOO_LONG = "CLK_TERM_DURATION_TOO_LONG";
    string private constant ERROR_TERM_RANDOMNESS_NOT_YET = "CLK_TERM_RANDOMNESS_NOT_YET";
    string private constant ERROR_TERM_RANDOMNESS_UNAVAILABLE = "CLK_TERM_RANDOMNESS_UNAVAILABLE";
    string private constant ERROR_BAD_FIRST_TERM_START_TIME = "CLK_BAD_FIRST_TERM_START_TIME";
    string private constant ERROR_TOO_MANY_TRANSITIONS = "CLK_TOO_MANY_TRANSITIONS";
    string private constant ERROR_INVALID_TRANSITION_TERMS = "CLK_INVALID_TRANSITION_TERMS";
    string private constant ERROR_CANNOT_DELAY_STARTED_COURT = "CLK_CANNOT_DELAY_STARTED_COURT";
    string private constant ERROR_CANNOT_DELAY_PAST_START_TIME = "CLK_CANNOT_DELAY_PAST_START_TIME";

    // Maximum number of term transitions a callee may have to assume in order to call certain functions that require the Court being up-to-date
    uint64 internal constant MAX_AUTO_TERM_TRANSITIONS_ALLOWED = 1;

    // Max duration in seconds that a term can last
    uint64 internal constant MAX_TERM_DURATION = 365 days;

    // Max time until first term starts since contract is deployed
    uint64 internal constant MAX_FIRST_TERM_DELAY_PERIOD = 2 * MAX_TERM_DURATION;

    struct Term {
        uint64 startTime;              // Timestamp when the term started
        uint64 randomnessBN;           // Block number for entropy
        bytes32 randomness;            // Entropy from randomnessBN block hash
    }

    // Duration in seconds for each term of the Court
    uint64 private termDuration;

    // Last ensured term id
    uint64 private termId;

    // List of Court terms indexed by id
    mapping (uint64 => Term) private terms;

    event Heartbeat(uint64 previousTermId, uint64 currentTermId);
    event StartTimeDelayed(uint64 previousStartTime, uint64 currentStartTime);

    /**
    * @dev Ensure a certain term has already been processed
    * @param _termId Identification number of the term to be checked
    */
    modifier termExists(uint64 _termId) {
        require(_termId <= termId, ERROR_TERM_DOES_NOT_EXIST);
        _;
    }

    /**
    * @dev Constructor function
    * @param _termParams Array containing:
    *        0. _termDuration Duration in seconds per term
    *        1. _firstTermStartTime Timestamp in seconds when the court will open (to give time for juror on-boarding)
    */
    constructor(uint64[2] memory _termParams) public {
        uint64 _termDuration = _termParams[0];
        uint64 _firstTermStartTime = _termParams[1];

        require(_termDuration < MAX_TERM_DURATION, ERROR_TERM_DURATION_TOO_LONG);
        require(_firstTermStartTime >= getTimestamp64() + _termDuration, ERROR_BAD_FIRST_TERM_START_TIME);
        require(_firstTermStartTime <= getTimestamp64() + MAX_FIRST_TERM_DELAY_PERIOD, ERROR_BAD_FIRST_TERM_START_TIME);

        termDuration = _termDuration;

        // No need for SafeMath: we already checked values above
        terms[0].startTime = _firstTermStartTime - _termDuration;
    }

    /**
    * @notice Ensure that the current term of the Court is up-to-date. If the Court is outdated by more than `MAX_AUTO_TERM_TRANSITIONS_ALLOWED`
    *         terms, the heartbeat function must be called manually instead.
    * @return Identification number of the current term
    */
    function ensureCurrentTerm() external returns (uint64) {
        return _ensureCurrentTerm();
    }

    /**
    * @notice Transition up to `_maxRequestedTransitions` terms
    * @param _maxRequestedTransitions Max number of term transitions allowed by the sender
    * @return Identification number of the term ID after executing the heartbeat transitions
    */
    function heartbeat(uint64 _maxRequestedTransitions) external returns (uint64) {
        return _heartbeat(_maxRequestedTransitions);
    }

    /**
    * @notice Ensure that a certain term has its randomness set. As we allow to draft disputes requested for previous terms, if there
    *      were mined more than 256 blocks for the current term, the blockhash of its randomness BN is no longer available, given
    *      round will be able to be drafted in the following term.
    * @return Randomness of the current term
    */
    function ensureCurrentTermRandomness() external returns (bytes32) {
        // If the randomness for the given term was already computed, return
        uint64 currentTermId = termId;
        Term storage term = terms[currentTermId];
        bytes32 termRandomness = term.randomness;
        if (termRandomness != bytes32(0)) {
            return termRandomness;
        }

        // Compute term randomness
        bytes32 newRandomness = _computeTermRandomness(currentTermId);
        require(newRandomness != bytes32(0), ERROR_TERM_RANDOMNESS_UNAVAILABLE);
        term.randomness = newRandomness;
        return newRandomness;
    }

    /**
    * @dev Tell the term duration of the Court
    * @return Duration in seconds of the Court term
    */
    function getTermDuration() external view returns (uint64) {
        return termDuration;
    }

    /**
    * @dev Tell the last ensured term identification number
    * @return Identification number of the last ensured term
    */
    function getLastEnsuredTermId() external view returns (uint64) {
        return _lastEnsuredTermId();
    }

    /**
    * @dev Tell the current term identification number. Note that there may be pending term transitions.
    * @return Identification number of the current term
    */
    function getCurrentTermId() external view returns (uint64) {
        return _currentTermId();
    }

    /**
    * @dev Tell the number of terms the Court should transition to be up-to-date
    * @return Number of terms the Court should transition to be up-to-date
    */
    function getNeededTermTransitions() external view returns (uint64) {
        return _neededTermTransitions();
    }

    /**
    * @dev Tell the information related to a term based on its ID. Note that if the term has not been reached, the
    *      information returned won't be computed yet. This function allows querying future terms that were not computed yet.
    * @param _termId ID of the term being queried
    * @return startTime Term start time
    * @return randomnessBN Block number used for randomness in the requested term
    * @return randomness Randomness computed for the requested term
    */
    function getTerm(uint64 _termId) external view returns (uint64 startTime, uint64 randomnessBN, bytes32 randomness) {
        Term storage term = terms[_termId];
        return (term.startTime, term.randomnessBN, term.randomness);
    }

    /**
    * @dev Tell the randomness of a term even if it wasn't computed yet
    * @param _termId Identification number of the term being queried
    * @return Randomness of the requested term
    */
    function getTermRandomness(uint64 _termId) external view termExists(_termId) returns (bytes32) {
        return _computeTermRandomness(_termId);
    }

    /**
    * @dev Internal function to ensure that the current term of the Court is up-to-date. If the Court is outdated by more than
    *      `MAX_AUTO_TERM_TRANSITIONS_ALLOWED` terms, the heartbeat function must be called manually.
    * @return Identification number of the resultant term ID after executing the corresponding transitions
    */
    function _ensureCurrentTerm() internal returns (uint64) {
        // Check the required number of transitions does not exceeds the max allowed number to be processed automatically
        uint64 requiredTransitions = _neededTermTransitions();
        require(requiredTransitions <= MAX_AUTO_TERM_TRANSITIONS_ALLOWED, ERROR_TOO_MANY_TRANSITIONS);

        // If there are no transitions pending, return the last ensured term id
        if (uint256(requiredTransitions) == 0) {
            return termId;
        }

        // Process transition if there is at least one pending
        return _heartbeat(requiredTransitions);
    }

    /**
    * @dev Internal function to transition the Court terms up to a requested number of terms
    * @param _maxRequestedTransitions Max number of term transitions allowed by the sender
    * @return Identification number of the resultant term ID after executing the requested transitions
    */
    function _heartbeat(uint64 _maxRequestedTransitions) internal returns (uint64) {
        // Transition the minimum number of terms between the amount requested and the amount actually needed
        uint64 neededTransitions = _neededTermTransitions();
        uint256 transitions = uint256(_maxRequestedTransitions < neededTransitions ? _maxRequestedTransitions : neededTransitions);
        require(transitions > 0, ERROR_INVALID_TRANSITION_TERMS);

        uint64 blockNumber = getBlockNumber64();
        uint64 previousTermId = termId;
        uint64 currentTermId = previousTermId;
        for (uint256 transition = 1; transition <= transitions; transition++) {
            // Term IDs are incremented by one based on the number of time periods since the Court started. Since time is represented in uint64,
            // even if we chose the minimum duration possible for a term (1 second), we can ensure terms will never reach 2^64 since time is
            // already assumed to fit in uint64.
            Term storage previousTerm = terms[currentTermId++];
            Term storage currentTerm = terms[currentTermId];
            _onTermTransitioned(currentTermId);

            // Set the start time of the new term. Note that we are using a constant term duration value to guarantee
            // equally long terms, regardless of heartbeats.
            currentTerm.startTime = previousTerm.startTime.add(termDuration);

            // In order to draft a random number of jurors in a term, we use a randomness factor for each term based on a
            // block number that is set once the term has started. Note that this information could not be known beforehand.
            currentTerm.randomnessBN = blockNumber + 1;
        }

        termId = currentTermId;
        emit Heartbeat(previousTermId, currentTermId);
        return currentTermId;
    }

    /**
    * @dev Internal function to delay the first term start time only if it wasn't reached yet
    * @param _newFirstTermStartTime New timestamp in seconds when the court will open
    */
    function _delayStartTime(uint64 _newFirstTermStartTime) internal {
        require(_currentTermId() == 0, ERROR_CANNOT_DELAY_STARTED_COURT);

        Term storage term = terms[0];
        uint64 currentFirstTermStartTime = term.startTime.add(termDuration);
        require(_newFirstTermStartTime > currentFirstTermStartTime, ERROR_CANNOT_DELAY_PAST_START_TIME);

        // No need for SafeMath: we already checked above that `_newFirstTermStartTime` > `currentFirstTermStartTime` >= `termDuration`
        term.startTime = _newFirstTermStartTime - termDuration;
        emit StartTimeDelayed(currentFirstTermStartTime, _newFirstTermStartTime);
    }

    /**
    * @dev Internal function to notify when a term has been transitioned. This function must be overridden to provide custom behavior.
    * @param _termId Identification number of the new current term that has been transitioned
    */
    function _onTermTransitioned(uint64 _termId) internal;

    /**
    * @dev Internal function to tell the last ensured term identification number
    * @return Identification number of the last ensured term
    */
    function _lastEnsuredTermId() internal view returns (uint64) {
        return termId;
    }

    /**
    * @dev Internal function to tell the current term identification number. Note that there may be pending term transitions.
    * @return Identification number of the current term
    */
    function _currentTermId() internal view returns (uint64) {
        return termId.add(_neededTermTransitions());
    }

    /**
    * @dev Internal function to tell the number of terms the Court should transition to be up-to-date
    * @return Number of terms the Court should transition to be up-to-date
    */
    function _neededTermTransitions() internal view returns (uint64) {
        // Note that the Court is always initialized providing a start time for the first-term in the future. If that's the case,
        // no term transitions are required.
        uint64 currentTermStartTime = terms[termId].startTime;
        if (getTimestamp64() < currentTermStartTime) {
            return uint64(0);
        }

        // No need for SafeMath: we already know that the start time of the current term is in the past
        return (getTimestamp64() - currentTermStartTime) / termDuration;
    }

    /**
    * @dev Internal function to compute the randomness that will be used to draft jurors for the given term. This
    *      function assumes the given term exists. To determine the randomness factor for a term we use the hash of a
    *      block number that is set once the term has started to ensure it cannot be known beforehand. Note that the
    *      hash function being used only works for the 256 most recent block numbers.
    * @param _termId Identification number of the term being queried
    * @return Randomness computed for the given term
    */
    function _computeTermRandomness(uint64 _termId) internal view returns (bytes32) {
        Term storage term = terms[_termId];
        require(getBlockNumber64() > term.randomnessBN, ERROR_TERM_RANDOMNESS_NOT_YET);
        return blockhash(term.randomnessBN);
    }
}

// File: ../../aragon-court/contracts/lib/os/ERC20.sol

// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/token/ERC20.sol
// Adapted to use pragma ^0.5.8 and satisfy our linter rules

pragma solidity ^0.5.8;


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 {
    function totalSupply() public view returns (uint256);

    function balanceOf(address _who) public view returns (uint256);

    function allowance(address _owner, address _spender) public view returns (uint256);

    function transfer(address _to, uint256 _value) public returns (bool);

    function approve(address _spender, uint256 _value) public returns (bool);

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool);

    event Transfer(
        address indexed from,
        address indexed to,
        uint256 value
    );

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

// File: ../../aragon-court/contracts/court/config/IConfig.sol

pragma solidity ^0.5.8;



interface IConfig {

    /**
    * @dev Tell the full Court configuration parameters at a certain term
    * @param _termId Identification number of the term querying the Court config of
    * @return token Address of the token used to pay for fees
    * @return fees Array containing:
    *         0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *         1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *         2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @return roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *         0. evidenceTerms Max submitting evidence period duration in terms
    *         1. commitTerms Commit period duration in terms
    *         2. revealTerms Reveal period duration in terms
    *         3. appealTerms Appeal period duration in terms
    *         4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @return pcts Array containing:
    *         0. penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    *         1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @return roundParams Array containing params for rounds:
    *         0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *         1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *         2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    * @return appealCollateralParams Array containing params for appeal collateral:
    *         0. appealCollateralFactor Multiple of dispute fees required to appeal a preliminary ruling
    *         1. appealConfirmCollateralFactor Multiple of dispute fees required to confirm appeal
    * @return minActiveBalance Minimum amount of tokens jurors have to activate to participate in the Court
    */
    function getConfig(uint64 _termId) external view
        returns (
            ERC20 feeToken,
            uint256[3] memory fees,
            uint64[5] memory roundStateDurations,
            uint16[2] memory pcts,
            uint64[4] memory roundParams,
            uint256[2] memory appealCollateralParams,
            uint256 minActiveBalance
        );

    /**
    * @dev Tell the draft config at a certain term
    * @param _termId Identification number of the term querying the draft config of
    * @return feeToken Address of the token used to pay for fees
    * @return draftFee Amount of fee tokens per juror to cover the drafting cost
    * @return penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    */
    function getDraftConfig(uint64 _termId) external view returns (ERC20 feeToken, uint256 draftFee, uint16 penaltyPct);

    /**
    * @dev Tell the min active balance config at a certain term
    * @param _termId Term querying the min active balance config of
    * @return Minimum amount of tokens jurors have to activate to participate in the Court
    */
    function getMinActiveBalance(uint64 _termId) external view returns (uint256);

    /**
    * @dev Tell whether a certain holder accepts automatic withdrawals of tokens or not
    * @return True if the given holder accepts automatic withdrawals of their tokens, false otherwise
    */
    function areWithdrawalsAllowedFor(address _holder) external view returns (bool);
}

// File: ../../aragon-court/contracts/court/config/CourtConfigData.sol

pragma solidity ^0.5.8;



contract CourtConfigData {
    struct Config {
        FeesConfig fees;                        // Full fees-related config
        DisputesConfig disputes;                // Full disputes-related config
        uint256 minActiveBalance;               // Minimum amount of tokens jurors have to activate to participate in the Court
    }

    struct FeesConfig {
        ERC20 token;                            // ERC20 token to be used for the fees of the Court
        uint16 finalRoundReduction;             // Permyriad of fees reduction applied for final appeal round (‱ - 1/10,000)
        uint256 jurorFee;                       // Amount of tokens paid to draft a juror to adjudicate a dispute
        uint256 draftFee;                       // Amount of tokens paid per round to cover the costs of drafting jurors
        uint256 settleFee;                      // Amount of tokens paid per round to cover the costs of slashing jurors
    }

    struct DisputesConfig {
        uint64 evidenceTerms;                   // Max submitting evidence period duration in terms
        uint64 commitTerms;                     // Committing period duration in terms
        uint64 revealTerms;                     // Revealing period duration in terms
        uint64 appealTerms;                     // Appealing period duration in terms
        uint64 appealConfirmTerms;              // Confirmation appeal period duration in terms
        uint16 penaltyPct;                      // Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
        uint64 firstRoundJurorsNumber;          // Number of jurors drafted on first round
        uint64 appealStepFactor;                // Factor in which the jurors number is increased on each appeal
        uint64 finalRoundLockTerms;             // Period a coherent juror in the final round will remain locked
        uint256 maxRegularAppealRounds;         // Before the final appeal
        uint256 appealCollateralFactor;         // Permyriad multiple of dispute fees required to appeal a preliminary ruling (‱ - 1/10,000)
        uint256 appealConfirmCollateralFactor;  // Permyriad multiple of dispute fees required to confirm appeal (‱ - 1/10,000)
    }

    struct DraftConfig {
        ERC20 feeToken;                         // ERC20 token to be used for the fees of the Court
        uint16 penaltyPct;                      // Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
        uint256 draftFee;                       // Amount of tokens paid per round to cover the costs of drafting jurors
    }
}

// File: ../../aragon-court/contracts/lib/os/SafeMath.sol

// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/lib/math/SafeMath.sol
// Adapted to use pragma ^0.5.8 and satisfy our linter rules

pragma solidity >=0.4.24 <0.6.0;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {
    string private constant ERROR_ADD_OVERFLOW = "MATH_ADD_OVERFLOW";
    string private constant ERROR_SUB_UNDERFLOW = "MATH_SUB_UNDERFLOW";
    string private constant ERROR_MUL_OVERFLOW = "MATH_MUL_OVERFLOW";
    string private constant ERROR_DIV_ZERO = "MATH_DIV_ZERO";

    /**
    * @dev Multiplies two numbers, reverts on overflow.
    */
    function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (_a == 0) {
            return 0;
        }

        uint256 c = _a * _b;
        require(c / _a == _b, ERROR_MUL_OVERFLOW);

        return c;
    }

    /**
    * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
    */
    function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
        require(_b > 0, ERROR_DIV_ZERO); // Solidity only automatically asserts when dividing by 0
        uint256 c = _a / _b;
        // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold

        return c;
    }

    /**
    * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
        require(_b <= _a, ERROR_SUB_UNDERFLOW);
        uint256 c = _a - _b;

        return c;
    }

    /**
    * @dev Adds two numbers, reverts on overflow.
    */
    function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
        uint256 c = _a + _b;
        require(c >= _a, ERROR_ADD_OVERFLOW);

        return c;
    }

    /**
    * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
    * reverts when dividing by zero.
    */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, ERROR_DIV_ZERO);
        return a % b;
    }
}

// File: ../../aragon-court/contracts/lib/PctHelpers.sol

pragma solidity ^0.5.8;



library PctHelpers {
    using SafeMath for uint256;

    uint256 internal constant PCT_BASE = 10000; // ‱ (1 / 10,000)

    function isValid(uint16 _pct) internal pure returns (bool) {
        return _pct <= PCT_BASE;
    }

    function pct(uint256 self, uint16 _pct) internal pure returns (uint256) {
        return self.mul(uint256(_pct)) / PCT_BASE;
    }

    function pct256(uint256 self, uint256 _pct) internal pure returns (uint256) {
        return self.mul(_pct) / PCT_BASE;
    }

    function pctIncrease(uint256 self, uint16 _pct) internal pure returns (uint256) {
        // No need for SafeMath: for addition note that `PCT_BASE` is lower than (2^256 - 2^16)
        return self.mul(PCT_BASE + uint256(_pct)) / PCT_BASE;
    }
}

// File: ../../aragon-court/contracts/court/config/CourtConfig.sol

pragma solidity ^0.5.8;







contract CourtConfig is IConfig, CourtConfigData {
    using SafeMath64 for uint64;
    using PctHelpers for uint256;

    string private constant ERROR_TOO_OLD_TERM = "CONF_TOO_OLD_TERM";
    string private constant ERROR_INVALID_PENALTY_PCT = "CONF_INVALID_PENALTY_PCT";
    string private constant ERROR_INVALID_FINAL_ROUND_REDUCTION_PCT = "CONF_INVALID_FINAL_ROUND_RED_PCT";
    string private constant ERROR_INVALID_MAX_APPEAL_ROUNDS = "CONF_INVALID_MAX_APPEAL_ROUNDS";
    string private constant ERROR_LARGE_ROUND_PHASE_DURATION = "CONF_LARGE_ROUND_PHASE_DURATION";
    string private constant ERROR_BAD_INITIAL_JURORS_NUMBER = "CONF_BAD_INITIAL_JURORS_NUMBER";
    string private constant ERROR_BAD_APPEAL_STEP_FACTOR = "CONF_BAD_APPEAL_STEP_FACTOR";
    string private constant ERROR_ZERO_COLLATERAL_FACTOR = "CONF_ZERO_COLLATERAL_FACTOR";
    string private constant ERROR_ZERO_MIN_ACTIVE_BALANCE = "CONF_ZERO_MIN_ACTIVE_BALANCE";

    // Max number of terms that each of the different adjudication states can last (if lasted 1h, this would be a year)
    uint64 internal constant MAX_ADJ_STATE_DURATION = 8670;

    // Cap the max number of regular appeal rounds
    uint256 internal constant MAX_REGULAR_APPEAL_ROUNDS_LIMIT = 10;

    // Future term ID in which a config change has been scheduled
    uint64 private configChangeTermId;

    // List of all the configs used in the Court
    Config[] private configs;

    // List of configs indexed by id
    mapping (uint64 => uint256) private configIdByTerm;

    // Holders opt-in config for automatic withdrawals
    mapping (address => bool) private withdrawalsAllowed;

    event NewConfig(uint64 fromTermId, uint64 courtConfigId);
    event AutomaticWithdrawalsAllowedChanged(address indexed holder, bool allowed);

    /**
    * @dev Constructor function
    * @param _feeToken Address of the token contract that is used to pay for fees
    * @param _fees Array containing:
    *        0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *        1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *        2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @param _roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *        0. evidenceTerms Max submitting evidence period duration in terms
    *        1. commitTerms Commit period duration in terms
    *        2. revealTerms Reveal period duration in terms
    *        3. appealTerms Appeal period duration in terms
    *        4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @param _pcts Array containing:
    *        0. penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    *        1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @param _roundParams Array containing params for rounds:
    *        0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *        1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *        2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    *        3. finalRoundLockTerms Number of terms that a coherent juror in a final round is disallowed to withdraw (to prevent 51% attacks)
    * @param _appealCollateralParams Array containing params for appeal collateral:
    *        0. appealCollateralFactor Multiple of dispute fees required to appeal a preliminary ruling
    *        1. appealConfirmCollateralFactor Multiple of dispute fees required to confirm appeal
    * @param _minActiveBalance Minimum amount of juror tokens that can be activated
    */
    constructor(
        ERC20 _feeToken,
        uint256[3] memory _fees,
        uint64[5] memory _roundStateDurations,
        uint16[2] memory _pcts,
        uint64[4] memory _roundParams,
        uint256[2] memory _appealCollateralParams,
        uint256 _minActiveBalance
    )
        public
    {
        // Leave config at index 0 empty for non-scheduled config changes
        configs.length = 1;
        _setConfig(
            0,
            0,
            _feeToken,
            _fees,
            _roundStateDurations,
            _pcts,
            _roundParams,
            _appealCollateralParams,
            _minActiveBalance
        );
    }

    /**
    * @notice Set the automatic withdrawals config for the sender to `_allowed`
    * @param _allowed Whether or not the automatic withdrawals are allowed by the sender
    */
    function setAutomaticWithdrawals(bool _allowed) external {
        withdrawalsAllowed[msg.sender] = _allowed;
        emit AutomaticWithdrawalsAllowedChanged(msg.sender, _allowed);
    }

    /**
    * @dev Tell the full Court configuration parameters at a certain term
    * @param _termId Identification number of the term querying the Court config of
    * @return token Address of the token used to pay for fees
    * @return fees Array containing:
    *         0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *         1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *         2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @return roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *         0. evidenceTerms Max submitting evidence period duration in terms
    *         1. commitTerms Commit period duration in terms
    *         2. revealTerms Reveal period duration in terms
    *         3. appealTerms Appeal period duration in terms
    *         4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @return pcts Array containing:
    *         0. penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    *         1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @return roundParams Array containing params for rounds:
    *         0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *         1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *         2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    * @return appealCollateralParams Array containing params for appeal collateral:
    *         0. appealCollateralFactor Multiple of dispute fees required to appeal a preliminary ruling
    *         1. appealConfirmCollateralFactor Multiple of dispute fees required to confirm appeal
    * @return minActiveBalance Minimum amount of tokens jurors have to activate to participate in the Court
    */
    function getConfig(uint64 _termId) external view
        returns (
            ERC20 feeToken,
            uint256[3] memory fees,
            uint64[5] memory roundStateDurations,
            uint16[2] memory pcts,
            uint64[4] memory roundParams,
            uint256[2] memory appealCollateralParams,
            uint256 minActiveBalance
        );

    /**
    * @dev Tell the draft config at a certain term
    * @param _termId Identification number of the term querying the draft config of
    * @return feeToken Address of the token used to pay for fees
    * @return draftFee Amount of fee tokens per juror to cover the drafting cost
    * @return penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    */
    function getDraftConfig(uint64 _termId) external view returns (ERC20 feeToken, uint256 draftFee, uint16 penaltyPct);

    /**
    * @dev Tell the min active balance config at a certain term
    * @param _termId Term querying the min active balance config of
    * @return Minimum amount of tokens jurors have to activate to participate in the Court
    */
    function getMinActiveBalance(uint64 _termId) external view returns (uint256);

    /**
    * @dev Tell whether a certain holder accepts automatic withdrawals of tokens or not
    * @param _holder Address of the token holder querying if withdrawals are allowed for
    * @return True if the given holder accepts automatic withdrawals of their tokens, false otherwise
    */
    function areWithdrawalsAllowedFor(address _holder) external view returns (bool) {
        return withdrawalsAllowed[_holder];
    }

    /**
    * @dev Tell the term identification number of the next scheduled config change
    * @return Term identification number of the next scheduled config change
    */
    function getConfigChangeTermId() external view returns (uint64) {
        return configChangeTermId;
    }

    /**
    * @dev Internal to make sure to set a config for the new term, it will copy the previous term config if none
    * @param _termId Identification number of the new current term that has been transitioned
    */
    function _ensureTermConfig(uint64 _termId) internal {
        // If the term being transitioned had no config change scheduled, keep the previous one
        uint256 currentConfigId = configIdByTerm[_termId];
        if (currentConfigId == 0) {
            uint256 previousConfigId = configIdByTerm[_termId.sub(1)];
            configIdByTerm[_termId] = previousConfigId;
        }
    }

    /**
    * @dev Assumes that sender it's allowed (either it's from governor or it's on init)
    * @param _termId Identification number of the current Court term
    * @param _fromTermId Identification number of the term in which the config will be effective at
    * @param _feeToken Address of the token contract that is used to pay for fees.
    * @param _fees Array containing:
    *        0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *        1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *        2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @param _roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *        0. evidenceTerms Max submitting evidence period duration in terms
    *        1. commitTerms Commit period duration in terms
    *        2. revealTerms Reveal period duration in terms
    *        3. appealTerms Appeal period duration in terms
    *        4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @param _pcts Array containing:
    *        0. penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    *        1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @param _roundParams Array containing params for rounds:
    *        0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *        1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *        2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    *        3. finalRoundLockTerms Number of terms that a coherent juror in a final round is disallowed to withdraw (to prevent 51% attacks)
    * @param _appealCollateralParams Array containing params for appeal collateral:
    *        0. appealCollateralFactor Multiple of dispute fees required to appeal a preliminary ruling
    *        1. appealConfirmCollateralFactor Multiple of dispute fees required to confirm appeal
    * @param _minActiveBalance Minimum amount of juror tokens that can be activated
    */
    function _setConfig(
        uint64 _termId,
        uint64 _fromTermId,
        ERC20 _feeToken,
        uint256[3] memory _fees,
        uint64[5] memory _roundStateDurations,
        uint16[2] memory _pcts,
        uint64[4] memory _roundParams,
        uint256[2] memory _appealCollateralParams,
        uint256 _minActiveBalance
    )
        internal
    {
        // If the current term is not zero, changes must be scheduled at least after the current period.
        // No need to ensure delays for on-going disputes since these already use their creation term for that.
        require(_termId == 0 || _fromTermId > _termId, ERROR_TOO_OLD_TERM);

        // Make sure appeal collateral factors are greater than zero
        require(_appealCollateralParams[0] > 0 && _appealCollateralParams[1] > 0, ERROR_ZERO_COLLATERAL_FACTOR);

        // Make sure the given penalty and final round reduction pcts are not greater than 100%
        require(PctHelpers.isValid(_pcts[0]), ERROR_INVALID_PENALTY_PCT);
        require(PctHelpers.isValid(_pcts[1]), ERROR_INVALID_FINAL_ROUND_REDUCTION_PCT);

        // Disputes must request at least one juror to be drafted initially
        require(_roundParams[0] > 0, ERROR_BAD_INITIAL_JURORS_NUMBER);

        // Prevent that further rounds have zero jurors
        require(_roundParams[1] > 0, ERROR_BAD_APPEAL_STEP_FACTOR);

        // Make sure the max number of appeals allowed does not reach the limit
        uint256 _maxRegularAppealRounds = _roundParams[2];
        bool isMaxAppealRoundsValid = _maxRegularAppealRounds > 0 && _maxRegularAppealRounds <= MAX_REGULAR_APPEAL_ROUNDS_LIMIT;
        require(isMaxAppealRoundsValid, ERROR_INVALID_MAX_APPEAL_ROUNDS);

        // Make sure each adjudication round phase duration is valid
        for (uint i = 0; i < _roundStateDurations.length; i++) {
            require(_roundStateDurations[i] > 0 && _roundStateDurations[i] < MAX_ADJ_STATE_DURATION, ERROR_LARGE_ROUND_PHASE_DURATION);
        }

        // Make sure min active balance is not zero
        require(_minActiveBalance > 0, ERROR_ZERO_MIN_ACTIVE_BALANCE);

        // If there was a config change already scheduled, reset it (in that case we will overwrite last array item).
        // Otherwise, schedule a new config.
        if (configChangeTermId > _termId) {
            configIdByTerm[configChangeTermId] = 0;
        } else {
            configs.length++;
        }

        uint64 courtConfigId = uint64(configs.length - 1);
        Config storage config = configs[courtConfigId];

        config.fees = FeesConfig({
            token: _feeToken,
            jurorFee: _fees[0],
            draftFee: _fees[1],
            settleFee: _fees[2],
            finalRoundReduction: _pcts[1]
        });

        config.disputes = DisputesConfig({
            evidenceTerms: _roundStateDurations[0],
            commitTerms: _roundStateDurations[1],
            revealTerms: _roundStateDurations[2],
            appealTerms: _roundStateDurations[3],
            appealConfirmTerms: _roundStateDurations[4],
            penaltyPct: _pcts[0],
            firstRoundJurorsNumber: _roundParams[0],
            appealStepFactor: _roundParams[1],
            maxRegularAppealRounds: _maxRegularAppealRounds,
            finalRoundLockTerms: _roundParams[3],
            appealCollateralFactor: _appealCollateralParams[0],
            appealConfirmCollateralFactor: _appealCollateralParams[1]
        });

        config.minActiveBalance = _minActiveBalance;

        configIdByTerm[_fromTermId] = courtConfigId;
        configChangeTermId = _fromTermId;

        emit NewConfig(_fromTermId, courtConfigId);
    }

    /**
    * @dev Internal function to get the Court config for a given term
    * @param _termId Identification number of the term querying the Court config of
    * @param _lastEnsuredTermId Identification number of the last ensured term of the Court
    * @return token Address of the token used to pay for fees
    * @return fees Array containing:
    *         0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *         1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *         2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @return roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *         0. evidenceTerms Max submitting evidence period duration in terms
    *         1. commitTerms Commit period duration in terms
    *         2. revealTerms Reveal period duration in terms
    *         3. appealTerms Appeal period duration in terms
    *         4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @return pcts Array containing:
    *         0. penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    *         1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @return roundParams Array containing params for rounds:
    *         0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *         1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *         2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    *         3. finalRoundLockTerms Number of terms that a coherent juror in a final round is disallowed to withdraw (to prevent 51% attacks)
    * @return appealCollateralParams Array containing params for appeal collateral:
    *         0. appealCollateralFactor Multiple of dispute fees required to appeal a preliminary ruling
    *         1. appealConfirmCollateralFactor Multiple of dispute fees required to confirm appeal
    * @return minActiveBalance Minimum amount of juror tokens that can be activated
    */
    function _getConfigAt(uint64 _termId, uint64 _lastEnsuredTermId) internal view
        returns (
            ERC20 feeToken,
            uint256[3] memory fees,
            uint64[5] memory roundStateDurations,
            uint16[2] memory pcts,
            uint64[4] memory roundParams,
            uint256[2] memory appealCollateralParams,
            uint256 minActiveBalance
        )
    {
        Config storage config = _getConfigFor(_termId, _lastEnsuredTermId);

        FeesConfig storage feesConfig = config.fees;
        feeToken = feesConfig.token;
        fees = [feesConfig.jurorFee, feesConfig.draftFee, feesConfig.settleFee];

        DisputesConfig storage disputesConfig = config.disputes;
        roundStateDurations = [
            disputesConfig.evidenceTerms,
            disputesConfig.commitTerms,
            disputesConfig.revealTerms,
            disputesConfig.appealTerms,
            disputesConfig.appealConfirmTerms
        ];
        pcts = [disputesConfig.penaltyPct, feesConfig.finalRoundReduction];
        roundParams = [
            disputesConfig.firstRoundJurorsNumber,
            disputesConfig.appealStepFactor,
            uint64(disputesConfig.maxRegularAppealRounds),
            disputesConfig.finalRoundLockTerms
        ];
        appealCollateralParams = [disputesConfig.appealCollateralFactor, disputesConfig.appealConfirmCollateralFactor];

        minActiveBalance = config.minActiveBalance;
    }

    /**
    * @dev Tell the draft config at a certain term
    * @param _termId Identification number of the term querying the draft config of
    * @param _lastEnsuredTermId Identification number of the last ensured term of the Court
    * @return feeToken Address of the token used to pay for fees
    * @return draftFee Amount of fee tokens per juror to cover the drafting cost
    * @return penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    */
    function _getDraftConfig(uint64 _termId,  uint64 _lastEnsuredTermId) internal view
        returns (ERC20 feeToken, uint256 draftFee, uint16 penaltyPct)
    {
        Config storage config = _getConfigFor(_termId, _lastEnsuredTermId);
        return (config.fees.token, config.fees.draftFee, config.disputes.penaltyPct);
    }

    /**
    * @dev Internal function to get the min active balance config for a given term
    * @param _termId Identification number of the term querying the min active balance config of
    * @param _lastEnsuredTermId Identification number of the last ensured term of the Court
    * @return Minimum amount of juror tokens that can be activated at the given term
    */
    function _getMinActiveBalance(uint64 _termId, uint64 _lastEnsuredTermId) internal view returns (uint256) {
        Config storage config = _getConfigFor(_termId, _lastEnsuredTermId);
        return config.minActiveBalance;
    }

    /**
    * @dev Internal function to get the Court config for a given term
    * @param _termId Identification number of the term querying the min active balance config of
    * @param _lastEnsuredTermId Identification number of the last ensured term of the Court
    * @return Court config for the given term
    */
    function _getConfigFor(uint64 _termId, uint64 _lastEnsuredTermId) internal view returns (Config storage) {
        uint256 id = _getConfigIdFor(_termId, _lastEnsuredTermId);
        return configs[id];
    }

    /**
    * @dev Internal function to get the Court config ID for a given term
    * @param _termId Identification number of the term querying the Court config of
    * @param _lastEnsuredTermId Identification number of the last ensured term of the Court
    * @return Identification number of the config for the given terms
    */
    function _getConfigIdFor(uint64 _termId, uint64 _lastEnsuredTermId) internal view returns (uint256) {
        // If the given term is lower or equal to the last ensured Court term, it is safe to use a past Court config
        if (_termId <= _lastEnsuredTermId) {
            return configIdByTerm[_termId];
        }

        // If the given term is in the future but there is a config change scheduled before it, use the incoming config
        uint64 scheduledChangeTermId = configChangeTermId;
        if (scheduledChangeTermId <= _termId) {
            return configIdByTerm[scheduledChangeTermId];
        }

        // If no changes are scheduled, use the Court config of the last ensured term
        return configIdByTerm[_lastEnsuredTermId];
    }
}

// File: ../../aragon-court/contracts/lib/os/IsContract.sol

// Brought from https://github.com/aragon/aragonOS/blob/v4.3.0/contracts/common/IsContract.sol
// Adapted to use pragma ^0.5.8 and satisfy our linter rules

pragma solidity ^0.5.8;


contract IsContract {
    /*
    * NOTE: this should NEVER be used for authentication
    * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).
    *
    * This is only intended to be used as a sanity check that an address is actually a contract,
    * RATHER THAN an address not being a contract.
    */
    function isContract(address _target) internal view returns (bool) {
        if (_target == address(0)) {
            return false;
        }

        uint256 size;
        assembly { size := extcodesize(_target) }
        return size > 0;
    }
}

// File: ../../aragon-court/contracts/court/controller/Controller.sol

pragma solidity ^0.5.8;





contract Controller is IsContract, CourtClock, CourtConfig {
    string private constant ERROR_SENDER_NOT_GOVERNOR = "CTR_SENDER_NOT_GOVERNOR";
    string private constant ERROR_INVALID_GOVERNOR_ADDRESS = "CTR_INVALID_GOVERNOR_ADDRESS";
    string private constant ERROR_IMPLEMENTATION_NOT_CONTRACT = "CTR_IMPLEMENTATION_NOT_CONTRACT";
    string private constant ERROR_INVALID_IMPLS_INPUT_LENGTH = "CTR_INVALID_IMPLS_INPUT_LENGTH";

    address private constant ZERO_ADDRESS = address(0);

    // DisputeManager module ID - keccak256(abi.encodePacked("DISPUTE_MANAGER"))
    bytes32 internal constant DISPUTE_MANAGER = 0x14a6c70f0f6d449c014c7bbc9e68e31e79e8474fb03b7194df83109a2d888ae6;

    // Treasury module ID - keccak256(abi.encodePacked("TREASURY"))
    bytes32 internal constant TREASURY = 0x06aa03964db1f7257357ef09714a5f0ca3633723df419e97015e0c7a3e83edb7;

    // Voting module ID - keccak256(abi.encodePacked("VOTING"))
    bytes32 internal constant VOTING = 0x7cbb12e82a6d63ff16fe43977f43e3e2b247ecd4e62c0e340da8800a48c67346;

    // JurorsRegistry module ID - keccak256(abi.encodePacked("JURORS_REGISTRY"))
    bytes32 internal constant JURORS_REGISTRY = 0x3b21d36b36308c830e6c4053fb40a3b6d79dde78947fbf6b0accd30720ab5370;

    // Subscriptions module ID - keccak256(abi.encodePacked("SUBSCRIPTIONS"))
    bytes32 internal constant SUBSCRIPTIONS = 0x2bfa3327fe52344390da94c32a346eeb1b65a8b583e4335a419b9471e88c1365;

    /**
    * @dev Governor of the whole system. Set of three addresses to recover funds, change configuration settings and setup modules
    */
    struct Governor {
        address funds;      // This address can be unset at any time. It is allowed to recover funds from the ControlledRecoverable modules
        address config;     // This address is meant not to be unset. It is allowed to change the different configurations of the whole system
        address modules;    // This address can be unset at any time. It is allowed to plug/unplug modules from the system
    }

    // Governor addresses of the system
    Governor private governor;

    // List of modules registered for the system indexed by ID
    mapping (bytes32 => address) internal modules;

    event ModuleSet(bytes32 id, address addr);
    event FundsGovernorChanged(address previousGovernor, address currentGovernor);
    event ConfigGovernorChanged(address previousGovernor, address currentGovernor);
    event ModulesGovernorChanged(address previousGovernor, address currentGovernor);

    /**
    * @dev Ensure the msg.sender is the funds governor
    */
    modifier onlyFundsGovernor {
        require(msg.sender == governor.funds, ERROR_SENDER_NOT_GOVERNOR);
        _;
    }

    /**
    * @dev Ensure the msg.sender is the modules governor
    */
    modifier onlyConfigGovernor {
        require(msg.sender == governor.config, ERROR_SENDER_NOT_GOVERNOR);
        _;
    }

    /**
    * @dev Ensure the msg.sender is the modules governor
    */
    modifier onlyModulesGovernor {
        require(msg.sender == governor.modules, ERROR_SENDER_NOT_GOVERNOR);
        _;
    }

    /**
    * @dev Constructor function
    * @param _termParams Array containing:
    *        0. _termDuration Duration in seconds per term
    *        1. _firstTermStartTime Timestamp in seconds when the court will open (to give time for juror on-boarding)
    * @param _governors Array containing:
    *        0. _fundsGovernor Address of the funds governor
    *        1. _configGovernor Address of the config governor
    *        2. _modulesGovernor Address of the modules governor
    * @param _feeToken Address of the token contract that is used to pay for fees
    * @param _fees Array containing:
    *        0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *        1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *        2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @param _roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *        0. evidenceTerms Max submitting evidence period duration in terms
    *        1. commitTerms Commit period duration in terms
    *        2. revealTerms Reveal period duration in terms
    *        3. appealTerms Appeal period duration in terms
    *        4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @param _pcts Array containing:
    *        0. penaltyPct Permyriad of min active tokens balance to be locked to each drafted jurors (‱ - 1/10,000)
    *        1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @param _roundParams Array containing params for rounds:
    *        0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *        1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *        2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    *        3. finalRoundLockTerms Number of terms that a coherent juror in a final round is disallowed to withdraw (to prevent 51% attacks)
    * @param _appealCollateralParams Array containing params for appeal collateral:
    *        1. appealCollateralFactor Permyriad multiple of dispute fees required to appeal a preliminary ruling
    *        2. appealConfirmCollateralFactor Permyriad multiple of dispute fees required to confirm appeal
    * @param _minActiveBalance Minimum amount of juror tokens that can be activated
    */
    constructor(
        uint64[2] memory _termParams,
        address[3] memory _governors,
        ERC20 _feeToken,
        uint256[3] memory _fees,
        uint64[5] memory _roundStateDurations,
        uint16[2] memory _pcts,
        uint64[4] memory _roundParams,
        uint256[2] memory _appealCollateralParams,
        uint256 _minActiveBalance
    )
        public
        CourtClock(_termParams)
        CourtConfig(_feeToken, _fees, _roundStateDurations, _pcts, _roundParams, _appealCollateralParams, _minActiveBalance)
    {
        _setFundsGovernor(_governors[0]);
        _setConfigGovernor(_governors[1]);
        _setModulesGovernor(_governors[2]);
    }

    /**
    * @notice Change Court configuration params
    * @param _fromTermId Identification number of the term in which the config will be effective at
    * @param _feeToken Address of the token contract that is used to pay for fees
    * @param _fees Array containing:
    *        0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *        1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *        2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @param _roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *        0. evidenceTerms Max submitting evidence period duration in terms
    *        1. commitTerms Commit period duration in terms
    *        2. revealTerms Reveal period duration in terms
    *        3. appealTerms Appeal period duration in terms
    *        4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @param _pcts Array containing:
    *        0. penaltyPct Permyriad of min active tokens balance to be locked to each drafted jurors (‱ - 1/10,000)
    *        1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @param _roundParams Array containing params for rounds:
    *        0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *        1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *        2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    *        3. finalRoundLockTerms Number of terms that a coherent juror in a final round is disallowed to withdraw (to prevent 51% attacks)
    * @param _appealCollateralParams Array containing params for appeal collateral:
    *        1. appealCollateralFactor Permyriad multiple of dispute fees required to appeal a preliminary ruling
    *        2. appealConfirmCollateralFactor Permyriad multiple of dispute fees required to confirm appeal
    * @param _minActiveBalance Minimum amount of juror tokens that can be activated
    */
    function setConfig(
        uint64 _fromTermId,
        ERC20 _feeToken,
        uint256[3] calldata _fees,
        uint64[5] calldata _roundStateDurations,
        uint16[2] calldata _pcts,
        uint64[4] calldata _roundParams,
        uint256[2] calldata _appealCollateralParams,
        uint256 _minActiveBalance
    )
        external
        onlyConfigGovernor
    {
        uint64 currentTermId = _ensureCurrentTerm();
        _setConfig(
            currentTermId,
            _fromTermId,
            _feeToken,
            _fees,
            _roundStateDurations,
            _pcts,
            _roundParams,
            _appealCollateralParams,
            _minActiveBalance
        );
    }

    /**
    * @notice Delay the Court start time to `_newFirstTermStartTime`
    * @param _newFirstTermStartTime New timestamp in seconds when the court will open
    */
    function delayStartTime(uint64 _newFirstTermStartTime) external onlyConfigGovernor {
        _delayStartTime(_newFirstTermStartTime);
    }

    /**
    * @notice Change funds governor address to `_newFundsGovernor`
    * @param _newFundsGovernor Address of the new funds governor to be set
    */
    function changeFundsGovernor(address _newFundsGovernor) external onlyFundsGovernor {
        require(_newFundsGovernor != ZERO_ADDRESS, ERROR_INVALID_GOVERNOR_ADDRESS);
        _setFundsGovernor(_newFundsGovernor);
    }

    /**
    * @notice Change config governor address to `_newConfigGovernor`
    * @param _newConfigGovernor Address of the new config governor to be set
    */
    function changeConfigGovernor(address _newConfigGovernor) external onlyConfigGovernor {
        require(_newConfigGovernor != ZERO_ADDRESS, ERROR_INVALID_GOVERNOR_ADDRESS);
        _setConfigGovernor(_newConfigGovernor);
    }

    /**
    * @notice Change modules governor address to `_newModulesGovernor`
    * @param _newModulesGovernor Address of the new governor to be set
    */
    function changeModulesGovernor(address _newModulesGovernor) external onlyModulesGovernor {
        require(_newModulesGovernor != ZERO_ADDRESS, ERROR_INVALID_GOVERNOR_ADDRESS);
        _setModulesGovernor(_newModulesGovernor);
    }

    /**
    * @notice Remove the funds governor. Set the funds governor to the zero address.
    * @dev This action cannot be rolled back, once the funds governor has been unset, funds cannot be recovered from recoverable modules anymore
    */
    function ejectFundsGovernor() external onlyFundsGovernor {
        _setFundsGovernor(ZERO_ADDRESS);
    }

    /**
    * @notice Remove the modules governor. Set the modules governor to the zero address.
    * @dev This action cannot be rolled back, once the modules governor has been unset, system modules cannot be changed anymore
    */
    function ejectModulesGovernor() external onlyModulesGovernor {
        _setModulesGovernor(ZERO_ADDRESS);
    }

    /**
    * @notice Set module `_id` to `_addr`
    * @param _id ID of the module to be set
    * @param _addr Address of the module to be set
    */
    function setModule(bytes32 _id, address _addr) external onlyModulesGovernor {
        _setModule(_id, _addr);
    }

    /**
    * @notice Set many modules at once
    * @param _ids List of ids of each module to be set
    * @param _addresses List of addressed of each the module to be set
    */
    function setModules(bytes32[] calldata _ids, address[] calldata _addresses) external onlyModulesGovernor {
        require(_ids.length == _addresses.length, ERROR_INVALID_IMPLS_INPUT_LENGTH);

        for (uint256 i = 0; i < _ids.length; i++) {
            _setModule(_ids[i], _addresses[i]);
        }
    }

    /**
    * @dev Tell the full Court configuration parameters at a certain term
    * @param _termId Identification number of the term querying the Court config of
    * @return token Address of the token used to pay for fees
    * @return fees Array containing:
    *         0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *         1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *         2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @return roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *         0. evidenceTerms Max submitting evidence period duration in terms
    *         1. commitTerms Commit period duration in terms
    *         2. revealTerms Reveal period duration in terms
    *         3. appealTerms Appeal period duration in terms
    *         4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @return pcts Array containing:
    *         0. penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    *         1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @return roundParams Array containing params for rounds:
    *         0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *         1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *         2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    *         3. finalRoundLockTerms Number of terms that a coherent juror in a final round is disallowed to withdraw (to prevent 51% attacks)
    * @return appealCollateralParams Array containing params for appeal collateral:
    *         0. appealCollateralFactor Multiple of dispute fees required to appeal a preliminary ruling
    *         1. appealConfirmCollateralFactor Multiple of dispute fees required to confirm appeal
    */
    function getConfig(uint64 _termId) external view
        returns (
            ERC20 feeToken,
            uint256[3] memory fees,
            uint64[5] memory roundStateDurations,
            uint16[2] memory pcts,
            uint64[4] memory roundParams,
            uint256[2] memory appealCollateralParams,
            uint256 minActiveBalance
        )
    {
        uint64 lastEnsuredTermId = _lastEnsuredTermId();
        return _getConfigAt(_termId, lastEnsuredTermId);
    }

    /**
    * @dev Tell the draft config at a certain term
    * @param _termId Identification number of the term querying the draft config of
    * @return feeToken Address of the token used to pay for fees
    * @return draftFee Amount of fee tokens per juror to cover the drafting cost
    * @return penaltyPct Permyriad of min active tokens balance to be locked for each drafted juror (‱ - 1/10,000)
    */
    function getDraftConfig(uint64 _termId) external view returns (ERC20 feeToken, uint256 draftFee, uint16 penaltyPct) {
        uint64 lastEnsuredTermId = _lastEnsuredTermId();
        return _getDraftConfig(_termId, lastEnsuredTermId);
    }

    /**
    * @dev Tell the min active balance config at a certain term
    * @param _termId Identification number of the term querying the min active balance config of
    * @return Minimum amount of tokens jurors have to activate to participate in the Court
    */
    function getMinActiveBalance(uint64 _termId) external view returns (uint256) {
        uint64 lastEnsuredTermId = _lastEnsuredTermId();
        return _getMinActiveBalance(_termId, lastEnsuredTermId);
    }

    /**
    * @dev Tell the address of the funds governor
    * @return Address of the funds governor
    */
    function getFundsGovernor() external view returns (address) {
        return governor.funds;
    }

    /**
    * @dev Tell the address of the config governor
    * @return Address of the config governor
    */
    function getConfigGovernor() external view returns (address) {
        return governor.config;
    }

    /**
    * @dev Tell the address of the modules governor
    * @return Address of the modules governor
    */
    function getModulesGovernor() external view returns (address) {
        return governor.modules;
    }

    /**
    * @dev Tell address of a module based on a given ID
    * @param _id ID of the module being queried
    * @return Address of the requested module
    */
    function getModule(bytes32 _id) external view returns (address) {
        return _getModule(_id);
    }

    /**
    * @dev Tell the address of the DisputeManager module
    * @return Address of the DisputeManager module
    */
    function getDisputeManager() external view returns (address) {
        return _getDisputeManager();
    }

    /**
    * @dev Tell the address of the Treasury module
    * @return Address of the Treasury module
    */
    function getTreasury() external view returns (address) {
        return _getModule(TREASURY);
    }

    /**
    * @dev Tell the address of the Voting module
    * @return Address of the Voting module
    */
    function getVoting() external view returns (address) {
        return _getModule(VOTING);
    }

    /**
    * @dev Tell the address of the JurorsRegistry module
    * @return Address of the JurorsRegistry module
    */
    function getJurorsRegistry() external view returns (address) {
        return _getModule(JURORS_REGISTRY);
    }

    /**
    * @dev Tell the address of the Subscriptions module
    * @return Address of the Subscriptions module
    */
    function getSubscriptions() external view returns (address) {
        return _getSubscriptions();
    }

    /**
    * @dev Internal function to set the address of the funds governor
    * @param _newFundsGovernor Address of the new config governor to be set
    */
    function _setFundsGovernor(address _newFundsGovernor) internal {
        emit FundsGovernorChanged(governor.funds, _newFundsGovernor);
        governor.funds = _newFundsGovernor;
    }

    /**
    * @dev Internal function to set the address of the config governor
    * @param _newConfigGovernor Address of the new config governor to be set
    */
    function _setConfigGovernor(address _newConfigGovernor) internal {
        emit ConfigGovernorChanged(governor.config, _newConfigGovernor);
        governor.config = _newConfigGovernor;
    }

    /**
    * @dev Internal function to set the address of the modules governor
    * @param _newModulesGovernor Address of the new modules governor to be set
    */
    function _setModulesGovernor(address _newModulesGovernor) internal {
        emit ModulesGovernorChanged(governor.modules, _newModulesGovernor);
        governor.modules = _newModulesGovernor;
    }

    /**
    * @dev Internal function to set a module
    * @param _id Id of the module to be set
    * @param _addr Address of the module to be set
    */
    function _setModule(bytes32 _id, address _addr) internal {
        require(isContract(_addr), ERROR_IMPLEMENTATION_NOT_CONTRACT);
        modules[_id] = _addr;
        emit ModuleSet(_id, _addr);
    }

    /**
    * @dev Internal function to notify when a term has been transitioned
    * @param _termId Identification number of the new current term that has been transitioned
    */
    function _onTermTransitioned(uint64 _termId) internal {
        _ensureTermConfig(_termId);
    }

    /**
    * @dev Internal function to tell the address of the DisputeManager module
    * @return Address of the DisputeManager module
    */
    function _getDisputeManager() internal view returns (address) {
        return _getModule(DISPUTE_MANAGER);
    }

    /**
    * @dev Internal function to tell the address of the Subscriptions module
    * @return Address of the Subscriptions module
    */
    function _getSubscriptions() internal view returns (address) {
        return _getModule(SUBSCRIPTIONS);
    }

    /**
    * @dev Internal function to tell address of a module based on a given ID
    * @param _id ID of the module being queried
    * @return Address of the requested module
    */
    function _getModule(bytes32 _id) internal view returns (address) {
        return modules[_id];
    }
}

// File: ../../aragon-court/contracts/arbitration/IArbitrator.sol

pragma solidity ^0.5.8;



interface IArbitrator {
    /**
    * @dev Create a dispute over the Arbitrable sender with a number of possible rulings
    * @param _possibleRulings Number of possible rulings allowed for the dispute
    * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created
    * @return Dispute identification number
    */
    function createDispute(uint256 _possibleRulings, bytes calldata _metadata) external returns (uint256);

    /**
    * @dev Close the evidence period of a dispute
    * @param _disputeId Identification number of the dispute to close its evidence submitting period
    */
    function closeEvidencePeriod(uint256 _disputeId) external;

    /**
    * @dev Execute the Arbitrable associated to a dispute based on its final ruling
    * @param _disputeId Identification number of the dispute to be executed
    */
    function executeRuling(uint256 _disputeId) external;

    /**
    * @dev Tell the dispute fees information to create a dispute
    * @return recipient Address where the corresponding dispute fees must be transferred to
    * @return feeToken ERC20 token used for the fees
    * @return feeAmount Total amount of fees that must be allowed to the recipient
    */
    function getDisputeFees() external view returns (address recipient, ERC20 feeToken, uint256 feeAmount);

    /**
    * @dev Tell the subscription fees information for a subscriber to be up-to-date
    * @param _subscriber Address of the account paying the subscription fees for
    * @return recipient Address where the corresponding subscriptions fees must be transferred to
    * @return feeToken ERC20 token used for the subscription fees
    * @return feeAmount Total amount of fees that must be allowed to the recipient
    */
    function getSubscriptionFees(address _subscriber) external view returns (address recipient, ERC20 feeToken, uint256 feeAmount);
}

// File: ../../aragon-court/contracts/standards/ERC165.sol

pragma solidity ^0.5.8;


interface ERC165 {
    /**
    * @dev Query if a contract implements a certain interface
    * @param _interfaceId The interface identifier being queried, as specified in ERC-165
    * @return True if the contract implements the requested interface and if its not 0xffffffff, false otherwise
    */
    function supportsInterface(bytes4 _interfaceId) external pure returns (bool);
}

// File: ../../aragon-court/contracts/arbitration/IArbitrable.sol

pragma solidity ^0.5.8;




contract IArbitrable is ERC165 {
    bytes4 internal constant ERC165_INTERFACE_ID = bytes4(0x01ffc9a7);
    bytes4 internal constant ARBITRABLE_INTERFACE_ID = bytes4(0x88f3ee69);

    /**
    * @dev Emitted when an IArbitrable instance's dispute is ruled by an IArbitrator
    * @param arbitrator IArbitrator instance ruling the dispute
    * @param disputeId Identification number of the dispute being ruled by the arbitrator
    * @param ruling Ruling given by the arbitrator
    */
    event Ruled(IArbitrator indexed arbitrator, uint256 indexed disputeId, uint256 ruling);

    /**
    * @dev Emitted when new evidence is submitted for the IArbitrable instance's dispute
    * @param disputeId Identification number of the dispute receiving new evidence
    * @param submitter Address of the account submitting the evidence
    * @param evidence Data submitted for the evidence of the dispute
    * @param finished Whether or not the submitter has finished submitting evidence
    */
    event EvidenceSubmitted(uint256 indexed disputeId, address indexed submitter, bytes evidence, bool finished);

    /**
    * @dev Submit evidence for a dispute
    * @param _disputeId Id of the dispute in the Court
    * @param _evidence Data submitted for the evidence related to the dispute
    * @param _finished Whether or not the submitter has finished submitting evidence
    */
    function submitEvidence(uint256 _disputeId, bytes calldata _evidence, bool _finished) external;

    /**
    * @dev Give a ruling for a certain dispute, the account calling it must have rights to rule on the contract
    * @param _disputeId Identification number of the dispute to be ruled
    * @param _ruling Ruling given by the arbitrator, where 0 is reserved for "refused to make a decision"
    */
    function rule(uint256 _disputeId, uint256 _ruling) external;

    /**
    * @dev ERC165 - Query if a contract implements a certain interface
    * @param _interfaceId The interface identifier being queried, as specified in ERC-165
    * @return True if this contract supports the given interface, false otherwise
    */
    function supportsInterface(bytes4 _interfaceId) external pure returns (bool) {
        return _interfaceId == ARBITRABLE_INTERFACE_ID || _interfaceId == ERC165_INTERFACE_ID;
    }
}

// File: ../../aragon-court/contracts/disputes/IDisputeManager.sol

pragma solidity ^0.5.8;




interface IDisputeManager {
    enum DisputeState {
        PreDraft,
        Adjudicating,
        Ruled
    }

    enum AdjudicationState {
        Invalid,
        Committing,
        Revealing,
        Appealing,
        ConfirmingAppeal,
        Ended
    }

    /**
    * @dev Create a dispute to be drafted in a future term
    * @param _subject Arbitrable instance creating the dispute
    * @param _possibleRulings Number of possible rulings allowed for the drafted jurors to vote on the dispute
    * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created
    * @return Dispute identification number
    */
    function createDispute(IArbitrable _subject, uint8 _possibleRulings, bytes calldata _metadata) external returns (uint256);

    /**
    * @dev Close the evidence period of a dispute
    * @param _subject IArbitrable instance requesting to close the evidence submission period
    * @param _disputeId Identification number of the dispute to close its evidence submitting period
    */
    function closeEvidencePeriod(IArbitrable _subject, uint256 _disputeId) external;

    /**
    * @dev Draft jurors for the next round of a dispute
    * @param _disputeId Identification number of the dispute to be drafted
    */
    function draft(uint256 _disputeId) external;

    /**
    * @dev Appeal round of a dispute in favor of a certain ruling
    * @param _disputeId Identification number of the dispute being appealed
    * @param _roundId Identification number of the dispute round being appealed
    * @param _ruling Ruling appealing a dispute round in favor of
    */
    function createAppeal(uint256 _disputeId, uint256 _roundId, uint8 _ruling) external;

    /**
    * @dev Confirm appeal for a round of a dispute in favor of a ruling
    * @param _disputeId Identification number of the dispute confirming an appeal of
    * @param _roundId Identification number of the dispute round confirming an appeal of
    * @param _ruling Ruling being confirmed against a dispute round appeal
    */
    function confirmAppeal(uint256 _disputeId, uint256 _roundId, uint8 _ruling) external;

    /**
    * @dev Compute the final ruling for a dispute
    * @param _disputeId Identification number of the dispute to compute its final ruling
    * @return subject Arbitrable instance associated to the dispute
    * @return finalRuling Final ruling decided for the given dispute
    */
    function computeRuling(uint256 _disputeId) external returns (IArbitrable subject, uint8 finalRuling);

    /**
    * @dev Settle penalties for a round of a dispute
    * @param _disputeId Identification number of the dispute to settle penalties for
    * @param _roundId Identification number of the dispute round to settle penalties for
    * @param _jurorsToSettle Maximum number of jurors to be slashed in this call
    */
    function settlePenalties(uint256 _disputeId, uint256 _roundId, uint256 _jurorsToSettle) external;

    /**
    * @dev Claim rewards for a round of a dispute for juror
    * @dev For regular rounds, it will only reward winning jurors
    * @param _disputeId Identification number of the dispute to settle rewards for
    * @param _roundId Identification number of the dispute round to settle rewards for
    * @param _juror Address of the juror to settle their rewards
    */
    function settleReward(uint256 _disputeId, uint256 _roundId, address _juror) external;

    /**
    * @dev Settle appeal deposits for a round of a dispute
    * @param _disputeId Identification number of the dispute to settle appeal deposits for
    * @param _roundId Identification number of the dispute round to settle appeal deposits for
    */
    function settleAppealDeposit(uint256 _disputeId, uint256 _roundId) external;

    /**
    * @dev Tell the amount of token fees required to create a dispute
    * @return feeToken ERC20 token used for the fees
    * @return feeAmount Total amount of fees to be paid for a dispute at the given term
    */
    function getDisputeFees() external view returns (ERC20 feeToken, uint256 feeAmount);

    /**
    * @dev Tell information of a certain dispute
    * @param _disputeId Identification number of the dispute being queried
    * @return subject Arbitrable subject being disputed
    * @return possibleRulings Number of possible rulings allowed for the drafted jurors to vote on the dispute
    * @return state Current state of the dispute being queried: pre-draft, adjudicating, or ruled
    * @return finalRuling The winning ruling in case the dispute is finished
    * @return lastRoundId Identification number of the last round created for the dispute
    * @return createTermId Identification number of the term when the dispute was created
    */
    function getDispute(uint256 _disputeId) external view
        returns (IArbitrable subject, uint8 possibleRulings, DisputeState state, uint8 finalRuling, uint256 lastRoundId, uint64 createTermId);

    /**
    * @dev Tell information of a certain adjudication round
    * @param _disputeId Identification number of the dispute being queried
    * @param _roundId Identification number of the round being queried
    * @return draftTerm Term from which the requested round can be drafted
    * @return delayedTerms Number of terms the given round was delayed based on its requested draft term id
    * @return jurorsNumber Number of jurors requested for the round
    * @return selectedJurors Number of jurors already selected for the requested round
    * @return settledPenalties Whether or not penalties have been settled for the requested round
    * @return collectedTokens Amount of juror tokens that were collected from slashed jurors for the requested round
    * @return coherentJurors Number of jurors that voted in favor of the final ruling in the requested round
    * @return state Adjudication state of the requested round
    */
    function getRound(uint256 _disputeId, uint256 _roundId) external view
        returns (
            uint64 draftTerm,
            uint64 delayedTerms,
            uint64 jurorsNumber,
            uint64 selectedJurors,
            uint256 jurorFees,
            bool settledPenalties,
            uint256 collectedTokens,
            uint64 coherentJurors,
            AdjudicationState state
        );

    /**
    * @dev Tell appeal-related information of a certain adjudication round
    * @param _disputeId Identification number of the dispute being queried
    * @param _roundId Identification number of the round being queried
    * @return maker Address of the account appealing the given round
    * @return appealedRuling Ruling confirmed by the appealer of the given round
    * @return taker Address of the account confirming the appeal of the given round
    * @return opposedRuling Ruling confirmed by the appeal taker of the given round
    */
    function getAppeal(uint256 _disputeId, uint256 _roundId) external view
        returns (address maker, uint64 appealedRuling, address taker, uint64 opposedRuling);

    /**
    * @dev Tell information related to the next round due to an appeal of a certain round given.
    * @param _disputeId Identification number of the dispute being queried
    * @param _roundId Identification number of the round requesting the appeal details of
    * @return nextRoundStartTerm Term ID from which the next round will start
    * @return nextRoundJurorsNumber Jurors number for the next round
    * @return newDisputeState New state for the dispute associated to the given round after the appeal
    * @return feeToken ERC20 token used for the next round fees
    * @return jurorFees Total amount of fees to be distributed between the winning jurors of the next round
    * @return totalFees Total amount of fees for a regular round at the given term
    * @return appealDeposit Amount to be deposit of fees for a regular round at the given term
    * @return confirmAppealDeposit Total amount of fees for a regular round at the given term
    */
    function getNextRoundDetails(uint256 _disputeId, uint256 _roundId) external view
        returns (
            uint64 nextRoundStartTerm,
            uint64 nextRoundJurorsNumber,
            DisputeState newDisputeState,
            ERC20 feeToken,
            uint256 totalFees,
            uint256 jurorFees,
            uint256 appealDeposit,
            uint256 confirmAppealDeposit
        );

    /**
    * @dev Tell juror-related information of a certain adjudication round
    * @param _disputeId Identification number of the dispute being queried
    * @param _roundId Identification number of the round being queried
    * @param _juror Address of the juror being queried
    * @return weight Juror weight drafted for the requested round
    * @return rewarded Whether or not the given juror was rewarded based on the requested round
    */
    function getJuror(uint256 _disputeId, uint256 _roundId, address _juror) external view returns (uint64 weight, bool rewarded);
}

// File: ../../aragon-court/contracts/subscriptions/ISubscriptions.sol

pragma solidity ^0.5.8;



interface ISubscriptions {
    /**
    * @dev Tell whether a certain subscriber has paid all the fees up to current period or not
    * @param _subscriber Address of subscriber being checked
    * @return True if subscriber has paid all the fees up to current period, false otherwise
    */
    function isUpToDate(address _subscriber) external view returns (bool);

    /**
    * @dev Tell the minimum amount of fees to pay and resulting last paid period for a given subscriber in order to be up-to-date
    * @param _subscriber Address of the subscriber willing to pay
    * @return feeToken ERC20 token used for the subscription fees
    * @return amountToPay Amount of subscription fee tokens to be paid
    * @return newLastPeriodId Identification number of the resulting last paid period
    */
    function getOwedFeesDetails(address _subscriber) external view returns (ERC20, uint256, uint256);
}

// File: ../../aragon-court/contracts/court/AragonCourt.sol

pragma solidity ^0.5.8;










contract AragonCourt is Controller, IArbitrator {
    using Uint256Helpers for uint256;

    string private constant ERROR_SUBSCRIPTION_NOT_PAID = "AC_SUBSCRIPTION_NOT_PAID";
    string private constant ERROR_SENDER_NOT_ARBITRABLE = "AC_SENDER_NOT_ARBITRABLE";

    // Arbitrable interface ID based on ERC-165
    bytes4 private constant ARBITRABLE_INTERFACE_ID = bytes4(0x88f3ee69);

    /**
    * @dev Constructor function
    * @param _termParams Array containing:
    *        0. _termDuration Duration in seconds per term
    *        1. _firstTermStartTime Timestamp in seconds when the court will open (to give time for juror on-boarding)
    * @param _governors Array containing:
    *        0. _fundsGovernor Address of the funds governor
    *        1. _configGovernor Address of the config governor
    *        2. _modulesGovernor Address of the modules governor
    * @param _feeToken Address of the token contract that is used to pay for fees
    * @param _fees Array containing:
    *        0. jurorFee Amount of fee tokens that is paid per juror per dispute
    *        1. draftFee Amount of fee tokens per juror to cover the drafting cost
    *        2. settleFee Amount of fee tokens per juror to cover round settlement cost
    * @param _roundStateDurations Array containing the durations in terms of the different phases of a dispute:
    *        0. evidenceTerms Max submitting evidence period duration in terms
    *        1. commitTerms Commit period duration in terms
    *        2. revealTerms Reveal period duration in terms
    *        3. appealTerms Appeal period duration in terms
    *        4. appealConfirmationTerms Appeal confirmation period duration in terms
    * @param _pcts Array containing:
    *        0. penaltyPct Permyriad of min active tokens balance to be locked to each drafted jurors (‱ - 1/10,000)
    *        1. finalRoundReduction Permyriad of fee reduction for the last appeal round (‱ - 1/10,000)
    * @param _roundParams Array containing params for rounds:
    *        0. firstRoundJurorsNumber Number of jurors to be drafted for the first round of disputes
    *        1. appealStepFactor Increasing factor for the number of jurors of each round of a dispute
    *        2. maxRegularAppealRounds Number of regular appeal rounds before the final round is triggered
    *        3. finalRoundLockTerms Number of terms that a coherent juror in a final round is disallowed to withdraw (to prevent 51% attacks)
    * @param _appealCollateralParams Array containing params for appeal collateral:
    *        1. appealCollateralFactor Permyriad multiple of dispute fees required to appeal a preliminary ruling
    *        2. appealConfirmCollateralFactor Permyriad multiple of dispute fees required to confirm appeal
    * @param _minActiveBalance Minimum amount of juror tokens that can be activated
    */
    constructor(
        uint64[2] memory _termParams,
        address[3] memory _governors,
        ERC20 _feeToken,
        uint256[3] memory _fees,
        uint64[5] memory _roundStateDurations,
        uint16[2] memory _pcts,
        uint64[4] memory _roundParams,
        uint256[2] memory _appealCollateralParams,
        uint256 _minActiveBalance
    )
        public
        Controller(
            _termParams,
            _governors,
            _feeToken,
            _fees,
            _roundStateDurations,
            _pcts,
            _roundParams,
            _appealCollateralParams,
            _minActiveBalance
        )
    {
        // solium-disable-previous-line no-empty-blocks
    }

    /**
    * @notice Create a dispute with `_possibleRulings` possible rulings
    * @param _possibleRulings Number of possible rulings allowed for the drafted jurors to vote on the dispute
    * @param _metadata Optional metadata that can be used to provide additional information on the dispute to be created
    * @return Dispute identification number
    */
    function createDispute(uint256 _possibleRulings, bytes calldata _metadata) external returns (uint256) {
        IArbitrable subject = IArbitrable(msg.sender);
        require(subject.supportsInterface(ARBITRABLE_INTERFACE_ID), ERROR_SENDER_NOT_ARBITRABLE);

        ISubscriptions subscriptions = ISubscriptions(_getSubscriptions());
        require(subscriptions.isUpToDate(address(subject)), ERROR_SUBSCRIPTION_NOT_PAID);

        IDisputeManager disputeManager = IDisputeManager(_getDisputeManager());
        return disputeManager.createDispute(subject, _possibleRulings.toUint8(), _metadata);
    }

    /**
    * @notice Close the evidence period of dispute #`_disputeId`
    * @param _disputeId Identification number of the dispute to close its evidence submitting period
    */
    function closeEvidencePeriod(uint256 _disputeId) external {
        IArbitrable subject = IArbitrable(msg.sender);
        IDisputeManager disputeManager = IDisputeManager(_getDisputeManager());
        disputeManager.closeEvidencePeriod(subject, _disputeId);
    }

    /**
    * @notice Execute the Arbitrable associated to dispute #`_disputeId` based on its final ruling
    * @param _disputeId Identification number of the dispute to be executed
    */
    function executeRuling(uint256 _disputeId) external {
        IDisputeManager disputeManager = IDisputeManager(_getDisputeManager());
        (IArbitrable subject, uint8 ruling) = disputeManager.computeRuling(_disputeId);
        subject.rule(_disputeId, uint256(ruling));
    }

    /**
    * @dev Tell the dispute fees information to create a dispute
    * @return recipient Address where the corresponding dispute fees must be transferred to
    * @return feeToken ERC20 token used for the fees
    * @return feeAmount Total amount of fees that must be allowed to the recipient
    */
    function getDisputeFees() external view returns (address recipient, ERC20 feeToken, uint256 feeAmount) {
        recipient = _getDisputeManager();
        IDisputeManager disputeManager = IDisputeManager(recipient);
        (feeToken, feeAmount) = disputeManager.getDisputeFees();
    }

    /**
    * @dev Tell the subscription fees information for a subscriber to be up-to-date
    * @param _subscriber Address of the account paying the subscription fees for
    * @return recipient Address where the corresponding subscriptions fees must be transferred to
    * @return feeToken ERC20 token used for the subscription fees
    * @return feeAmount Total amount of fees that must be allowed to the recipient
    */
    function getSubscriptionFees(address _subscriber) external view returns (address recipient, ERC20 feeToken, uint256 feeAmount) {
        recipient = _getSubscriptions();
        ISubscriptions subscriptions = ISubscriptions(recipient);
        (feeToken, feeAmount,) = subscriptions.getOwedFeesDetails(_subscriber);
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"getCurrentTermId","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getVoting","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTermDuration","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ids","type":"bytes32[]"},{"name":"_addresses","type":"address[]"}],"name":"setModules","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_holder","type":"address"}],"name":"areWithdrawalsAllowedFor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTreasury","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSubscriptions","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getFundsGovernor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"ensureCurrentTerm","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getModulesGovernor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getNeededTermTransitions","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"bytes32"},{"name":"_addr","type":"address"}],"name":"setModule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_termId","type":"uint64"}],"name":"getTermRandomness","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_termId","type":"uint64"}],"name":"getDraftConfig","outputs":[{"name":"feeToken","type":"address"},{"name":"draftFee","type":"uint256"},{"name":"penaltyPct","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getConfigChangeTermId","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDisputeFees","outputs":[{"name":"recipient","type":"address"},{"name":"feeToken","type":"address"},{"name":"feeAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"ensureCurrentTermRandomness","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"closeEvidencePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_allowed","type":"bool"}],"name":"setAutomaticWithdrawals","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"bytes32"}],"name":"getModule","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"executeRuling","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ejectModulesGovernor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newFundsGovernor","type":"address"}],"name":"changeFundsGovernor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getJurorsRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_termId","type":"uint64"}],"name":"getMinActiveBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getConfigGovernor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_maxRequestedTransitions","type":"uint64"}],"name":"heartbeat","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_fromTermId","type":"uint64"},{"name":"_feeToken","type":"address"},{"name":"_fees","type":"uint256[3]"},{"name":"_roundStateDurations","type":"uint64[5]"},{"name":"_pcts","type":"uint16[2]"},{"name":"_roundParams","type":"uint64[4]"},{"name":"_appealCollateralParams","type":"uint256[2]"},{"name":"_minActiveBalance","type":"uint256"}],"name":"setConfig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_possibleRulings","type":"uint256"},{"name":"_metadata","type":"bytes"}],"name":"createDispute","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ejectFundsGovernor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newModulesGovernor","type":"address"}],"name":"changeModulesGovernor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newConfigGovernor","type":"address"}],"name":"changeConfigGovernor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getDisputeManager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_termId","type":"uint64"}],"name":"getConfig","outputs":[{"name":"feeToken","type":"address"},{"name":"fees","type":"uint256[3]"},{"name":"roundStateDurations","type":"uint64[5]"},{"name":"pcts","type":"uint16[2]"},{"name":"roundParams","type":"uint64[4]"},{"name":"appealCollateralParams","type":"uint256[2]"},{"name":"minActiveBalance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newFirstTermStartTime","type":"uint64"}],"name":"delayStartTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_subscriber","type":"address"}],"name":"getSubscriptionFees","outputs":[{"name":"recipient","type":"address"},{"name":"feeToken","type":"address"},{"name":"feeAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_termId","type":"uint64"}],"name":"getTerm","outputs":[{"name":"startTime","type":"uint64"},{"name":"randomnessBN","type":"uint64"},{"name":"randomness","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLastEnsuredTermId","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_termParams","type":"uint64[2]"},{"name":"_governors","type":"address[3]"},{"name":"_feeToken","type":"address"},{"name":"_fees","type":"uint256[3]"},{"name":"_roundStateDurations","type":"uint64[5]"},{"name":"_pcts","type":"uint16[2]"},{"name":"_roundParams","type":"uint64[4]"},{"name":"_appealCollateralParams","type":"uint256[2]"},{"name":"_minActiveBalance","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"bytes32"},{"indexed":false,"name":"addr","type":"address"}],"name":"ModuleSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousGovernor","type":"address"},{"indexed":false,"name":"currentGovernor","type":"address"}],"name":"FundsGovernorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousGovernor","type":"address"},{"indexed":false,"name":"currentGovernor","type":"address"}],"name":"ConfigGovernorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousGovernor","type":"address"},{"indexed":false,"name":"currentGovernor","type":"address"}],"name":"ModulesGovernorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fromTermId","type":"uint64"},{"indexed":false,"name":"courtConfigId","type":"uint64"}],"name":"NewConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"holder","type":"address"},{"indexed":false,"name":"allowed","type":"bool"}],"name":"AutomaticWithdrawalsAllowedChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousTermId","type":"uint64"},{"indexed":false,"name":"currentTermId","type":"uint64"}],"name":"Heartbeat","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousStartTime","type":"uint64"},{"indexed":false,"name":"currentStartTime","type":"uint64"}],"name":"StartTimeDelayed","type":"event"}]

60806040523480156200001157600080fd5b506040516102e08062004d3983398101806040526102e08110156200003557600080fd5b5060a08101516102c082015160408301919060c08401906101208501906101c0860190610200870190610280880190888888888888888888868686868686868f60008181602002015190506000826001602002015190506301e133806001600160401b0316826001600160401b0316106040518060400160405280601a81526020017f434c4b5f5445524d5f4455524154494f4e5f544f4f5f4c4f4e470000000000008152509062000182576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620001465781810151838201526020016200012c565b50505050905090810190601f168015620001745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5081620001946200040e60201b60201c565b016001600160401b0316816001600160401b031610156040518060400160405280601d81526020017f434c4b5f4241445f46495253545f5445524d5f53544152545f54494d450000008152509062000249576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b506301e13380600202620002626200040e60201b60201c565b016001600160401b0316816001600160401b031611156040518060400160405280601d81526020017f434c4b5f4241445f46495253545f5445524d5f53544152545f54494d450000008152509062000317576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b50600080546001600160401b038085166001600160401b0319928316178355918052600160208190527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4980549590940390921693169290921790559050620003816003826200122d565b506200039c600080898989898989896200043b60201b60201c565b50505050505050620003c688600060038110620003b557fe5b60200201516200102b60201b60201c565b620003de88600160200201516200109560201b60201c565b620003f68860026020020151620010ff60201b60201c565b50505050505050505050505050505050505062001300565b600062000435620004246200116960201b60201c565b6200116d60201b620036451760201c565b90505b90565b6001600160401b0389161580620004635750886001600160401b0316886001600160401b0316115b6040518060400160405280601181526020017f434f4e465f544f4f5f4f4c445f5445524d0000000000000000000000000000008152509062000502576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b50815115801590620005175750602082015115155b6040518060400160405280601b81526020017f434f4e465f5a45524f5f434f4c4c41544552414c5f464143544f52000000000081525090620005b6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b50620005d58460005b60200201516200121e60201b620036321760201c565b6040518060400160405280601881526020017f434f4e465f494e56414c49445f50454e414c54595f50435400000000000000008152509062000674576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b5062000682846001620005bf565b6040518060400160405280602081526020017f434f4e465f494e56414c49445f46494e414c5f524f554e445f5245445f5043548152509062000721576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b50825160408051808201909152601e81527f434f4e465f4241445f494e495449414c5f4a55524f52535f4e554d42455200006020820152906001600160401b0316620007ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b50600083600160200201516001600160401b0316116040518060400160405280601b81526020017f434f4e465f4241445f41505045414c5f535445505f464143544f520000000000815250906200087e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b5060408301516001600160401b031660008115801590620008a05750600a8211155b9050806040518060400160405280601e81526020017f434f4e465f494e56414c49445f4d41585f41505045414c5f524f554e445300008152509062000942576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b5060005b600581101562000a3f5760008882600581106200095f57fe5b60200201516001600160401b03161180156200099657506121de8882600581106200098657fe5b60200201516001600160401b0316105b6040518060400160405280601f81526020017f434f4e465f4c415247455f524f554e445f50484153455f4455524154494f4e008152509062000a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b5060010162000946565b5060408051808201909152601c81527f434f4e465f5a45524f5f4d494e5f4143544956455f42414c414e43450000000060208201528362000add576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b506002546001600160401b03808d169116111562000b16576002546001600160401b031660009081526004602052604081205562000b2c565b600380549062000b2a90600183016200122d565b505b600380546000198101916000916001600160401b03841690811062000b4d57fe5b90600052602060002090600b020190506040518060a001604052808c6001600160a01b031681526020018960016002811062000b8557fe5b602002015161ffff1681526020018b60006003811062000ba157fe5b602002015181526020018b60016003811062000bb957fe5b602002015181526020018b60026003811062000bd157fe5b60209081029190910151909152815183549183015161ffff167401000000000000000000000000000000000000000002600160a01b61ffff02196001600160a01b039092166001600160a01b03199093169290921716178255604080820151600184015560608201516002840155608090910151600383015580516101808101909152808a600060200201516001600160401b031681526020018a60016005811062000c7957fe5b60200201516001600160401b031681526020018a60026005811062000c9a57fe5b60200201516001600160401b031681526020018a60036005811062000cbb57fe5b60200201516001600160401b031681526020018a60046005811062000cdc57fe5b60200201516001600160401b031681526020018960006002811062000cfd57fe5b602002015161ffff1681526020018860006004811062000d1957fe5b60200201516001600160401b031681526020018860016004811062000d3a57fe5b60200201516001600160401b031681526020018860036004811062000d5b57fe5b60200201516001600160401b031681526020018581526020018760006002811062000d8257fe5b602002015181526020018760016002811062000d9a57fe5b60200201518152508160040160008201518160000160006101000a8154816001600160401b0302191690836001600160401b0316021790555060208201518160000160086101000a8154816001600160401b0302191690836001600160401b0316021790555060408201518160000160106101000a8154816001600160401b0302191690836001600160401b0316021790555060608201518160000160186101000a8154816001600160401b0302191690836001600160401b0316021790555060808201518160010160006101000a8154816001600160401b0302191690836001600160401b0316021790555060a08201518160010160086101000a81548161ffff021916908361ffff16021790555060c082015181600101600a6101000a8154816001600160401b0302191690836001600160401b0316021790555060e08201518160010160126101000a8154816001600160401b0302191690836001600160401b031602179055506101008201518160020160006101000a8154816001600160401b0302191690836001600160401b031602179055506101208201518160030155610140820151816004015561016082015181600501559050508481600a0181905550816001600160401b0316600460008e6001600160401b03166001600160401b03168152602001908152602001600020819055508b600260006101000a8154816001600160401b0302191690836001600160401b031602179055507ff991c74e88b00b8de409caf790045f133e9a8283d3b989db88e2b2d93612c3a78c8360405180836001600160401b03166001600160401b03168152602001826001600160401b03166001600160401b031681526020019250505060405180910390a150505050505050505050505050565b600654604080516001600160a01b039283168152918316602083015280517f2e8176039aca48fb2df80d8a3f0c25cf4f12ba7ba15aabe562bd39f71967954f9281900390910190a1600680546001600160a01b0319166001600160a01b0392909216919091179055565b600754604080516001600160a01b039283168152918316602083015280517fad1fe49159fc13ce805cb23e72eb6724c008509c8095b9499752efea5747af3e9281900390910190a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b600854604080516001600160a01b039283168152918316602083015280517faf8bba87fb343f5755495c80323f32cd6bbfaebd666ff5abac709bc1f76f2f179281900390910190a1600880546001600160a01b0319166001600160a01b0392909216919091179055565b4290565b60408051808201909152601581527f55494e5436345f4e554d4245525f544f4f5f424947000000000000000000000060208201526000906001600160401b0383111562001217576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315620001465781810151838201526020016200012c565b5090919050565b61271061ffff82161115919050565b8154818355818111156200125c57600b0281600b0283600052602060002091820191016200125c919062001261565b505050565b6200043891905b80821115620012fc5780546001600160b01b03191681556000600182018190556002820181905560038201819055600482018190556005820180547fffffffffffff00000000000000000000000000000000000000000000000000001690556006820180546001600160401b0319169055600782018190556008820181905560098201819055600a820155600b0162001268565b5090565b613a2980620013106000396000f3fe608060405234801561001057600080fd5b50600436106102925760003560e01c806385acd64111610160578063c13517e1116100d8578063e008cb621161008c578063e3f2311e11610071578063e3f2311e1461088c578063f137b44e146108b2578063f7fe57891461090457610292565b8063e008cb621461073f578063e36057b71461086557610292565b8063d7a84693116100bd578063d7a84693146106eb578063d9296df214610711578063db9bee461461073757610292565b8063c13517e11461066c578063cf0a5af3146106e357610292565b8063953e46a01161012f57806397023f811161011457806397023f81146105e35780639bf6fa57146105eb578063a949e9821461061257610292565b8063953e46a0146105b457806395f3c2da146105bc57610292565b806385acd6411461054c5780638bb04875146105695780638c8bd218146105865780638de10e871461058e57610292565b8063408a26401161020e5780636991fdb8116101c25780637d1f24c9116101a75780637d1f24c9146105085780637e9adccf146105105780637fb011d61461052d57610292565b80636991fdb8146104ce5780637b751b9e146104d657610292565b8063541cd468116101f3578063541cd4681461041657806361f3be6a14610442578063696670051461047b57610292565b8063408a26401461040657806350c365801461040e57610292565b806327fe748c116102655780633b47a9ac1161024a5780633b47a9ac146103ee5780633c28e88b146103f65780633f33bf86146103fe57610292565b806327fe748c146103ac5780633b19e84a146103e657610292565b806308135a93146102975780631986d376146102bc57806322f8f6f3146102e057806324bdf713146102e8575b600080fd5b61029f61090c565b6040805167ffffffffffffffff9092168252519081900360200190f35b6102c461091c565b604080516001600160a01b039092168252519081900360200190f35b61029f610947565b6103aa600480360360408110156102fe57600080fd5b81019060208101813564010000000081111561031957600080fd5b82018360208201111561032b57600080fd5b8035906020019184602083028401116401000000008311171561034d57600080fd5b91939092909160208101903564010000000081111561036b57600080fd5b82018360208201111561037d57600080fd5b8035906020019184602083028401116401000000008311171561039f57600080fd5b509092509050610957565b005b6103d2600480360360208110156103c257600080fd5b50356001600160a01b0316610afd565b604080519115158252519081900360200190f35b6102c4610b1f565b6102c4610b4a565b6102c4610b54565b61029f610b63565b6102c4610b6d565b61029f610b7c565b6103aa6004803603604081101561042c57600080fd5b50803590602001356001600160a01b0316610b86565b6104696004803603602081101561045857600080fd5b503567ffffffffffffffff16610c26565b60408051918252519081900360200190f35b6104a26004803603602081101561049157600080fd5b503567ffffffffffffffff16610cdc565b604080516001600160a01b039094168452602084019290925261ffff1682820152519081900360600190f35b61029f610d04565b6104de610d14565b604080516001600160a01b0394851681529290931660208301528183015290519081900360600190f35b610469610d9e565b6103aa6004803603602081101561052657600080fd5b5035610e7b565b6103aa6004803603602081101561054357600080fd5b50351515610f05565b6102c46004803603602081101561056257600080fd5b5035610f79565b6103aa6004803603602081101561057f57600080fd5b5035610f8a565b6103aa6110a0565b6103aa600480360360208110156105a457600080fd5b50356001600160a01b031661113e565b6102c4611269565b610469600480360360208110156105d257600080fd5b503567ffffffffffffffff16611294565b6102c46112ab565b61029f6004803603602081101561060157600080fd5b503567ffffffffffffffff166112ba565b6103aa600480360361026081101561062957600080fd5b5067ffffffffffffffff813516906001600160a01b0360208201351690604081019060a081019061014081019061018081019061020081019061024001356112c5565b6104696004803603604081101561068257600080fd5b813591908101906040810160208201356401000000008111156106a457600080fd5b8201836020820111156106b657600080fd5b803590602001918460018302840111640100000000831117156106d857600080fd5b509092509050611433565b6103aa61174c565b6103aa6004803603602081101561070157600080fd5b50356001600160a01b03166117e8565b6103aa6004803603602081101561072757600080fd5b50356001600160a01b0316611910565b6102c4611a38565b6107666004803603602081101561075557600080fd5b503567ffffffffffffffff16611a42565b6040516001600160a01b03881681526020810187606080838360005b8381101561079a578181015183820152602001610782565b5050505090500186600560200280838360005b838110156107c55781810151838201526020016107ad565b5050505090500185600260200280838360005b838110156107f05781810151838201526020016107d8565b5050505090500184600460200280838360005b8381101561081b578181015183820152602001610803565b5050505090500183600260200280838360005b8381101561084657818101518382015260200161082e565b5050505090500182815260200197505050505050505060405180910390f35b6103aa6004803603602081101561087b57600080fd5b503567ffffffffffffffff16611a9b565b6104de600480360360208110156108a257600080fd5b50356001600160a01b0316611b36565b6108d9600480360360208110156108c857600080fd5b503567ffffffffffffffff16611bde565b6040805167ffffffffffffffff94851681529290931660208301528183015290519081900360600190f35b61029f611c18565b6000610916611c22565b90505b90565b60006109167f7cbb12e82a6d63ff16fe43977f43e3e2b247ecd4e62c0e340da8800a48c67346611c4e565b60005467ffffffffffffffff1690565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b03163314610a2557604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109ea5781810151838201526020016109d2565b50505050905090810190601f168015610a175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060408051808201909152601e81527f4354525f494e56414c49445f494d504c535f494e5055545f4c454e47544800006020820152838214610aab57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060005b83811015610af657610aee858583818110610ac657fe5b90506020020135848484818110610ad957fe5b905060200201356001600160a01b0316611c69565b600101610aaf565b5050505050565b6001600160a01b03811660009081526005602052604090205460ff165b919050565b60006109167f06aa03964db1f7257357ef09714a5f0ca3633723df419e97015e0c7a3e83edb7611c4e565b6000610916611d78565b6006546001600160a01b031690565b6000610916611da3565b6008546001600160a01b031690565b6000610916611e81565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b03163314610c1757604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50610c228282611c69565b5050565b6000805460408051808201909152601781527f434c4b5f5445524d5f444f45535f4e4f545f45584953540000000000000000006020820152839167ffffffffffffffff6801000000000000000090910481169083161115610ccb57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50610cd583611efc565b9392505050565b600080600080610cea611fe0565b9050610cf68582611ffc565b935093509350509193909250565b60025467ffffffffffffffff1690565b6000806000610d21612041565b92506000839050806001600160a01b0316637b751b9e6040518163ffffffff1660e01b8152600401604080518083038186803b158015610d6057600080fd5b505afa158015610d74573d6000803e3d6000fd5b505050506040513d6040811015610d8a57600080fd5b508051602090910151949590949350915050565b6000805468010000000000000000900467ffffffffffffffff168082526001602081905260408320908101548015610dda579250610919915050565b6000610de584611efc565b60408051808201909152601f81527f434c4b5f5445524d5f52414e444f4d4e4553535f554e415641494c41424c4500602082015290915081610e6b57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060019092018290555091505090565b336000610e86612041565b9050806001600160a01b031663c39c83d183856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610ee857600080fd5b505af1158015610efc573d6000803e3d6000fd5b50505050505050565b3360008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016851515908117909155825190815291517f189949428c2e58715ea2f0be0d702bc14e73743bdbb58814a595c19e1285c5be9281900390910190a250565b6000610f8482611c4e565b92915050565b6000610f94612041565b9050600080826001600160a01b031663bd881e53856040518263ffffffff1660e01b8152600401808281526020019150506040805180830381600087803b158015610fde57600080fd5b505af1158015610ff2573d6000803e3d6000fd5b505050506040513d604081101561100857600080fd5b508051602090910151604080517f311a6c560000000000000000000000000000000000000000000000000000000081526004810188905260ff8316602482015290519294509092506001600160a01b0384169163311a6c569160448082019260009290919082900301818387803b15801561108257600080fd5b505af1158015611096573d6000803e3d6000fd5b5050505050505050565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b0316331461113157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061113c600061206c565b565b60065460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b031633146111cf57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060408051808201909152601c81527f4354525f494e56414c49445f474f5645524e4f525f414444524553530000000060208201526001600160a01b03821661125c57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50611266816120ee565b50565b60006109167f3b21d36b36308c830e6c4053fb40a3b6d79dde78947fbf6b0accd30720ab5370611c4e565b60008061129f611fe0565b9050610cd58382612170565b6007546001600160a01b031690565b6000610f8482612189565b60075460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b0316331461135657604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000611361611da3565b9050611428818a8a8a6003806020026040519081016040528092919082600360200280828437600092019190915250506040805160a081810190925291508c9060059083908390808284376000920191909152505060408051808201825291508c9060029083908390808284376000920191909152505060408051608081810190925291508c9060049083908390808284376000920191909152505060408051808201825291508c9060029083908390808284376000920191909152508c91506123dd9050565b505050505050505050565b604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f88f3ee690000000000000000000000000000000000000000000000000000000060048201529051600091339182916301ffc9a7916024808301926020929190829003018186803b1580156114ae57600080fd5b505afa1580156114c2573d6000803e3d6000fd5b505050506040513d60208110156114d857600080fd5b505160408051808201909152601881527f41435f53454e4445525f4e4f545f41524249545241424c45000000000000000060208201529061155d57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000611568611d78565b9050806001600160a01b031663fd8e3934836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156115c057600080fd5b505afa1580156115d4573d6000803e3d6000fd5b505050506040513d60208110156115ea57600080fd5b505160408051808201909152601881527f41435f535542534352495054494f4e5f4e4f545f50414944000000000000000060208201529061166f57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50600061167a612041565b9050806001600160a01b0316631d2fa1fb846116958a612f32565b60405163ffffffff841660e01b81526001600160a01b0383166004820190815260ff83166024830152606060448301908152606483018c90528c928c929190608401848480828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b15801561171557600080fd5b505af1158015611729573d6000803e3d6000fd5b505050506040513d602081101561173f57600080fd5b5051979650505050505050565b60065460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b031633146117dd57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061113c60006120ee565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b0316331461187957604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060408051808201909152601c81527f4354525f494e56414c49445f474f5645524e4f525f414444524553530000000060208201526001600160a01b03821661190657604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506112668161206c565b60075460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b031633146119a157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060408051808201909152601c81527f4354525f494e56414c49445f474f5645524e4f525f414444524553530000000060208201526001600160a01b038216611a2e57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061126681612fc3565b6000610916612041565b6000611a4c613888565b611a546138a6565b611a5c6138c4565b611a646138e2565b611a6c6138c4565b600080611a77611fe0565b9050611a838982613045565b959f949e50929c50909a509850965090945092505050565b60075460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b03163314611b2c57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061126681613315565b6000806000611b43611d78565b92506000839050806001600160a01b0316630a771c25866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060606040518083038186803b158015611ba057600080fd5b505afa158015611bb4573d6000803e3d6000fd5b505050506040513d6060811015611bca57600080fd5b508051602090910151949690955092505050565b67ffffffffffffffff9081166000908152600160208190526040909120805491015481831693680100000000000000009092049092169190565b6000610916611fe0565b6000610916611c2f611e81565b60005468010000000000000000900467ffffffffffffffff1690613516565b6000908152600960205260409020546001600160a01b031690565b611c72816135b8565b6040518060400160405280601f81526020017f4354525f494d504c454d454e544154494f4e5f4e4f545f434f4e54524143540081525090611cf757604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060008281526009602090815260409182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03851690811790915582518581529182015281517f0669329f751b07de4aa82f60514a409d0dfaef266e791a4a65a95b07b1c4c324929181900390910190a15050565b60006109167f2bfa3327fe52344390da94c32a346eeb1b65a8b583e4335a419b9471e88c1365611c4e565b600080611dae611e81565b60408051808201909152601881527f434c4b5f544f4f5f4d414e595f5452414e534954494f4e5300000000000000006020820152909150600167ffffffffffffffff83161115611e4257604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5067ffffffffffffffff8116611e7257505060005468010000000000000000900467ffffffffffffffff16610919565b611e7b81612189565b91505090565b6000805467ffffffffffffffff6801000000000000000090910481168252600160205260408220541680611eb36135d7565b67ffffffffffffffff161015611ecd576000915050610919565b60005467ffffffffffffffff1681611ee36135d7565b0367ffffffffffffffff1681611ef557fe5b0491505090565b67ffffffffffffffff808216600090815260016020526040812080549192909168010000000000000000900416611f316135e9565b67ffffffffffffffff16116040518060400160405280601b81526020017f434c4b5f5445524d5f52414e444f4d4e4553535f4e4f545f594554000000000081525090611fc157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b505468010000000000000000900467ffffffffffffffff164092915050565b60005468010000000000000000900467ffffffffffffffff1690565b60008060008061200c86866135f6565b805460028201546005909201546001600160a01b039091169891975068010000000000000000900461ffff1695509350505050565b60006109167f14a6c70f0f6d449c014c7bbc9e68e31e79e8474fb03b7194df83109a2d888ae6611c4e565b600854604080516001600160a01b039283168152918316602083015280517faf8bba87fb343f5755495c80323f32cd6bbfaebd666ff5abac709bc1f76f2f179281900390910190a1600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600654604080516001600160a01b039283168152918316602083015280517f2e8176039aca48fb2df80d8a3f0c25cf4f12ba7ba15aabe562bd39f71967954f9281900390910190a1600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60008061217d84846135f6565b600a0154949350505050565b600080612194611e81565b905060008167ffffffffffffffff168467ffffffffffffffff16106121b957816121bb565b835b67ffffffffffffffff169050600081116040518060400160405280601c81526020017f434c4b5f494e56414c49445f5452414e534954494f4e5f5445524d53000000008152509061225057604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50600061225b6135e9565b60005490915068010000000000000000900467ffffffffffffffff168060015b84811161234e5767ffffffffffffffff808316600090815260016020819052604080832095909101928316825290209092906122b684613629565b60005482546122d89167ffffffffffffffff918216911663ffffffff61351616565b81547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff918216177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1668010000000000000000600189810193909316021790915591909101905061227b565b506000805467ffffffffffffffff8084166801000000000000000081027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff90931692909217909255604080519285168352602083019190915280517fb8818b6d0c27e4fc7cf75de16ac2543426d3c0bcc520931d24e5a7dde4adca119281900390910190a19695505050505050565b67ffffffffffffffff8916158061240757508867ffffffffffffffff168867ffffffffffffffff16115b6040518060400160405280601181526020017f434f4e465f544f4f5f4f4c445f5445524d0000000000000000000000000000008152509061248c57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b508151158015906124a05750602082015115155b6040518060400160405280601b81526020017f434f4e465f5a45524f5f434f4c4c41544552414c5f464143544f5200000000008152509061252557604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506125378460005b6020020151613632565b6040518060400160405280601881526020017f434f4e465f494e56414c49445f50454e414c54595f5043540000000000000000815250906125bc57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506125c884600161252d565b6040518060400160405280602081526020017f434f4e465f494e56414c49445f46494e414c5f524f554e445f5245445f5043548152509061264d57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50825160408051808201909152601e81527f434f4e465f4241445f494e495449414c5f4a55524f52535f4e554d424552000060208201529067ffffffffffffffff166126dd57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000836001602002015167ffffffffffffffff16116040518060400160405280601b81526020017f434f4e465f4241445f41505045414c5f535445505f464143544f5200000000008152509061277857604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50604083015167ffffffffffffffff166000811580159061279a5750600a8211155b9050806040518060400160405280601e81526020017f434f4e465f494e56414c49445f4d41585f41505045414c5f524f554e445300008152509061282257604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060005b600581101561290257600088826005811061283d57fe5b602002015167ffffffffffffffff1611801561287457506121de88826005811061286357fe5b602002015167ffffffffffffffff16105b6040518060400160405280601f81526020017f434f4e465f4c415247455f524f554e445f50484153455f4455524154494f4e00815250906128f957604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50600101612826565b5060408051808201909152601c81527f434f4e465f5a45524f5f4d494e5f4143544956455f42414c414e43450000000060208201528361298657604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060025467ffffffffffffffff808d16911611156129bf5760025467ffffffffffffffff166000908152600460205260408120556129d3565b60038054906129d19060018301613900565b505b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019160009167ffffffffffffffff8416908110612a1257fe5b90600052602060002090600b020190506040518060a001604052808c6001600160a01b0316815260200189600160028110612a4957fe5b602002015161ffff1681526020018b600060038110612a6457fe5b602002015181526020018b600160038110612a7b57fe5b602002015181526020018b600260038110612a9257fe5b60209081029190910151909152815183549183015161ffff1674010000000000000000000000000000000000000000027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff6001600160a01b039092167fffffffffffffffffffffffff00000000000000000000000000000000000000009093169290921716178255604080820151600184015560608201516002840155608090910151600383015580516101808101909152808a6000602002015167ffffffffffffffff1681526020018a600160058110612b6957fe5b602002015167ffffffffffffffff1681526020018a600260058110612b8a57fe5b602002015167ffffffffffffffff1681526020018a600360058110612bab57fe5b602002015167ffffffffffffffff1681526020018a600460058110612bcc57fe5b602002015167ffffffffffffffff16815260200189600060028110612bed57fe5b602002015161ffff16815260200188600060048110612c0857fe5b602002015167ffffffffffffffff16815260200188600160048110612c2957fe5b602002015167ffffffffffffffff16815260200188600360048110612c4a57fe5b602002015167ffffffffffffffff16815260200185815260200187600060028110612c7157fe5b6020020151815260200187600160028110612c8857fe5b60200201518152508160040160008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060608201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060808201518160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060a08201518160010160086101000a81548161ffff021916908361ffff16021790555060c082015181600101600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060e08201518160010160126101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101008201518160020160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101208201518160030155610140820151816004015561016082015181600501559050508481600a01819055508167ffffffffffffffff16600460008e67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055508b600260006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507ff991c74e88b00b8de409caf790045f133e9a8283d3b989db88e2b2d93612c3a78c83604051808367ffffffffffffffff1667ffffffffffffffff1681526020018267ffffffffffffffff1667ffffffffffffffff1681526020019250505060405180910390a150505050505050505050505050565b60408051808201909152601481527f55494e54385f4e554d4245525f544f4f5f424947000000000000000000000000602082015260009060ff831115612fbc57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5090919050565b600754604080516001600160a01b039283168152918316602083015280517fad1fe49159fc13ce805cb23e72eb6724c008509c8095b9499752efea5747af3e9281900390910190a1600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600061304f613888565b6130576138a6565b61305f6138c4565b6130676138e2565b61306f6138c4565b60008061307c8a8a6135f6565b905060008160000190508060000160009054906101000a90046001600160a01b03169850604051806060016040528082600101548152602001826002015481526020018260030154815250975060008260040190506040518060a001604052808260000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260000160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260000160189054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250975060405180604001604052808260010160089054906101000a900461ffff1661ffff1661ffff1681526020018360000160149054906101000a900461ffff1661ffff1661ffff168152509650604051806080016040528082600101600a9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260010160129054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001826003015467ffffffffffffffff1667ffffffffffffffff1681526020018260020160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525095506040518060400160405280826004015481526020018260050154815250945082600a0154935050505092959891949750929550565b61331d611c22565b60408051808201909152601e81527f434c4b5f43414e4e4f545f44454c41595f535441525445445f434f555254000060208201529067ffffffffffffffff16156133ab57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000808052600160205280547fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4980549092916133fb9167ffffffffffffffff908116911663ffffffff61351616565b90508067ffffffffffffffff168367ffffffffffffffff16116040518060400160405280602081526020017f434c4b5f43414e4e4f545f44454c41595f504153545f53544152545f54494d458152509061349957604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060005482547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff91821685038216178355604080518383168152918516602083015280517f9b735da8a0762c6e913df06587b4fa81f87b8075e2a2afdeae6afde9456fd8799281900390910190a1505050565b60408051808201909152601381527f4d41544836345f4144445f4f564552464c4f570000000000000000000000000060208201526000908383019067ffffffffffffffff80861690831610156135b057604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b509392505050565b60006001600160a01b0382166135d057506000610b1a565b503b151590565b60006109166135e4613641565b613645565b60006109166135e46136d6565b60008061360384846136da565b90506003818154811061361257fe5b90600052602060002090600b020191505092915050565b6112668161376f565b61271061ffff82161115919050565b4290565b60408051808201909152601581527f55494e5436345f4e554d4245525f544f4f5f4249470000000000000000000000602082015260009067ffffffffffffffff831115612fbc57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b4390565b60008167ffffffffffffffff168367ffffffffffffffff1611613717575067ffffffffffffffff8216600090815260046020526040902054610f84565b60025467ffffffffffffffff908116908416811161374f5767ffffffffffffffff166000908152600460205260409020549050610f84565b505067ffffffffffffffff16600090815260046020526040902054919050565b67ffffffffffffffff811660009081526004602052604090205480610c225760006004816137ae67ffffffffffffffff8616600163ffffffff6137e216565b67ffffffffffffffff9081168252602080830193909352604091820160009081205491871681526004909352912055505050565b60008267ffffffffffffffff168267ffffffffffffffff1611156040518060400160405280601481526020017f4d41544836345f5355425f554e444552464c4f570000000000000000000000008152509061388157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5050900390565b60405180606001604052806003906020820280388339509192915050565b6040518060a001604052806005906020820280388339509192915050565b60405180604001604052806002906020820280388339509192915050565b60405180608001604052806004906020820280388339509192915050565b81548183558181111561392c57600b0281600b02836000526020600020918201910161392c9190613931565b505050565b61091991905b808211156139f95780547fffffffffffffffffffff000000000000000000000000000000000000000000001681556000600182018190556002820181905560038201819055600482018190556005820180547fffffffffffff00000000000000000000000000000000000000000000000000001690556006820180547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000169055600782018190556008820181905560098201819055600a820155600b01613937565b509056fea165627a7a723058202ba7187b0f241d204f06d9c03128adc25e3679e61ba02a6f9d6b85667dd78e7000290000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000005e409d000000000000000000000000005e8c17a6065c35b172b10e80493d2266e2947df40000000000000000000000005e8c17a6065c35b172b10e80493d2266e2947df40000000000000000000000003c198b7f3ba594804aeea8894d0a58bcc345b8ce0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000027f7d0bdb9200000000000000000000000000000000000000000000000000000186cc6acd4b0000000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000075300000000000000000000000000000000000000000000000000000000000004e2000000000000000000000000000000000000000000000021e19e0c9bab2400000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102925760003560e01c806385acd64111610160578063c13517e1116100d8578063e008cb621161008c578063e3f2311e11610071578063e3f2311e1461088c578063f137b44e146108b2578063f7fe57891461090457610292565b8063e008cb621461073f578063e36057b71461086557610292565b8063d7a84693116100bd578063d7a84693146106eb578063d9296df214610711578063db9bee461461073757610292565b8063c13517e11461066c578063cf0a5af3146106e357610292565b8063953e46a01161012f57806397023f811161011457806397023f81146105e35780639bf6fa57146105eb578063a949e9821461061257610292565b8063953e46a0146105b457806395f3c2da146105bc57610292565b806385acd6411461054c5780638bb04875146105695780638c8bd218146105865780638de10e871461058e57610292565b8063408a26401161020e5780636991fdb8116101c25780637d1f24c9116101a75780637d1f24c9146105085780637e9adccf146105105780637fb011d61461052d57610292565b80636991fdb8146104ce5780637b751b9e146104d657610292565b8063541cd468116101f3578063541cd4681461041657806361f3be6a14610442578063696670051461047b57610292565b8063408a26401461040657806350c365801461040e57610292565b806327fe748c116102655780633b47a9ac1161024a5780633b47a9ac146103ee5780633c28e88b146103f65780633f33bf86146103fe57610292565b806327fe748c146103ac5780633b19e84a146103e657610292565b806308135a93146102975780631986d376146102bc57806322f8f6f3146102e057806324bdf713146102e8575b600080fd5b61029f61090c565b6040805167ffffffffffffffff9092168252519081900360200190f35b6102c461091c565b604080516001600160a01b039092168252519081900360200190f35b61029f610947565b6103aa600480360360408110156102fe57600080fd5b81019060208101813564010000000081111561031957600080fd5b82018360208201111561032b57600080fd5b8035906020019184602083028401116401000000008311171561034d57600080fd5b91939092909160208101903564010000000081111561036b57600080fd5b82018360208201111561037d57600080fd5b8035906020019184602083028401116401000000008311171561039f57600080fd5b509092509050610957565b005b6103d2600480360360208110156103c257600080fd5b50356001600160a01b0316610afd565b604080519115158252519081900360200190f35b6102c4610b1f565b6102c4610b4a565b6102c4610b54565b61029f610b63565b6102c4610b6d565b61029f610b7c565b6103aa6004803603604081101561042c57600080fd5b50803590602001356001600160a01b0316610b86565b6104696004803603602081101561045857600080fd5b503567ffffffffffffffff16610c26565b60408051918252519081900360200190f35b6104a26004803603602081101561049157600080fd5b503567ffffffffffffffff16610cdc565b604080516001600160a01b039094168452602084019290925261ffff1682820152519081900360600190f35b61029f610d04565b6104de610d14565b604080516001600160a01b0394851681529290931660208301528183015290519081900360600190f35b610469610d9e565b6103aa6004803603602081101561052657600080fd5b5035610e7b565b6103aa6004803603602081101561054357600080fd5b50351515610f05565b6102c46004803603602081101561056257600080fd5b5035610f79565b6103aa6004803603602081101561057f57600080fd5b5035610f8a565b6103aa6110a0565b6103aa600480360360208110156105a457600080fd5b50356001600160a01b031661113e565b6102c4611269565b610469600480360360208110156105d257600080fd5b503567ffffffffffffffff16611294565b6102c46112ab565b61029f6004803603602081101561060157600080fd5b503567ffffffffffffffff166112ba565b6103aa600480360361026081101561062957600080fd5b5067ffffffffffffffff813516906001600160a01b0360208201351690604081019060a081019061014081019061018081019061020081019061024001356112c5565b6104696004803603604081101561068257600080fd5b813591908101906040810160208201356401000000008111156106a457600080fd5b8201836020820111156106b657600080fd5b803590602001918460018302840111640100000000831117156106d857600080fd5b509092509050611433565b6103aa61174c565b6103aa6004803603602081101561070157600080fd5b50356001600160a01b03166117e8565b6103aa6004803603602081101561072757600080fd5b50356001600160a01b0316611910565b6102c4611a38565b6107666004803603602081101561075557600080fd5b503567ffffffffffffffff16611a42565b6040516001600160a01b03881681526020810187606080838360005b8381101561079a578181015183820152602001610782565b5050505090500186600560200280838360005b838110156107c55781810151838201526020016107ad565b5050505090500185600260200280838360005b838110156107f05781810151838201526020016107d8565b5050505090500184600460200280838360005b8381101561081b578181015183820152602001610803565b5050505090500183600260200280838360005b8381101561084657818101518382015260200161082e565b5050505090500182815260200197505050505050505060405180910390f35b6103aa6004803603602081101561087b57600080fd5b503567ffffffffffffffff16611a9b565b6104de600480360360208110156108a257600080fd5b50356001600160a01b0316611b36565b6108d9600480360360208110156108c857600080fd5b503567ffffffffffffffff16611bde565b6040805167ffffffffffffffff94851681529290931660208301528183015290519081900360600190f35b61029f611c18565b6000610916611c22565b90505b90565b60006109167f7cbb12e82a6d63ff16fe43977f43e3e2b247ecd4e62c0e340da8800a48c67346611c4e565b60005467ffffffffffffffff1690565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b03163314610a2557604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109ea5781810151838201526020016109d2565b50505050905090810190601f168015610a175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060408051808201909152601e81527f4354525f494e56414c49445f494d504c535f494e5055545f4c454e47544800006020820152838214610aab57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060005b83811015610af657610aee858583818110610ac657fe5b90506020020135848484818110610ad957fe5b905060200201356001600160a01b0316611c69565b600101610aaf565b5050505050565b6001600160a01b03811660009081526005602052604090205460ff165b919050565b60006109167f06aa03964db1f7257357ef09714a5f0ca3633723df419e97015e0c7a3e83edb7611c4e565b6000610916611d78565b6006546001600160a01b031690565b6000610916611da3565b6008546001600160a01b031690565b6000610916611e81565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b03163314610c1757604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50610c228282611c69565b5050565b6000805460408051808201909152601781527f434c4b5f5445524d5f444f45535f4e4f545f45584953540000000000000000006020820152839167ffffffffffffffff6801000000000000000090910481169083161115610ccb57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50610cd583611efc565b9392505050565b600080600080610cea611fe0565b9050610cf68582611ffc565b935093509350509193909250565b60025467ffffffffffffffff1690565b6000806000610d21612041565b92506000839050806001600160a01b0316637b751b9e6040518163ffffffff1660e01b8152600401604080518083038186803b158015610d6057600080fd5b505afa158015610d74573d6000803e3d6000fd5b505050506040513d6040811015610d8a57600080fd5b508051602090910151949590949350915050565b6000805468010000000000000000900467ffffffffffffffff168082526001602081905260408320908101548015610dda579250610919915050565b6000610de584611efc565b60408051808201909152601f81527f434c4b5f5445524d5f52414e444f4d4e4553535f554e415641494c41424c4500602082015290915081610e6b57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060019092018290555091505090565b336000610e86612041565b9050806001600160a01b031663c39c83d183856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610ee857600080fd5b505af1158015610efc573d6000803e3d6000fd5b50505050505050565b3360008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016851515908117909155825190815291517f189949428c2e58715ea2f0be0d702bc14e73743bdbb58814a595c19e1285c5be9281900390910190a250565b6000610f8482611c4e565b92915050565b6000610f94612041565b9050600080826001600160a01b031663bd881e53856040518263ffffffff1660e01b8152600401808281526020019150506040805180830381600087803b158015610fde57600080fd5b505af1158015610ff2573d6000803e3d6000fd5b505050506040513d604081101561100857600080fd5b508051602090910151604080517f311a6c560000000000000000000000000000000000000000000000000000000081526004810188905260ff8316602482015290519294509092506001600160a01b0384169163311a6c569160448082019260009290919082900301818387803b15801561108257600080fd5b505af1158015611096573d6000803e3d6000fd5b5050505050505050565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b0316331461113157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061113c600061206c565b565b60065460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b031633146111cf57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060408051808201909152601c81527f4354525f494e56414c49445f474f5645524e4f525f414444524553530000000060208201526001600160a01b03821661125c57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50611266816120ee565b50565b60006109167f3b21d36b36308c830e6c4053fb40a3b6d79dde78947fbf6b0accd30720ab5370611c4e565b60008061129f611fe0565b9050610cd58382612170565b6007546001600160a01b031690565b6000610f8482612189565b60075460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b0316331461135657604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000611361611da3565b9050611428818a8a8a6003806020026040519081016040528092919082600360200280828437600092019190915250506040805160a081810190925291508c9060059083908390808284376000920191909152505060408051808201825291508c9060029083908390808284376000920191909152505060408051608081810190925291508c9060049083908390808284376000920191909152505060408051808201825291508c9060029083908390808284376000920191909152508c91506123dd9050565b505050505050505050565b604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f88f3ee690000000000000000000000000000000000000000000000000000000060048201529051600091339182916301ffc9a7916024808301926020929190829003018186803b1580156114ae57600080fd5b505afa1580156114c2573d6000803e3d6000fd5b505050506040513d60208110156114d857600080fd5b505160408051808201909152601881527f41435f53454e4445525f4e4f545f41524249545241424c45000000000000000060208201529061155d57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000611568611d78565b9050806001600160a01b031663fd8e3934836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156115c057600080fd5b505afa1580156115d4573d6000803e3d6000fd5b505050506040513d60208110156115ea57600080fd5b505160408051808201909152601881527f41435f535542534352495054494f4e5f4e4f545f50414944000000000000000060208201529061166f57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50600061167a612041565b9050806001600160a01b0316631d2fa1fb846116958a612f32565b60405163ffffffff841660e01b81526001600160a01b0383166004820190815260ff83166024830152606060448301908152606483018c90528c928c929190608401848480828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b15801561171557600080fd5b505af1158015611729573d6000803e3d6000fd5b505050506040513d602081101561173f57600080fd5b5051979650505050505050565b60065460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b031633146117dd57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061113c60006120ee565b60085460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b0316331461187957604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060408051808201909152601c81527f4354525f494e56414c49445f474f5645524e4f525f414444524553530000000060208201526001600160a01b03821661190657604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506112668161206c565b60075460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b031633146119a157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060408051808201909152601c81527f4354525f494e56414c49445f474f5645524e4f525f414444524553530000000060208201526001600160a01b038216611a2e57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061126681612fc3565b6000610916612041565b6000611a4c613888565b611a546138a6565b611a5c6138c4565b611a646138e2565b611a6c6138c4565b600080611a77611fe0565b9050611a838982613045565b959f949e50929c50909a509850965090945092505050565b60075460408051808201909152601781527f4354525f53454e4445525f4e4f545f474f5645524e4f520000000000000000006020820152906001600160a01b03163314611b2c57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5061126681613315565b6000806000611b43611d78565b92506000839050806001600160a01b0316630a771c25866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060606040518083038186803b158015611ba057600080fd5b505afa158015611bb4573d6000803e3d6000fd5b505050506040513d6060811015611bca57600080fd5b508051602090910151949690955092505050565b67ffffffffffffffff9081166000908152600160208190526040909120805491015481831693680100000000000000009092049092169190565b6000610916611fe0565b6000610916611c2f611e81565b60005468010000000000000000900467ffffffffffffffff1690613516565b6000908152600960205260409020546001600160a01b031690565b611c72816135b8565b6040518060400160405280601f81526020017f4354525f494d504c454d454e544154494f4e5f4e4f545f434f4e54524143540081525090611cf757604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060008281526009602090815260409182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03851690811790915582518581529182015281517f0669329f751b07de4aa82f60514a409d0dfaef266e791a4a65a95b07b1c4c324929181900390910190a15050565b60006109167f2bfa3327fe52344390da94c32a346eeb1b65a8b583e4335a419b9471e88c1365611c4e565b600080611dae611e81565b60408051808201909152601881527f434c4b5f544f4f5f4d414e595f5452414e534954494f4e5300000000000000006020820152909150600167ffffffffffffffff83161115611e4257604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5067ffffffffffffffff8116611e7257505060005468010000000000000000900467ffffffffffffffff16610919565b611e7b81612189565b91505090565b6000805467ffffffffffffffff6801000000000000000090910481168252600160205260408220541680611eb36135d7565b67ffffffffffffffff161015611ecd576000915050610919565b60005467ffffffffffffffff1681611ee36135d7565b0367ffffffffffffffff1681611ef557fe5b0491505090565b67ffffffffffffffff808216600090815260016020526040812080549192909168010000000000000000900416611f316135e9565b67ffffffffffffffff16116040518060400160405280601b81526020017f434c4b5f5445524d5f52414e444f4d4e4553535f4e4f545f594554000000000081525090611fc157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b505468010000000000000000900467ffffffffffffffff164092915050565b60005468010000000000000000900467ffffffffffffffff1690565b60008060008061200c86866135f6565b805460028201546005909201546001600160a01b039091169891975068010000000000000000900461ffff1695509350505050565b60006109167f14a6c70f0f6d449c014c7bbc9e68e31e79e8474fb03b7194df83109a2d888ae6611c4e565b600854604080516001600160a01b039283168152918316602083015280517faf8bba87fb343f5755495c80323f32cd6bbfaebd666ff5abac709bc1f76f2f179281900390910190a1600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600654604080516001600160a01b039283168152918316602083015280517f2e8176039aca48fb2df80d8a3f0c25cf4f12ba7ba15aabe562bd39f71967954f9281900390910190a1600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60008061217d84846135f6565b600a0154949350505050565b600080612194611e81565b905060008167ffffffffffffffff168467ffffffffffffffff16106121b957816121bb565b835b67ffffffffffffffff169050600081116040518060400160405280601c81526020017f434c4b5f494e56414c49445f5452414e534954494f4e5f5445524d53000000008152509061225057604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50600061225b6135e9565b60005490915068010000000000000000900467ffffffffffffffff168060015b84811161234e5767ffffffffffffffff808316600090815260016020819052604080832095909101928316825290209092906122b684613629565b60005482546122d89167ffffffffffffffff918216911663ffffffff61351616565b81547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff918216177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1668010000000000000000600189810193909316021790915591909101905061227b565b506000805467ffffffffffffffff8084166801000000000000000081027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff90931692909217909255604080519285168352602083019190915280517fb8818b6d0c27e4fc7cf75de16ac2543426d3c0bcc520931d24e5a7dde4adca119281900390910190a19695505050505050565b67ffffffffffffffff8916158061240757508867ffffffffffffffff168867ffffffffffffffff16115b6040518060400160405280601181526020017f434f4e465f544f4f5f4f4c445f5445524d0000000000000000000000000000008152509061248c57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b508151158015906124a05750602082015115155b6040518060400160405280601b81526020017f434f4e465f5a45524f5f434f4c4c41544552414c5f464143544f5200000000008152509061252557604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506125378460005b6020020151613632565b6040518060400160405280601881526020017f434f4e465f494e56414c49445f50454e414c54595f5043540000000000000000815250906125bc57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506125c884600161252d565b6040518060400160405280602081526020017f434f4e465f494e56414c49445f46494e414c5f524f554e445f5245445f5043548152509061264d57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50825160408051808201909152601e81527f434f4e465f4241445f494e495449414c5f4a55524f52535f4e554d424552000060208201529067ffffffffffffffff166126dd57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000836001602002015167ffffffffffffffff16116040518060400160405280601b81526020017f434f4e465f4241445f41505045414c5f535445505f464143544f5200000000008152509061277857604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50604083015167ffffffffffffffff166000811580159061279a5750600a8211155b9050806040518060400160405280601e81526020017f434f4e465f494e56414c49445f4d41585f41505045414c5f524f554e445300008152509061282257604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060005b600581101561290257600088826005811061283d57fe5b602002015167ffffffffffffffff1611801561287457506121de88826005811061286357fe5b602002015167ffffffffffffffff16105b6040518060400160405280601f81526020017f434f4e465f4c415247455f524f554e445f50484153455f4455524154494f4e00815250906128f957604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b50600101612826565b5060408051808201909152601c81527f434f4e465f5a45524f5f4d494e5f4143544956455f42414c414e43450000000060208201528361298657604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060025467ffffffffffffffff808d16911611156129bf5760025467ffffffffffffffff166000908152600460205260408120556129d3565b60038054906129d19060018301613900565b505b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019160009167ffffffffffffffff8416908110612a1257fe5b90600052602060002090600b020190506040518060a001604052808c6001600160a01b0316815260200189600160028110612a4957fe5b602002015161ffff1681526020018b600060038110612a6457fe5b602002015181526020018b600160038110612a7b57fe5b602002015181526020018b600260038110612a9257fe5b60209081029190910151909152815183549183015161ffff1674010000000000000000000000000000000000000000027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff6001600160a01b039092167fffffffffffffffffffffffff00000000000000000000000000000000000000009093169290921716178255604080820151600184015560608201516002840155608090910151600383015580516101808101909152808a6000602002015167ffffffffffffffff1681526020018a600160058110612b6957fe5b602002015167ffffffffffffffff1681526020018a600260058110612b8a57fe5b602002015167ffffffffffffffff1681526020018a600360058110612bab57fe5b602002015167ffffffffffffffff1681526020018a600460058110612bcc57fe5b602002015167ffffffffffffffff16815260200189600060028110612bed57fe5b602002015161ffff16815260200188600060048110612c0857fe5b602002015167ffffffffffffffff16815260200188600160048110612c2957fe5b602002015167ffffffffffffffff16815260200188600360048110612c4a57fe5b602002015167ffffffffffffffff16815260200185815260200187600060028110612c7157fe5b6020020151815260200187600160028110612c8857fe5b60200201518152508160040160008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160000160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060608201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060808201518160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060a08201518160010160086101000a81548161ffff021916908361ffff16021790555060c082015181600101600a6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060e08201518160010160126101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101008201518160020160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506101208201518160030155610140820151816004015561016082015181600501559050508481600a01819055508167ffffffffffffffff16600460008e67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055508b600260006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507ff991c74e88b00b8de409caf790045f133e9a8283d3b989db88e2b2d93612c3a78c83604051808367ffffffffffffffff1667ffffffffffffffff1681526020018267ffffffffffffffff1667ffffffffffffffff1681526020019250505060405180910390a150505050505050505050505050565b60408051808201909152601481527f55494e54385f4e554d4245525f544f4f5f424947000000000000000000000000602082015260009060ff831115612fbc57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5090919050565b600754604080516001600160a01b039283168152918316602083015280517fad1fe49159fc13ce805cb23e72eb6724c008509c8095b9499752efea5747af3e9281900390910190a1600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600061304f613888565b6130576138a6565b61305f6138c4565b6130676138e2565b61306f6138c4565b60008061307c8a8a6135f6565b905060008160000190508060000160009054906101000a90046001600160a01b03169850604051806060016040528082600101548152602001826002015481526020018260030154815250975060008260040190506040518060a001604052808260000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260000160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260000160189054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250975060405180604001604052808260010160089054906101000a900461ffff1661ffff1661ffff1681526020018360000160149054906101000a900461ffff1661ffff1661ffff168152509650604051806080016040528082600101600a9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020018260010160129054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001826003015467ffffffffffffffff1667ffffffffffffffff1681526020018260020160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525095506040518060400160405280826004015481526020018260050154815250945082600a0154935050505092959891949750929550565b61331d611c22565b60408051808201909152601e81527f434c4b5f43414e4e4f545f44454c41595f535441525445445f434f555254000060208201529067ffffffffffffffff16156133ab57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b506000808052600160205280547fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4980549092916133fb9167ffffffffffffffff908116911663ffffffff61351616565b90508067ffffffffffffffff168367ffffffffffffffff16116040518060400160405280602081526020017f434c4b5f43414e4e4f545f44454c41595f504153545f53544152545f54494d458152509061349957604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5060005482547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff91821685038216178355604080518383168152918516602083015280517f9b735da8a0762c6e913df06587b4fa81f87b8075e2a2afdeae6afde9456fd8799281900390910190a1505050565b60408051808201909152601381527f4d41544836345f4144445f4f564552464c4f570000000000000000000000000060208201526000908383019067ffffffffffffffff80861690831610156135b057604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b509392505050565b60006001600160a01b0382166135d057506000610b1a565b503b151590565b60006109166135e4613641565b613645565b60006109166135e46136d6565b60008061360384846136da565b90506003818154811061361257fe5b90600052602060002090600b020191505092915050565b6112668161376f565b61271061ffff82161115919050565b4290565b60408051808201909152601581527f55494e5436345f4e554d4245525f544f4f5f4249470000000000000000000000602082015260009067ffffffffffffffff831115612fbc57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b4390565b60008167ffffffffffffffff168367ffffffffffffffff1611613717575067ffffffffffffffff8216600090815260046020526040902054610f84565b60025467ffffffffffffffff908116908416811161374f5767ffffffffffffffff166000908152600460205260409020549050610f84565b505067ffffffffffffffff16600090815260046020526040902054919050565b67ffffffffffffffff811660009081526004602052604090205480610c225760006004816137ae67ffffffffffffffff8616600163ffffffff6137e216565b67ffffffffffffffff9081168252602080830193909352604091820160009081205491871681526004909352912055505050565b60008267ffffffffffffffff168267ffffffffffffffff1611156040518060400160405280601481526020017f4d41544836345f5355425f554e444552464c4f570000000000000000000000008152509061388157604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156109ea5781810151838201526020016109d2565b5050900390565b60405180606001604052806003906020820280388339509192915050565b6040518060a001604052806005906020820280388339509192915050565b60405180604001604052806002906020820280388339509192915050565b60405180608001604052806004906020820280388339509192915050565b81548183558181111561392c57600b0281600b02836000526020600020918201910161392c9190613931565b505050565b61091991905b808211156139f95780547fffffffffffffffffffff000000000000000000000000000000000000000000001681556000600182018190556002820181905560038201819055600482018190556005820180547fffffffffffff00000000000000000000000000000000000000000000000000001690556006820180547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000169055600782018190556008820181905560098201819055600a820155600b01613937565b509056fea165627a7a723058202ba7187b0f241d204f06d9c03128adc25e3679e61ba02a6f9d6b85667dd78e700029

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

0000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000005e409d000000000000000000000000005e8c17a6065c35b172b10e80493d2266e2947df40000000000000000000000005e8c17a6065c35b172b10e80493d2266e2947df40000000000000000000000003c198b7f3ba594804aeea8894d0a58bcc345b8ce0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000027f7d0bdb9200000000000000000000000000000000000000000000000000000186cc6acd4b0000000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000075300000000000000000000000000000000000000000000000000000000000004e2000000000000000000000000000000000000000000000021e19e0c9bab2400000

-----Decoded View---------------
Arg [0] : _termParams (uint64[2]): 28800,1581292800
Arg [1] : _governors (address[3]): 0x5E8c17A6065C35b172B10E80493D2266e2947DF4,0x5E8c17A6065C35b172B10E80493D2266e2947DF4,0x3c198B7f3bA594804aEeA8894d0a58BCc345b8ce
Arg [2] : _feeToken (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F
Arg [3] : _fees (uint256[3]): 10000000000000000000,180000000000000000,110000000000000000
Arg [4] : _roundStateDurations (uint64[5]): 21,6,6,6,6
Arg [5] : _pcts (uint16[2]): 3000,5000
Arg [6] : _roundParams (uint64[4]): 3,3,4,21
Arg [7] : _appealCollateralParams (uint256[2]): 30000,20000
Arg [8] : _minActiveBalance (uint256): 10000000000000000000000

-----Encoded View---------------
23 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000007080
Arg [1] : 000000000000000000000000000000000000000000000000000000005e409d00
Arg [2] : 0000000000000000000000005e8c17a6065c35b172b10e80493d2266e2947df4
Arg [3] : 0000000000000000000000005e8c17a6065c35b172b10e80493d2266e2947df4
Arg [4] : 0000000000000000000000003c198b7f3ba594804aeea8894d0a58bcc345b8ce
Arg [5] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [6] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [7] : 000000000000000000000000000000000000000000000000027f7d0bdb920000
Arg [8] : 0000000000000000000000000000000000000000000000000186cc6acd4b0000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000bb8
Arg [15] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [20] : 0000000000000000000000000000000000000000000000000000000000007530
Arg [21] : 0000000000000000000000000000000000000000000000000000000000004e20
Arg [22] : 00000000000000000000000000000000000000000000021e19e0c9bab2400000


Swarm Source

bzzr://2ba7187b0f241d204f06d9c03128adc25e3679e61ba02a6f9d6b85667dd78e70

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn 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.