false
false
The Sokol Testnet is currently lacking validators. Please consider using Goerli or Mumbai for testing purposes.

Contract Address Details
contract

0xf3Aaf8A99f1119d02Af9bBfEafA8a71dDD4c582e

Contract Name
RealitioHomeArbitrationProxy
Creator
0xceb4c0–727389 at 0x59c0d4–1329c0
Balance
0 SPOA
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
0 Transfers
Gas Used
64,420
Last Balance Update
27736955
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
RealitioHomeArbitrationProxy




Optimization enabled
true
Compiler version
v0.7.4+commit.3f05b770




Optimization runs
200
EVM Version
default




Verified at
2020-12-15T13:29:34.760811Z

Constructor Arguments

000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a56000000000000000000000000063975d9e7cf434dcd04bd808d8c79d03ef69100b

Arg [0] (address) : 0xfe446bef1dbf7afe24e81e05bc8b271c1ba9a560
Arg [1] (address) : 0x63975d9e7cf434dcd04bd808d8c79d03ef69100b

              

Contract source code

Sol2uml
new
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.2;

interface IHomeArbitrationProxy {
    /**
     * @dev Receives the requested arbitration for a question. TRUSTED.
     * @param _questionID The ID of the question.
     * @param _contestedAnswer The answer the requester deems to be incorrect.
     * @param _requester The address of the user that requested arbitration.
     */
    function receiveArbitrationRequest(
        bytes32 _questionID,
        bytes32 _contestedAnswer,
        address _requester
    ) external;

    /**
     * @dev Receives a failed attempt to request arbitration. TRUSTED.
     * @param _questionID The ID of the question.
     */
    function receiveArbitrationFailure(bytes32 _questionID) external;

    /**
     * @dev Receives the answer to a specified question. TRUSTED.
     * @param _questionID The ID of the question.
     * @param _answer The answer from the arbitrator.
     */
    function receiveArbitrationAnswer(bytes32 _questionID, bytes32 _answer) external;
}

interface IForeignArbitrationProxy {
    /**
     * @dev Requests arbitration for given question ID. TRUSTED.
     * @param _questionID The ID of the question.
     */
    function acknowledgeArbitration(bytes32 _questionID) external;

    /**
     * @dev Cancels the arbitration request. TRUSTED.
     * @param _questionID The ID of the question.
     */
    function cancelArbitration(bytes32 _questionID) external;

    /**
     * @notice Gets the fee to create a dispute.
     * @return The fee to create a dispute.
     */
    function getDisputeFee(bytes32 questionID) external view returns (uint256);
}



interface IAMB {
    function requireToPassMessage(
        address _contract,
        bytes memory _data,
        uint256 _gas
    ) external returns (bytes32);

    function maxGasPerTx() external view returns (uint256);

    function messageSender() external view returns (address);

    function messageSourceChainId() external view returns (bytes32);

    function messageId() external view returns (bytes32);
}


/* solhint-disable var-name-mixedcase */
interface RealitioInterface {
    event LogNewAnswer(
        bytes32 answer,
        bytes32 indexed question_id,
        bytes32 history_hash,
        address indexed user,
        uint256 bond,
        uint256 ts,
        bool is_commitment
    );

    event LogNewTemplate(uint256 indexed template_id, address indexed user, string question_text);

    event LogNewQuestion(
        bytes32 indexed question_id,
        address indexed user,
        uint256 template_id,
        string question,
        bytes32 indexed content_hash,
        address arbitrator,
        uint32 timeout,
        uint32 opening_ts,
        uint256 nonce,
        uint256 created
    );

    /**
     * @dev The arbitrator contract is trusted to only call this if they've been paid, and tell us who paid them.
     * @notice Notify the contract that the arbitrator has been paid for a question, freezing it pending their decision.
     * @param question_id The ID of the question.
     * @param requester The account that requested arbitration.
     * @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.
     */
    function notifyOfArbitrationRequest(
        bytes32 question_id,
        address requester,
        uint256 max_previous
    ) external;

    /**
     * @notice Cancel a previously-requested arbitration and extend the timeout
     * @dev Useful when doing arbitration across chains that can't be requested atomically
     * @param question_id The ID of the question
     */
    function cancelArbitration(bytes32 question_id) external;

    /**
     * @notice Submit the answer for a question, for use by the arbitrator, working out the appropriate winner based on the last answer details.
     * @dev Doesn't require (or allow) a bond.
     * @param question_id The ID of the question
     * @param answer The answer, encoded into bytes32
     * @param payee_if_wrong The account to by credited as winner if the last answer given is wrong, usually the account that paid the arbitrator
     * @param last_history_hash The history hash before the final one
     * @param last_answer_or_commitment_id The last answer given, or the commitment ID if it was a commitment.
     * @param last_answerer The address that supplied the last answer
     */
    function assignWinnerAndSubmitAnswerByArbitrator(
        bytes32 question_id,
        bytes32 answer,
        address payee_if_wrong,
        bytes32 last_history_hash,
        bytes32 last_answer_or_commitment_id,
        address last_answerer
    ) external;

    /**
     * @notice Returns the current best answer.
     * @param question_id The ID of the question.
     * @return The current best answer.
     */
    function getBestAnswer(bytes32 question_id) external view returns (bytes32);
}



contract RealitioHomeArbitrationProxy is IHomeArbitrationProxy {
    /// @dev The contract governor. TRUSTED.
    address public governor = msg.sender;

    /// @dev The address of the Realitio contract (v2.1+ required). TRUSTED.
    RealitioInterface public immutable realitio;

    /// @dev ArbitraryMessageBridge contract address. TRUSTED.
    IAMB public immutable amb;

    /// @dev Address of the counter-party proxy on the Foreign Chain. TRUSTED.
    address public foreignProxy;

    /// @dev The chain ID where the foreign proxy is deployed.
    uint256 public foreignChainId;

    /// @dev Metadata for Realitio interface.
    string public constant metadata = '{"foreignProxy":true}';

    enum Status {None, Rejected, Notified, AwaitingRuling, Ruled}

    struct Request {
        Status status;
        address requester;
        bytes32 arbitratorAnswer;
    }

    /// @dev Associates an arbitration request with a question ID.
    mapping(bytes32 => Request) public questionIDToRequest;

    /**
     * @notice To be emitted when arbitration request is rejected.
     * @dev This can happen if the contested answer is different from the current best answer,
     * if the notification of arbitration request fails or if the question is already finalized.
     * @param _questionID The ID of the question.
     * @param _contestedAnswer The answer the requester deems to be incorrect.
     * @param _requester The address of the user that requested arbitration.
     */
    event RequestRejected(bytes32 indexed _questionID, bytes32 _contestedAnswer, address indexed _requester);

    /**
     * @notice To be emitted when the Realitio contract has been notified of an arbitration request.
     * @param _questionID The ID of the question.
     * @param _contestedAnswer The answer the requester deems to be incorrect.
     * @param _requester The address of the user that requested arbitration.
     */
    event RequestNotified(bytes32 indexed _questionID, bytes32 _contestedAnswer, address indexed _requester);

    /**
     * @notice To be emitted when the arbitration request acknowledgement is sent to the Foreign Chain.
     * @param _questionID The ID of the question.
     */
    event RequestAcknowledged(bytes32 indexed _questionID);

    /**
     * @notice To be emitted when the arbitration request is canceled.
     * @param _questionID The ID of the question.
     */
    event RequestCanceled(bytes32 indexed _questionID);

    /**
     * @notice To be emitted when the dispute could not be created on the Foreign Chain.
     * @dev This will happen if the arbitration fee increases in between the arbitration request and acknowledgement.
     * @param _questionID The ID of the question.
     */
    event ArbitrationFailed(bytes32 indexed _questionID);

    /**
     * @notice To be emitted when receiving the answer from the arbitrator.
     * @param _questionID The ID of the question.
     * @param _answer The answer from the arbitrator.
     */
    event ArbitratorAnswered(bytes32 indexed _questionID, bytes32 _answer);

    /**
     * @notice To be emitted when reporting the arbitrator answer to Realitio.
     * @param _questionID The ID of the question.
     */
    event ArbitrationCompleted(bytes32 indexed _questionID);

    modifier onlyGovernor() {
        require(msg.sender == governor, "Only governor allowed");
        _;
    }

    modifier onlyAmb() {
        require(msg.sender == address(amb), "Only AMB allowed");
        _;
    }

    modifier onlyForeignChain() {
        require(amb.messageSourceChainId() == bytes32(foreignChainId), "Only foreign chain allowed");
        _;
    }

    modifier onlyForeignProxy() {
        require(amb.messageSender() == foreignProxy, "Only foreign proxy allowed");
        _;
    }

    /**
     * @notice Creates an arbitration proxy on the home chain.
     * @param _amb ArbitraryMessageBridge contract address.
     * @param _realitio Realitio contract address.
     */
    constructor(IAMB _amb, RealitioInterface _realitio) {
        amb = _amb;
        realitio = _realitio;
    }

    /**
     * @notice Sets the address of a new governor.
     * @param _governor The address of the new governor.
     */
    function setGovernor(address _governor) external onlyGovernor {
        governor = _governor;
    }

    /**
     * @notice Sets the address of the arbitration proxy on the Foreign Chain.
     * @param _foreignProxy The address of the proxy.
     * @param _foreignChainId The ID of the chain where the foreign proxy is deployed.
     */
    function setForeignProxy(address _foreignProxy, uint256 _foreignChainId) external onlyGovernor {
        require(foreignProxy == address(0), "Foreign proxy already set");

        foreignProxy = _foreignProxy;
        foreignChainId = _foreignChainId;
    }

    /**
     * @notice Receives the requested arbitration for a question.
     * @param _questionID The ID of the question.
     * @param _contestedAnswer The answer the requester deems to be incorrect.
     * @param _requester The address of the user that requested arbitration.
     */
    function receiveArbitrationRequest(
        bytes32 _questionID,
        bytes32 _contestedAnswer,
        address _requester
    ) external override onlyAmb onlyForeignChain onlyForeignProxy {
        Request storage request = questionIDToRequest[_questionID];
        require(request.status == Status.None, "Request already exists");

        if (realitio.getBestAnswer(_questionID) == _contestedAnswer) {
            try realitio.notifyOfArbitrationRequest(_questionID, _requester, 0)  {
                request.status = Status.Notified;
                request.requester = _requester;

                emit RequestNotified(_questionID, _contestedAnswer, _requester);
            } catch {
                request.status = Status.Rejected;

                emit RequestRejected(_questionID, _contestedAnswer, _requester);
            }
        } else {
            request.status = Status.Rejected;

            emit RequestRejected(_questionID, _contestedAnswer, _requester);
        }
    }

    /**
     * @notice Sends the arbitration acknowledgement to the Foreign Chain.
     * @dev Handles arbitration request after it has been notified to Realitio for a given question.
     * @param _questionID The ID of the question.
     */
    function handleNotifiedRequest(bytes32 _questionID) external {
        Request storage request = questionIDToRequest[_questionID];
        require(request.status == Status.Notified, "Invalid request status");

        request.status = Status.AwaitingRuling;

        bytes4 selector = IForeignArbitrationProxy(0).acknowledgeArbitration.selector;
        bytes memory data = abi.encodeWithSelector(selector, _questionID);
        amb.requireToPassMessage(foreignProxy, data, amb.maxGasPerTx());

        emit RequestAcknowledged(_questionID);
    }

    /**
     * @notice Sends the arbitration rejection to the Foreign Chain.
     * @dev Handles arbitration request after it has been rejected due to the quesiton
     * being finalized or the contested answer being different from the current one.
     * @param _questionID The ID of the question.
     */
    function handleRejectedRequest(bytes32 _questionID) external {
        Request storage request = questionIDToRequest[_questionID];
        require(request.status == Status.Rejected, "Invalid request status");

        // At this point, only the request.status is set, simply reseting the status to Status.None is enough.
        request.status = Status.None;

        bytes4 selector = IForeignArbitrationProxy(0).cancelArbitration.selector;
        bytes memory data = abi.encodeWithSelector(selector, _questionID);
        amb.requireToPassMessage(foreignProxy, data, amb.maxGasPerTx());

        emit RequestCanceled(_questionID);
    }

    /**
     * @dev Receives a failed attempt to request arbitration.
     * @param _questionID The ID of the question.
     */
    function receiveArbitrationFailure(bytes32 _questionID)
        external
        override
        onlyAmb
        onlyForeignChain
        onlyForeignProxy
    {
        Request storage request = questionIDToRequest[_questionID];
        require(request.status == Status.AwaitingRuling, "Invalid request status");

        delete questionIDToRequest[_questionID];

        realitio.cancelArbitration(_questionID);

        emit ArbitrationFailed(_questionID);
    }

    /**
     * @dev Receives the answer to a specified question.
     * @param _questionID The ID of the question.
     * @param _answer The answer from the arbitratior.
     */
    function receiveArbitrationAnswer(bytes32 _questionID, bytes32 _answer)
        external
        override
        onlyAmb
        onlyForeignChain
        onlyForeignProxy
    {
        Request storage request = questionIDToRequest[_questionID];
        require(request.status == Status.AwaitingRuling, "Invalid request status");

        request.status = Status.Ruled;
        request.arbitratorAnswer = _answer;

        emit ArbitratorAnswered(_questionID, _answer);
    }

    /**
     * @dev Report the answer provided by the arbitrator to a specified question.
     * @param _questionID The ID of the question.
     * @param _lastHistoryHash The history hash given with the last answer to the question in the Realitio contract.
     * @param _lastAnswerOrCommitmentID The last answer given, or its commitment ID if it was a commitment, to the question in the Realitio contract.
     * @param _lastAnswerer The last answerer to the question in the Realitio contract.
     */
    function reportArbitrationAnswer(
        bytes32 _questionID,
        bytes32 _lastHistoryHash,
        bytes32 _lastAnswerOrCommitmentID,
        address _lastAnswerer
    ) external {
        Request storage request = questionIDToRequest[_questionID];
        require(request.status == Status.Ruled, "Arbitrator has not ruled yet");

        realitio.assignWinnerAndSubmitAnswerByArbitrator(
            _questionID,
            request.arbitratorAnswer,
            request.requester,
            _lastHistoryHash,
            _lastAnswerOrCommitmentID,
            _lastAnswerer
        );

        delete questionIDToRequest[_questionID];

        emit ArbitrationCompleted(_questionID);
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_amb","internalType":"contract IAMB"},{"type":"address","name":"_realitio","internalType":"contract RealitioInterface"}]},{"type":"event","name":"ArbitrationCompleted","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"ArbitrationFailed","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"ArbitratorAnswered","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"_answer","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"RequestAcknowledged","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RequestCanceled","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RequestNotified","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"_contestedAnswer","internalType":"bytes32","indexed":false},{"type":"address","name":"_requester","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RequestRejected","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"_contestedAnswer","internalType":"bytes32","indexed":false},{"type":"address","name":"_requester","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IAMB"}],"name":"amb","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"foreignChainId","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"foreignProxy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governor","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"handleNotifiedRequest","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"handleRejectedRequest","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"metadata","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"status","internalType":"enum RealitioHomeArbitrationProxy.Status"},{"type":"address","name":"requester","internalType":"address"},{"type":"bytes32","name":"arbitratorAnswer","internalType":"bytes32"}],"name":"questionIDToRequest","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract RealitioInterface"}],"name":"realitio","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"receiveArbitrationAnswer","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32"},{"type":"bytes32","name":"_answer","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"receiveArbitrationFailure","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"receiveArbitrationRequest","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32"},{"type":"bytes32","name":"_contestedAnswer","internalType":"bytes32"},{"type":"address","name":"_requester","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"reportArbitrationAnswer","inputs":[{"type":"bytes32","name":"_questionID","internalType":"bytes32"},{"type":"bytes32","name":"_lastHistoryHash","internalType":"bytes32"},{"type":"bytes32","name":"_lastAnswerOrCommitmentID","internalType":"bytes32"},{"type":"address","name":"_lastAnswerer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setForeignProxy","inputs":[{"type":"address","name":"_foreignProxy","internalType":"address"},{"type":"uint256","name":"_foreignChainId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setGovernor","inputs":[{"type":"address","name":"_governor","internalType":"address"}]}]
              

Contract Creation Code

0x60c0604052600080546001600160a01b0319163317905534801561002257600080fd5b506040516117fe3803806117fe8339818101604052604081101561004557600080fd5b5080516020909101516001600160601b0319606092831b811660a052911b1660805260805160601c60a05160601c6117236100db6000398061036b528061056c52806105d952806106cc5280610b015280610d7a5280610fbe528061102b528061111e52806112af528061131c528061140f52508061047e528061080352806108995280610f18528061158052506117236000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80636e190f1711610097578063c42cf53511610066578063c42cf535146102c8578063d75a86e0146102ee578063e6e1b3b614610311578063e84f00e91461032e576100f5565b80636e190f17146102815780638b046ca71461028957806395e088fc146102a6578063bc8802a2146102c0576100f5565b8063241a9f82116100d3578063241a9f821461017b578063392f37e9146101b55780634d274aee1461023257806350101ed314610264576100f5565b80630c340a24146100fa5780631062b39a1461011e57806322d8abf314610126575b600080fd5b61010261035a565b604080516001600160a01b039092168252519081900360200190f35b610102610369565b6101436004803603602081101561013c57600080fd5b503561038d565b6040518084600481111561015357fe5b8152602001836001600160a01b03168152602001828152602001935050505060405180910390f35b6101b36004803603608081101561019157600080fd5b50803590602081013590604081013590606001356001600160a01b03166103ba565b005b6101bd610530565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f75781810151838201526020016101df565b50505050905090810190601f1680156102245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b36004803603606081101561024857600080fd5b50803590602081013590604001356001600160a01b0316610561565b6101b36004803603602081101561027a57600080fd5b5035610a3a565b610102610ca0565b6101b36004803603602081101561029f57600080fd5b5035610caf565b6102ae610f10565b60408051918252519081900360200190f35b610102610f16565b6101b3600480360360208110156102de57600080fd5b50356001600160a01b0316610f3a565b6101b36004803603604081101561030457600080fd5b5080359060200135610fb3565b6101b36004803603602081101561032757600080fd5b50356112a4565b6101b36004803603604081101561034457600080fd5b506001600160a01b038135169060200135611612565b6000546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052600090815260409020805460019091015460ff82169161010090046001600160a01b03169083565b60008481526003602052604090206004815460ff1660048111156103da57fe5b1461042c576040805162461bcd60e51b815260206004820152601c60248201527f41726269747261746f7220686173206e6f742072756c65642079657400000000604482015290519081900360640190fd5b60018101548154604080516335138a4f60e21b81526004810189905260248101939093526001600160a01b0361010090920482166044840152606483018790526084830186905284821660a4840152517f00000000000000000000000000000000000000000000000000000000000000009091169163d44e293c9160c480830192600092919082900301818387803b1580156104c757600080fd5b505af11580156104db573d6000803e3d6000fd5b50505060008681526003602052604080822080546001600160a81b0319168155600101829055518792507fed3e4b5eff9493ac70f063ff7964ab6eb3619cafe41506857741b2e48e924c3b9190a25050505050565b604051806040016040528060158152602001747b22666f726569676e50726f7879223a747275657d60581b81525081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105d1576040805162461bcd60e51b815260206004820152601060248201526f13db9b1e4810535088185b1b1bddd95960821b604482015290519081900360640190fd5b60025460001b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561063057600080fd5b505afa158015610644573d6000803e3d6000fd5b505050506040513d602081101561065a57600080fd5b5051146106ab576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db8818da185a5b88185b1b1bddd95960321b604482015290519081900360640190fd5b6001546040805163d67bdd2560e01b815290516001600160a01b03928316927f0000000000000000000000000000000000000000000000000000000000000000169163d67bdd25916004808301926020929190829003018186803b15801561071257600080fd5b505afa158015610726573d6000803e3d6000fd5b505050506040513d602081101561073c57600080fd5b50516001600160a01b031614610796576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db881c1c9bde1e48185b1b1bddd95960321b604482015290519081900360640190fd5b600083815260036020526040812090815460ff1660048111156107b557fe5b14610800576040805162461bcd60e51b81526020600482015260166024820152755265717565737420616c72656164792065786973747360501b604482015290519081900360640190fd5b827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638d552d46866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561086557600080fd5b505afa158015610879573d6000803e3d6000fd5b505050506040513d602081101561088f57600080fd5b505114156109e7577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f6a94ecb858460006040518463ffffffff1660e01b815260040180848152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561091757600080fd5b505af1925050508015610928575060015b61097d57805460ff191660011781556040805184815290516001600160a01b0384169186917f505c6b33937ba1c7bcfdcc208ea84cd66a66bac1e59de92b7ff784d722741e42916020908290030190a36109e2565b80546001600160a01b0383166101008102600260ff1990931692909217610100600160a81b03191691909117825560408051858152905186917f6f066f0a8c7c11806be5f3b5b04dd89e76a1b67a44fd8762a27916c3742fecd4919081900360200190a35b610a34565b805460ff191660011781556040805184815290516001600160a01b0384169186917f505c6b33937ba1c7bcfdcc208ea84cd66a66bac1e59de92b7ff784d722741e42916020908290030190a35b50505050565b60008181526003602052604090206002815460ff166004811115610a5a57fe5b14610aa5576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b805460ff19166003178155604080516024808201859052825180830390910181526044909101825260208082018051633e58db4560e21b6001600160e01b039091168117909152600154845163e5789d0360e01b8152945191947f00000000000000000000000000000000000000000000000000000000000000006001600160a01b039081169463dc8601b39491909316928692869263e5789d0392600480840193919291829003018186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b50516040516001600160e01b031960e086901b1681526001600160a01b038416600482019081526044820183905260606024830190815284516064840152845191929091608490910190602086019080838360005b83811015610bf5578181015183820152602001610bdd565b50505050905090810190601f168015610c225780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610c4357600080fd5b505af1158015610c57573d6000803e3d6000fd5b505050506040513d6020811015610c6d57600080fd5b505060405184907fdc27e462533b1501e51699f0029f54dc934b0c4afdc1d3dfdaab131a8de5288e90600090a250505050565b6001546001600160a01b031681565b60008181526003602052604090206001815460ff166004811115610ccf57fe5b14610d1a576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b805460ff191681556040805160248082018590528251808303909101815260449091018252602080820180516001600160e01b0316630ebbdd2b60e41b908117909152600154845163e5789d0360e01b8152945191946001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169463dc8601b39491909316928692869263e5789d0392600480840193919291829003018186803b158015610dce57600080fd5b505afa158015610de2573d6000803e3d6000fd5b505050506040513d6020811015610df857600080fd5b50516040516001600160e01b031960e086901b1681526001600160a01b038416600482019081526044820183905260606024830190815284516064840152845191929091608490910190602086019080838360005b83811015610e65578181015183820152602001610e4d565b50505050905090810190601f168015610e925780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b505050506040513d6020811015610edd57600080fd5b505060405184907f7efba54574fc3f1379813d6e09d06b5e9913bd264f1468a34879d577d2110f5490600090a250505050565b60025481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b03163314610f91576040805162461bcd60e51b815260206004820152601560248201527413db9b1e4819dbdd995c9b9bdc88185b1b1bddd959605a1b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611023576040805162461bcd60e51b815260206004820152601060248201526f13db9b1e4810535088185b1b1bddd95960821b604482015290519081900360640190fd5b60025460001b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561108257600080fd5b505afa158015611096573d6000803e3d6000fd5b505050506040513d60208110156110ac57600080fd5b5051146110fd576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db8818da185a5b88185b1b1bddd95960321b604482015290519081900360640190fd5b6001546040805163d67bdd2560e01b815290516001600160a01b03928316927f0000000000000000000000000000000000000000000000000000000000000000169163d67bdd25916004808301926020929190829003018186803b15801561116457600080fd5b505afa158015611178573d6000803e3d6000fd5b505050506040513d602081101561118e57600080fd5b50516001600160a01b0316146111e8576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db881c1c9bde1e48185b1b1bddd95960321b604482015290519081900360640190fd5b600082815260036020819052604090912090815460ff16600481111561120a57fe5b14611255576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b8054600460ff199091161781556001810182905560408051838152905184917f1813d15d8cef51cff8bbd419a8e13e0655c1babea320dea4174d5e7bc40c4294919081900360200190a2505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611314576040805162461bcd60e51b815260206004820152601060248201526f13db9b1e4810535088185b1b1bddd95960821b604482015290519081900360640190fd5b60025460001b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561137357600080fd5b505afa158015611387573d6000803e3d6000fd5b505050506040513d602081101561139d57600080fd5b5051146113ee576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db8818da185a5b88185b1b1bddd95960321b604482015290519081900360640190fd5b6001546040805163d67bdd2560e01b815290516001600160a01b03928316927f0000000000000000000000000000000000000000000000000000000000000000169163d67bdd25916004808301926020929190829003018186803b15801561145557600080fd5b505afa158015611469573d6000803e3d6000fd5b505050506040513d602081101561147f57600080fd5b50516001600160a01b0316146114d9576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db881c1c9bde1e48185b1b1bddd95960321b604482015290519081900360640190fd5b600081815260036020819052604090912090815460ff1660048111156114fb57fe5b14611546576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b60008281526003602052604080822080546001600160a81b03191681556001018290558051630ebbdd2b60e41b81526004810185905290517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169263ebbdd2b0926024808201939182900301818387803b1580156115cb57600080fd5b505af11580156115df573d6000803e3d6000fd5b50506040518492507f771bd0f0f064339da626238870be0bd3b8729b56b36a969926004c77065c95879150600090a25050565b6000546001600160a01b03163314611669576040805162461bcd60e51b815260206004820152601560248201527413db9b1e4819dbdd995c9b9bdc88185b1b1bddd959605a1b604482015290519081900360640190fd5b6001546001600160a01b0316156116c7576040805162461bcd60e51b815260206004820152601960248201527f466f726569676e2070726f787920616c72656164792073657400000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b03939093169290921790915560025556fea26469706673582212205eeacd3793ae4f9c1a4414b8311ac4b34df1678f7f58ab9da1a91cc9ea19c7ac64736f6c63430007040033000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a56000000000000000000000000063975d9e7cf434dcd04bd808d8c79d03ef69100b

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636e190f1711610097578063c42cf53511610066578063c42cf535146102c8578063d75a86e0146102ee578063e6e1b3b614610311578063e84f00e91461032e576100f5565b80636e190f17146102815780638b046ca71461028957806395e088fc146102a6578063bc8802a2146102c0576100f5565b8063241a9f82116100d3578063241a9f821461017b578063392f37e9146101b55780634d274aee1461023257806350101ed314610264576100f5565b80630c340a24146100fa5780631062b39a1461011e57806322d8abf314610126575b600080fd5b61010261035a565b604080516001600160a01b039092168252519081900360200190f35b610102610369565b6101436004803603602081101561013c57600080fd5b503561038d565b6040518084600481111561015357fe5b8152602001836001600160a01b03168152602001828152602001935050505060405180910390f35b6101b36004803603608081101561019157600080fd5b50803590602081013590604081013590606001356001600160a01b03166103ba565b005b6101bd610530565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f75781810151838201526020016101df565b50505050905090810190601f1680156102245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b36004803603606081101561024857600080fd5b50803590602081013590604001356001600160a01b0316610561565b6101b36004803603602081101561027a57600080fd5b5035610a3a565b610102610ca0565b6101b36004803603602081101561029f57600080fd5b5035610caf565b6102ae610f10565b60408051918252519081900360200190f35b610102610f16565b6101b3600480360360208110156102de57600080fd5b50356001600160a01b0316610f3a565b6101b36004803603604081101561030457600080fd5b5080359060200135610fb3565b6101b36004803603602081101561032757600080fd5b50356112a4565b6101b36004803603604081101561034457600080fd5b506001600160a01b038135169060200135611612565b6000546001600160a01b031681565b7f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a56081565b6003602052600090815260409020805460019091015460ff82169161010090046001600160a01b03169083565b60008481526003602052604090206004815460ff1660048111156103da57fe5b1461042c576040805162461bcd60e51b815260206004820152601c60248201527f41726269747261746f7220686173206e6f742072756c65642079657400000000604482015290519081900360640190fd5b60018101548154604080516335138a4f60e21b81526004810189905260248101939093526001600160a01b0361010090920482166044840152606483018790526084830186905284821660a4840152517f00000000000000000000000063975d9e7cf434dcd04bd808d8c79d03ef69100b9091169163d44e293c9160c480830192600092919082900301818387803b1580156104c757600080fd5b505af11580156104db573d6000803e3d6000fd5b50505060008681526003602052604080822080546001600160a81b0319168155600101829055518792507fed3e4b5eff9493ac70f063ff7964ab6eb3619cafe41506857741b2e48e924c3b9190a25050505050565b604051806040016040528060158152602001747b22666f726569676e50726f7879223a747275657d60581b81525081565b336001600160a01b037f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a56016146105d1576040805162461bcd60e51b815260206004820152601060248201526f13db9b1e4810535088185b1b1bddd95960821b604482015290519081900360640190fd5b60025460001b7f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a5606001600160a01b0316639e307dff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561063057600080fd5b505afa158015610644573d6000803e3d6000fd5b505050506040513d602081101561065a57600080fd5b5051146106ab576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db8818da185a5b88185b1b1bddd95960321b604482015290519081900360640190fd5b6001546040805163d67bdd2560e01b815290516001600160a01b03928316927f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a560169163d67bdd25916004808301926020929190829003018186803b15801561071257600080fd5b505afa158015610726573d6000803e3d6000fd5b505050506040513d602081101561073c57600080fd5b50516001600160a01b031614610796576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db881c1c9bde1e48185b1b1bddd95960321b604482015290519081900360640190fd5b600083815260036020526040812090815460ff1660048111156107b557fe5b14610800576040805162461bcd60e51b81526020600482015260166024820152755265717565737420616c72656164792065786973747360501b604482015290519081900360640190fd5b827f00000000000000000000000063975d9e7cf434dcd04bd808d8c79d03ef69100b6001600160a01b0316638d552d46866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561086557600080fd5b505afa158015610879573d6000803e3d6000fd5b505050506040513d602081101561088f57600080fd5b505114156109e7577f00000000000000000000000063975d9e7cf434dcd04bd808d8c79d03ef69100b6001600160a01b031663f6a94ecb858460006040518463ffffffff1660e01b815260040180848152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561091757600080fd5b505af1925050508015610928575060015b61097d57805460ff191660011781556040805184815290516001600160a01b0384169186917f505c6b33937ba1c7bcfdcc208ea84cd66a66bac1e59de92b7ff784d722741e42916020908290030190a36109e2565b80546001600160a01b0383166101008102600260ff1990931692909217610100600160a81b03191691909117825560408051858152905186917f6f066f0a8c7c11806be5f3b5b04dd89e76a1b67a44fd8762a27916c3742fecd4919081900360200190a35b610a34565b805460ff191660011781556040805184815290516001600160a01b0384169186917f505c6b33937ba1c7bcfdcc208ea84cd66a66bac1e59de92b7ff784d722741e42916020908290030190a35b50505050565b60008181526003602052604090206002815460ff166004811115610a5a57fe5b14610aa5576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b805460ff19166003178155604080516024808201859052825180830390910181526044909101825260208082018051633e58db4560e21b6001600160e01b039091168117909152600154845163e5789d0360e01b8152945191947f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a5606001600160a01b039081169463dc8601b39491909316928692869263e5789d0392600480840193919291829003018186803b158015610b5e57600080fd5b505afa158015610b72573d6000803e3d6000fd5b505050506040513d6020811015610b8857600080fd5b50516040516001600160e01b031960e086901b1681526001600160a01b038416600482019081526044820183905260606024830190815284516064840152845191929091608490910190602086019080838360005b83811015610bf5578181015183820152602001610bdd565b50505050905090810190601f168015610c225780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610c4357600080fd5b505af1158015610c57573d6000803e3d6000fd5b505050506040513d6020811015610c6d57600080fd5b505060405184907fdc27e462533b1501e51699f0029f54dc934b0c4afdc1d3dfdaab131a8de5288e90600090a250505050565b6001546001600160a01b031681565b60008181526003602052604090206001815460ff166004811115610ccf57fe5b14610d1a576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b805460ff191681556040805160248082018590528251808303909101815260449091018252602080820180516001600160e01b0316630ebbdd2b60e41b908117909152600154845163e5789d0360e01b8152945191946001600160a01b037f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a56081169463dc8601b39491909316928692869263e5789d0392600480840193919291829003018186803b158015610dce57600080fd5b505afa158015610de2573d6000803e3d6000fd5b505050506040513d6020811015610df857600080fd5b50516040516001600160e01b031960e086901b1681526001600160a01b038416600482019081526044820183905260606024830190815284516064840152845191929091608490910190602086019080838360005b83811015610e65578181015183820152602001610e4d565b50505050905090810190601f168015610e925780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b505050506040513d6020811015610edd57600080fd5b505060405184907f7efba54574fc3f1379813d6e09d06b5e9913bd264f1468a34879d577d2110f5490600090a250505050565b60025481565b7f00000000000000000000000063975d9e7cf434dcd04bd808d8c79d03ef69100b81565b6000546001600160a01b03163314610f91576040805162461bcd60e51b815260206004820152601560248201527413db9b1e4819dbdd995c9b9bdc88185b1b1bddd959605a1b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b336001600160a01b037f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a5601614611023576040805162461bcd60e51b815260206004820152601060248201526f13db9b1e4810535088185b1b1bddd95960821b604482015290519081900360640190fd5b60025460001b7f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a5606001600160a01b0316639e307dff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561108257600080fd5b505afa158015611096573d6000803e3d6000fd5b505050506040513d60208110156110ac57600080fd5b5051146110fd576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db8818da185a5b88185b1b1bddd95960321b604482015290519081900360640190fd5b6001546040805163d67bdd2560e01b815290516001600160a01b03928316927f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a560169163d67bdd25916004808301926020929190829003018186803b15801561116457600080fd5b505afa158015611178573d6000803e3d6000fd5b505050506040513d602081101561118e57600080fd5b50516001600160a01b0316146111e8576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db881c1c9bde1e48185b1b1bddd95960321b604482015290519081900360640190fd5b600082815260036020819052604090912090815460ff16600481111561120a57fe5b14611255576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b8054600460ff199091161781556001810182905560408051838152905184917f1813d15d8cef51cff8bbd419a8e13e0655c1babea320dea4174d5e7bc40c4294919081900360200190a2505050565b336001600160a01b037f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a5601614611314576040805162461bcd60e51b815260206004820152601060248201526f13db9b1e4810535088185b1b1bddd95960821b604482015290519081900360640190fd5b60025460001b7f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a5606001600160a01b0316639e307dff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561137357600080fd5b505afa158015611387573d6000803e3d6000fd5b505050506040513d602081101561139d57600080fd5b5051146113ee576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db8818da185a5b88185b1b1bddd95960321b604482015290519081900360640190fd5b6001546040805163d67bdd2560e01b815290516001600160a01b03928316927f000000000000000000000000fe446bef1dbf7afe24e81e05bc8b271c1ba9a560169163d67bdd25916004808301926020929190829003018186803b15801561145557600080fd5b505afa158015611469573d6000803e3d6000fd5b505050506040513d602081101561147f57600080fd5b50516001600160a01b0316146114d9576040805162461bcd60e51b815260206004820152601a60248201527913db9b1e48199bdc995a59db881c1c9bde1e48185b1b1bddd95960321b604482015290519081900360640190fd5b600081815260036020819052604090912090815460ff1660048111156114fb57fe5b14611546576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b604482015290519081900360640190fd5b60008281526003602052604080822080546001600160a81b03191681556001018290558051630ebbdd2b60e41b81526004810185905290517f00000000000000000000000063975d9e7cf434dcd04bd808d8c79d03ef69100b6001600160a01b03169263ebbdd2b0926024808201939182900301818387803b1580156115cb57600080fd5b505af11580156115df573d6000803e3d6000fd5b50506040518492507f771bd0f0f064339da626238870be0bd3b8729b56b36a969926004c77065c95879150600090a25050565b6000546001600160a01b03163314611669576040805162461bcd60e51b815260206004820152601560248201527413db9b1e4819dbdd995c9b9bdc88185b1b1bddd959605a1b604482015290519081900360640190fd5b6001546001600160a01b0316156116c7576040805162461bcd60e51b815260206004820152601960248201527f466f726569676e2070726f787920616c72656164792073657400000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b03939093169290921790915560025556fea26469706673582212205eeacd3793ae4f9c1a4414b8311ac4b34df1678f7f58ab9da1a91cc9ea19c7ac64736f6c63430007040033