Contract 0xcb1822859cef82cd2eb4e6276c7916e692995130 1

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x121b3cd249e21571da43ee5b54b75c6ecc3a09c3deb63b3190a91fbd6454b80bRequest Resoluti...318517172022-08-13 18:00:363 hrs 15 mins ago0x91430cad2d3975766499717fa0d66a78d814e5c5 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.02316314 52
0x995043d97149feef1d9f8b27a9d1a6a140525178d102f4ea94b7ea20f652cb5bReport Payouts318501112022-08-13 17:01:044 hrs 14 mins ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.001462425 51
0xc1d06205438dea0692e4412c9d977d2427cad85375ded794e5d9e1ccf413c541Settle318501072022-08-13 17:00:564 hrs 15 mins ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.011975052 62
0xafc221e55074ca6638ef651154711bfb6f326f5f1d5edd97ff4b84290a1b2843Report Payouts318501032022-08-13 17:00:484 hrs 15 mins ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.001405075 49
0x068dabc32171f7d1fa125638b5b8ad03a49a9e19dfbcadbe1c4622e1e8e5b632Settle318500992022-08-13 17:00:404 hrs 15 mins ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.008112132 42
0xbfde5399f48cdfa50f3cf54aca95d91a91113d9d55ff2aa57aeadfdc19719028Request Resoluti...318451752022-08-13 13:45:457 hrs 30 mins ago0x91430cad2d3975766499717fa0d66a78d814e5c5 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.121939412 287
0xf66931ea969ae17e349ff9a855775359d44f54bd4259c1c8ac0b1d8a02755dabRequest Resoluti...318451722022-08-13 13:45:397 hrs 30 mins ago0x91430cad2d3975766499717fa0d66a78d814e5c5 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.120239908 283
0x3fadce10198205a1572d84d5195c59c494419261dc5e2c0ead24f7545a359be0Prepare And Init...318166652022-08-12 19:39:201 day 1 hr ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.04923624 40
0x27e61f71ab931dda25e1f673055641d4c889187a1f52ac39367913fc75f5d09bPrepare And Init...318163922022-08-12 19:29:061 day 1 hr ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.04062069 33
0x58543092cde7a0854c1bb667dc855bce9a7050a1d7673d59e12083968331398dPrepare And Init...318161292022-08-12 19:17:561 day 1 hr ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.05539347 45
0x626ce9f11e76ccb51520d6e472bc2897114ebb774bcc14b36d284fc8652d4cb4Prepare And Init...318160332022-08-12 19:14:361 day 2 hrs ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.039386304 32
0x1d062c375d1c313e949eff663545f5ae19cdbb73151a8f84220bec0620b1b067Report Payouts318152542022-08-12 18:45:421 day 2 hrs ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.00212195 74
0x06d69ac118eda51bb032b2ee5e5d92107eec3a4f9cffd718e6374c22a9ea0b8aSettle318152492022-08-12 18:45:321 day 2 hrs ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.015539264 76
0xb1dc0e06599e138fe0b2ec70626e2610b6beda0b03f4f18eb55bbee7699c7c23Report Payouts318145182022-08-12 18:15:481 day 3 hrs ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.002093275 73
0xebd5b501d144032fb3564c33e00a6a8185bb52e1ad12c774fbaaf8c2812980afSettle318145162022-08-12 18:15:401 day 3 hrs ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.017945818 71
0x1fee053019244245874e6dc6e166c0853beedc8a240fd2908bde735cceb4e76eReport Payouts318127872022-08-12 17:03:481 day 4 hrs ago0x91430cad2d3975766499717fa0d66a78d814e5c5 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.015231202 86
0x653935a655da480a62fe3ab4f92ba97f07c2460edd5ce0986a30e8bb14318097Report Payouts318127772022-08-12 17:03:281 day 4 hrs ago0x91430cad2d3975766499717fa0d66a78d814e5c5 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.014703875 79
0xf5de6541631c25ac0a2d6c2e1ce97aac7397e989816137c41d508cc1fcd9ae3eSettle318127012022-08-12 17:00:521 day 4 hrs ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.01249856 80
0x5760c7ff7b2525cc90869b6dd621755379d5f349b79171cd9dace8c6f67648eeSettle318126952022-08-12 17:00:401 day 4 hrs ago0xfffff915bb551f32dafa7f5463a1291f1ec69d7d IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.015755058 94
0x64be9942ac67aee5d850e96dc507f1219bf883c4ebebf2aec407e977a63e4331Request Resoluti...318121722022-08-12 16:30:451 day 4 hrs ago0x91430cad2d3975766499717fa0d66a78d814e5c5 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.03245455 74
0xe8e344b1604cee8429a71e19fda18310a0c838cb34bf42ff268b238b0d5db844Prepare And Init...318120332022-08-12 16:25:071 day 4 hrs ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.067557072 66
0x787b5c543212ffd8a7d773d040fdce240e3ad11e7f82ef6f964828b14e40aec1Prepare And Init...318118332022-08-12 16:16:031 day 4 hrs ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.11219432 49
0x40773cd1d86919545cdb383cc4e554a2efc0fa3860b9ec07cca7aa6f1c7bbbb7Prepare And Init...318117782022-08-12 16:14:131 day 5 hrs ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.12135304 53
0x0087ecbb0fcc6ad4d4d53e84c53ae5b62e302edbe0797a4f28e23986158789f5Prepare And Init...318117172022-08-12 16:12:071 day 5 hrs ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.12135304 53
0xa0d2add9a8cf2ecce12ad4e0d8fbb696d1b02c50453d6e02c72232c8711765bbPrepare And Init...318116772022-08-12 16:10:431 day 5 hrs ago0x281777d3bdd096d302791f94a2e429bb98474227 IN  0xcb1822859cef82cd2eb4e6276c7916e6929951300 MATIC0.1259324 55
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UmaConditionalTokensBinaryAdapter

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 2 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 8 : UmaConditionalTokensBinaryAdapter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import { TransferHelper } from "./libraries/TransferHelper.sol";

import { FinderInterface } from "./interfaces/FinderInterface.sol";
import { IConditionalTokens } from "./interfaces/IConditionalTokens.sol";
import { OptimisticOracleInterface } from "./interfaces/OptimisticOracleInterface.sol";
import { AddressWhitelistInterface } from "./interfaces/AddressWhitelistInterface.sol";

/// @title UmaConditionalTokensBinaryAdapter
/// @notice Enables Conditional Token resolution via UMA's Optimistic Oracle
contract UmaConditionalTokensBinaryAdapter is ReentrancyGuard {
    /// @notice Auth
    mapping(address => uint256) public wards;

    /// @notice Authorizes a user
    function rely(address usr) external auth {
        wards[usr] = 1;
        emit AuthorizedUser(usr);
    }

    /// @notice Deauthorizes a user
    function deny(address usr) external auth {
        wards[usr] = 0;
        emit DeauthorizedUser(usr);
    }

    event AuthorizedUser(address indexed usr);
    event DeauthorizedUser(address indexed usr);

    /// @notice - Authorization modifier
    modifier auth() {
        require(wards[msg.sender] == 1, "Adapter/not-authorized");
        _;
    }

    /// @notice Conditional Tokens
    IConditionalTokens public immutable conditionalTokenContract;

    /// @notice UMA Finder address
    address public umaFinder;

    /// @notice Unique query identifier for the Optimistic Oracle
    bytes32 public constant identifier = "YES_OR_NO_QUERY";

    /// @notice Time period after which an authorized user can emergency resolve a condition
    uint256 public constant emergencySafetyPeriod = 2 days;

    struct QuestionData {
        // Unix timestamp(in seconds) at which a market can be resolved
        uint256 resolutionTime;
        // Reward offered to a successful proposer
        uint256 reward;
        // Additional bond required by Optimistic oracle proposers and disputers
        uint256 proposalBond;
        // Flag marking the block number when a question was settled
        uint256 settled;
        // Request timestmap, set when a request is made to the Optimistic Oracle
        uint256 requestTimestamp;
        // Admin Resolution timestamp, set when a market is flagged for admin resolution
        uint256 adminResolutionTimestamp;
        // Flag marking whether a question can be resolved early
        bool earlyResolutionEnabled;
        // Flag marking whether a question is resolved
        bool resolved;
        // Flag marking whether a question is paused
        bool paused;
        // ERC20 token address used for payment of rewards, proposal bonds and fees
        address rewardToken;
        // Data used to resolve a condition
        bytes ancillaryData;
    }

    /// @notice Mapping of questionID to QuestionData
    mapping(bytes32 => QuestionData) public questions;

    /*
    ////////////////////////////////////////////////////////////////////
                            EVENTS 
    ////////////////////////////////////////////////////////////////////
    */

    /// @notice Emitted when the UMA Finder is changed
    event NewFinderAddress(address oldFinder, address newFinder);

    /// @notice Emitted when a questionID is initialized
    event QuestionInitialized(
        bytes32 indexed questionID,
        bytes ancillaryData,
        uint256 resolutionTime,
        address rewardToken,
        uint256 reward,
        uint256 proposalBond,
        bool earlyResolutionEnabled
    );

    /// @notice Emitted when a questionID is updated
    event QuestionUpdated(
        bytes32 indexed questionID,
        bytes ancillaryData,
        uint256 resolutionTime,
        address rewardToken,
        uint256 reward,
        uint256 proposalBond,
        bool earlyResolutionEnabled
    );

    /// @notice Emitted when a question is paused by an authorized user
    event QuestionPaused(bytes32 questionID);

    /// @notice Emitted when a question is unpaused by an authorized user
    event QuestionUnpaused(bytes32 questionID);

    /// @notice Emitted when a question is flagged by an admin for emergency resolution
    event QuestionFlaggedForAdminResolution(bytes32 questionID);

    /// @notice Emitted when resolution data is requested from the Optimistic Oracle
    event ResolutionDataRequested(
        address indexed requestor,
        uint256 indexed requestTimestamp,
        bytes32 indexed questionID,
        bytes32 identifier,
        bytes ancillaryData,
        address rewardToken,
        uint256 reward,
        uint256 proposalBond,
        bool earlyResolution
    );

    /// @notice Emitted when a question is reset
    event QuestionReset(bytes32 indexed questionID);

    /// @notice Emitted when a question is settled
    event QuestionSettled(bytes32 indexed questionID, int256 indexed settledPrice, bool indexed earlyResolution);

    /// @notice Emitted when a question is resolved
    event QuestionResolved(bytes32 indexed questionID, bool indexed emergencyReport);

    constructor(address conditionalTokenAddress, address umaFinderAddress) {
        wards[msg.sender] = 1;
        emit AuthorizedUser(msg.sender);
        conditionalTokenContract = IConditionalTokens(conditionalTokenAddress);
        umaFinder = umaFinderAddress;
    }

    /*
    ////////////////////////////////////////////////////////////////////
                            PUBLIC 
    ////////////////////////////////////////////////////////////////////
    */

    /// @notice Initializes a question on the Adapter to report on
    /// @param questionID               - The unique questionID of the question
    /// @param ancillaryData            - Data used to resolve a question
    /// @param resolutionTime           - Timestamp after which the Adapter can resolve a question
    /// @param rewardToken              - ERC20 token address used for payment of rewards and fees
    /// @param reward                   - Reward offered to a successful proposer
    /// @param proposalBond             - Bond required to be posted by a price proposer and disputer
    /// @param earlyResolutionEnabled   - Determines whether a question can be resolved early
    function initializeQuestion(
        bytes32 questionID,
        bytes memory ancillaryData,
        uint256 resolutionTime,
        address rewardToken,
        uint256 reward,
        uint256 proposalBond,
        bool earlyResolutionEnabled
    ) public {
        require(!isQuestionInitialized(questionID), "Adapter::initializeQuestion: Question already initialized");
        require(resolutionTime > 0, "Adapter::initializeQuestion: resolutionTime must be positive");
        require(supportedToken(rewardToken), "Adapter::unsupported reward token");

        questions[questionID] = QuestionData({
            ancillaryData: ancillaryData,
            resolutionTime: resolutionTime,
            rewardToken: rewardToken,
            reward: reward,
            proposalBond: proposalBond,
            earlyResolutionEnabled: earlyResolutionEnabled,
            resolved: false,
            paused: false,
            settled: 0,
            requestTimestamp: 0,
            adminResolutionTimestamp: 0
        });

        emit QuestionInitialized(
            questionID,
            ancillaryData,
            resolutionTime,
            rewardToken,
            reward,
            proposalBond,
            earlyResolutionEnabled
        );
    }

    /// @notice Checks whether or not a question can start the resolution process
    /// @param questionID - The unique questionID of the question
    function readyToRequestResolution(bytes32 questionID) public view returns (bool) {
        // Ensure question has been initialized
        if (!isQuestionInitialized(questionID)) {
            return false;
        }
        QuestionData storage questionData = questions[questionID];

        // Ensure resolution data has not already been requested for the question
        if (resolutionDataRequested(questionData)) {
            return false;
        }

        // Ensure the question is not already resolved
        if (questionData.resolved) {
            return false;
        }

        // If early resolution is enabled, do not restrict resolution to after resolution time
        if (questionData.earlyResolutionEnabled) {
            return true;
        }
        // Ensure that current time is after resolution time
        return block.timestamp > questionData.resolutionTime;
    }

    /// @notice Request resolution data from the Optimistic Oracle
    /// @param questionID - The unique questionID of the question
    function requestResolutionData(bytes32 questionID) public nonReentrant {
        require(
            readyToRequestResolution(questionID),
            "Adapter::requestResolutionData: Question not ready to be resolved"
        );
        QuestionData storage questionData = questions[questionID];
        require(!questionData.paused, "Adapter::requestResolutionData: Question is paused");

        _requestResolution(questionID, questionData);
    }

    /// @notice Requests data from the Optimistic Oracle
    /// @param questionID   - The unique questionID of the question
    /// @param questionData - The questionData of the question
    function _requestResolution(bytes32 questionID, QuestionData storage questionData) internal {
        // Update request timestamp
        questionData.requestTimestamp = block.timestamp;

        // Request a price
        _requestPrice(
            msg.sender,
            identifier,
            questionData.requestTimestamp,
            questionData.ancillaryData,
            questionData.rewardToken,
            questionData.reward,
            questionData.proposalBond
        );

        emit ResolutionDataRequested(
            msg.sender,
            questionData.requestTimestamp,
            questionID,
            identifier,
            questionData.ancillaryData,
            questionData.rewardToken,
            questionData.reward,
            questionData.proposalBond,
            questionData.earlyResolutionEnabled && questionData.requestTimestamp < questionData.resolutionTime
        );
    }

    /// @notice Request a price from the Optimistic Oracle
    /// @dev Transfers reward token from the requestor if non-zero reward is specified
    function _requestPrice(
        address requestor,
        bytes32 priceIdentifier,
        uint256 timestamp,
        bytes memory ancillaryData,
        address rewardToken,
        uint256 reward,
        uint256 bond
    ) internal {
        // Fetch the optimistic oracle
        OptimisticOracleInterface optimisticOracle = getOptimisticOracle();

        // If non-zero reward, pay for the price request by transferring rewardToken from the requestor
        if (reward > 0) {
            TransferHelper.safeTransferFrom(rewardToken, requestor, address(this), reward);

            // Approve the OO to transfer the reward token from the Adapter
            if (IERC20(rewardToken).allowance(address(this), address(optimisticOracle)) < type(uint256).max) {
                TransferHelper.safeApprove(rewardToken, address(optimisticOracle), type(uint256).max);
            }
        }

        // Send a price request to the Optimistic oracle
        optimisticOracle.requestPrice(priceIdentifier, timestamp, ancillaryData, IERC20(rewardToken), reward);

        // Update the proposal bond on the Optimistic oracle if necessary
        if (bond > 0) {
            optimisticOracle.setBond(priceIdentifier, timestamp, ancillaryData, bond);
        }
    }

    /// @notice Checks whether a questionID is ready to be settled
    /// @param questionID - The unique questionID of the question
    function readyToSettle(bytes32 questionID) public view returns (bool) {
        if (!isQuestionInitialized(questionID)) {
            return false;
        }
        QuestionData storage questionData = questions[questionID];
        // Ensure resolution data has been requested for question
        if (resolutionDataRequested(questionData) == false) {
            return false;
        }
        // Ensure question has not been resolved
        if (questionData.resolved == true) {
            return false;
        }
        // Ensure question has not been settled
        if (questionData.settled != 0) {
            return false;
        }

        OptimisticOracleInterface optimisticOracle = getOptimisticOracle();

        return
            optimisticOracle.hasPrice(
                address(this),
                identifier,
                questionData.requestTimestamp,
                questionData.ancillaryData
            );
    }

    /// @notice Settle/finalize the resolution data of a question
    /// @notice If the OO returns the ignore price, this method resets the question, allowing new price requests
    /// @param questionID - The unique questionID of the question
    function settle(bytes32 questionID) public {
        require(readyToSettle(questionID), "Adapter::settle: questionID is not ready to be settled");
        QuestionData storage questionData = questions[questionID];
        require(!questionData.paused, "Adapter::settle: Question is paused");

        return _settle(questionID, questionData);
    }

    function _settle(bytes32 questionID, QuestionData storage questionData) internal {
        OptimisticOracleInterface optimisticOracle = getOptimisticOracle();

        int256 proposedPrice = optimisticOracle
            .getRequest(address(this), identifier, questionData.requestTimestamp, questionData.ancillaryData)
            .proposedPrice;

        // NOTE: If the proposed price is the ignore price, reset the question, allowing new resolution requests
        if (proposedPrice == ignorePrice()) {
            _resetQuestion(questionID, questionData, optimisticOracle);
            return;
        }

        // Set the settled block number
        questionData.settled = block.number;

        // Settle the price
        int256 settledPrice = optimisticOracle.settleAndGetPrice(
            identifier,
            questionData.requestTimestamp,
            questionData.ancillaryData
        );
        emit QuestionSettled(questionID, settledPrice, questionData.requestTimestamp < questionData.resolutionTime);
    }

    function _resetQuestion(
        bytes32 questionID,
        QuestionData storage questionData,
        OptimisticOracleInterface optimisticOracle
    ) internal {
        optimisticOracle.settleAndGetPrice(identifier, questionData.requestTimestamp, questionData.ancillaryData);
        questionData.requestTimestamp = 0;
        emit QuestionReset(questionID);
    }

    /// @notice Retrieves the expected payout of a settled question
    /// @param questionID - The unique questionID of the question
    function getExpectedPayouts(bytes32 questionID) public view returns (uint256[] memory) {
        require(isQuestionInitialized(questionID), "Adapter::getExpectedPayouts: questionID is not initialized");
        QuestionData storage questionData = questions[questionID];

        require(
            resolutionDataRequested(questionData),
            "Adapter::getExpectedPayouts: resolutionData has not been requested"
        );
        require(!questionData.resolved, "Adapter::getExpectedPayouts: questionID is already resolved");
        require(questionData.settled > 0, "Adapter::getExpectedPayouts: questionID is not settled");
        require(!questionData.paused, "Adapter::getExpectedPayouts: Question is paused");

        // Fetches resolution data from OO
        int256 resolutionData = getExpectedResolutionData(questionData);

        // Payouts: [YES, NO]
        uint256[] memory payouts = new uint256[](2);

        // Valid prices are 0, 0.5 and 1
        require(
            resolutionData == 0 || resolutionData == 0.5 ether || resolutionData == 1 ether,
            "Adapter::reportPayouts: Invalid resolution data"
        );

        if (resolutionData == 0) {
            // NO: Report [Yes, No] as [0, 1]
            payouts[0] = 0;
            payouts[1] = 1;
        } else if (resolutionData == 0.5 ether) {
            // UNKNOWN: Report [Yes, No] as [1, 1], 50/50
            payouts[0] = 1;
            payouts[1] = 1;
        } else {
            // YES: Report [Yes, No] as [1, 0]
            payouts[0] = 1;
            payouts[1] = 0;
        }
        return payouts;
    }

    function getExpectedResolutionData(QuestionData storage questionData) internal view returns (int256) {
        return
            getOptimisticOracle()
                .getRequest(address(this), identifier, questionData.requestTimestamp, questionData.ancillaryData)
                .resolvedPrice;
    }

    /// @notice Resolves a question
    /// @param questionID - The unique questionID of the question
    function reportPayouts(bytes32 questionID) public {
        QuestionData storage questionData = questions[questionID];

        // Payouts: [YES, NO]
        // getExpectedPayouts verifies that questionID is settled and can be resolved
        uint256[] memory payouts = getExpectedPayouts(questionID);

        require(
            block.number > questionData.settled,
            "Adapter::reportPayouts: Attempting to settle and reportPayouts in the same block"
        );

        questionData.resolved = true;
        conditionalTokenContract.reportPayouts(questionID, payouts);
        emit QuestionResolved(questionID, false);
    }

    /*
    ////////////////////////////////////////////////////////////////////
                            AUTHORIZED ONLY FUNCTIONS 
    ////////////////////////////////////////////////////////////////////
    */

    /// @notice Allows an authorized user to update a question
    /// @param questionID             - The unique questionID of the question
    /// @param ancillaryData          - Data used to resolve a question
    /// @param resolutionTime         - Timestamp after which the Adapter can resolve a question
    /// @param rewardToken            - ERC20 token address used for payment of rewards and fees
    /// @param reward                 - Reward offered to a successful proposer
    /// @param proposalBond           - Bond required to be posted by a price proposer and disputer
    /// @param earlyResolutionEnabled - Determines whether a question can be resolved early
    function updateQuestion(
        bytes32 questionID,
        bytes memory ancillaryData,
        uint256 resolutionTime,
        address rewardToken,
        uint256 reward,
        uint256 proposalBond,
        bool earlyResolutionEnabled
    ) external auth {
        require(isQuestionInitialized(questionID), "Adapter::updateQuestion: Question not initialized");
        require(resolutionTime > 0, "Adapter::updateQuestion: resolutionTime must be positive");
        require(supportedToken(rewardToken), "Adapter::unsupported reward token");
        require(questions[questionID].settled == 0, "Adapter::updateQuestion: Question is already settled");

        questions[questionID] = QuestionData({
            ancillaryData: ancillaryData,
            resolutionTime: resolutionTime,
            rewardToken: rewardToken,
            reward: reward,
            proposalBond: proposalBond,
            earlyResolutionEnabled: earlyResolutionEnabled,
            resolved: false,
            paused: false,
            settled: 0,
            requestTimestamp: 0,
            adminResolutionTimestamp: 0
        });

        emit QuestionUpdated(
            questionID,
            ancillaryData,
            resolutionTime,
            rewardToken,
            reward,
            proposalBond,
            earlyResolutionEnabled
        );
    }

    /// @notice Flags a market for emergency resolution in an emergency
    /// @param questionID - The unique questionID of the question
    function flagQuestionForEmergencyResolution(bytes32 questionID) external auth {
        require(
            isQuestionInitialized(questionID),
            "Adapter::flagQuestionForEarlyResolution: questionID is not initialized"
        );

        require(
            !isQuestionFlaggedForEmergencyResolution(questionID),
            "Adapter::emergencyReportPayouts: questionID is already flagged for emergency resolution"
        );

        questions[questionID].adminResolutionTimestamp = block.timestamp + emergencySafetyPeriod;
        emit QuestionFlaggedForAdminResolution(questionID);
    }

    /// @notice Allows an authorized user to report payouts in an emergency
    /// @param questionID - The unique questionID of the question
    /// @param payouts - Array of position payouts for the referenced question
    function emergencyReportPayouts(bytes32 questionID, uint256[] calldata payouts) external auth {
        require(isQuestionInitialized(questionID), "Adapter::emergencyReportPayouts: questionID is not initialized");

        require(
            isQuestionFlaggedForEmergencyResolution(questionID),
            "Adapter::emergencyReportPayouts: questionID is not flagged for emergency resolution"
        );

        require(
            block.timestamp > questions[questionID].adminResolutionTimestamp,
            "Adapter::emergencyReportPayouts: safety period has not passed"
        );

        require(payouts.length == 2, "Adapter::emergencyReportPayouts: payouts must be binary");

        QuestionData storage questionData = questions[questionID];

        questionData.resolved = true;
        conditionalTokenContract.reportPayouts(questionID, payouts);
        emit QuestionResolved(questionID, true);
    }

    /// @notice Allows an authorized user to pause market resolution in an emergency
    /// @param questionID - The unique questionID of the question
    function pauseQuestion(bytes32 questionID) external auth {
        require(isQuestionInitialized(questionID), "Adapter::pauseQuestion: questionID is not initialized");
        QuestionData storage questionData = questions[questionID];

        questionData.paused = true;
        emit QuestionPaused(questionID);
    }

    /// @notice Allows an authorized user to unpause market resolution in an emergency
    /// @param questionID - The unique questionID of the question
    function unPauseQuestion(bytes32 questionID) external auth {
        require(isQuestionInitialized(questionID), "Adapter::unPauseQuestion: questionID is not initialized");
        QuestionData storage questionData = questions[questionID];
        questionData.paused = false;
        emit QuestionUnpaused(questionID);
    }

    /// @notice Allows an authorized user to update the UMA Finder address
    /// @param newFinderAddress - The new finder address
    function setFinderAddress(address newFinderAddress) external auth {
        emit NewFinderAddress(umaFinder, newFinderAddress);
        umaFinder = newFinderAddress;
    }

    /*
    ////////////////////////////////////////////////////////////////////
                            UTILITY FUNCTIONS 
    ////////////////////////////////////////////////////////////////////
    */

    /// @notice Utility function that atomically prepares a question on the Conditional Tokens contract
    ///         and initializes it on the Adapter
    /// @dev Prepares the condition using the Adapter as the oracle and a fixed outcomeSlotCount
    /// @param questionID               - The unique questionID of the question
    /// @param ancillaryData            - Data used to resolve a question
    /// @param resolutionTime           - Timestamp after which the Adapter can resolve a question
    /// @param rewardToken              - ERC20 token address used for payment of rewards and fees
    /// @param reward                   - Reward offered to a successful proposer
    /// @param proposalBond             - Bond required to be posted by a price proposer and disputer
    /// @param earlyResolutionEnabled   - Determines whether a question can be resolved early
    function prepareAndInitialize(
        bytes32 questionID,
        bytes memory ancillaryData,
        uint256 resolutionTime,
        address rewardToken,
        uint256 reward,
        uint256 proposalBond,
        bool earlyResolutionEnabled
    ) public {
        conditionalTokenContract.prepareCondition(address(this), questionID, 2);
        initializeQuestion(
            questionID,
            ancillaryData,
            resolutionTime,
            rewardToken,
            reward,
            proposalBond,
            earlyResolutionEnabled
        );
    }

    /// @notice Utility function that verifies if a question is initialized
    /// @param questionID - The unique questionID
    function isQuestionInitialized(bytes32 questionID) public view returns (bool) {
        return questions[questionID].resolutionTime > 0;
    }

    function isQuestionFlaggedForEmergencyResolution(bytes32 questionID) public view returns (bool) {
        return questions[questionID].adminResolutionTimestamp > 0;
    }

    // Checks if a request has been sent to the Optimistic Oracle
    function resolutionDataRequested(QuestionData storage questionData) internal view returns (bool) {
        return questionData.requestTimestamp > 0;
    }

    /// @notice Price that indicates that the OO does not have a valid price yet
    function ignorePrice() public pure returns (int256) {
        return type(int256).min;
    }

    function getOptimisticOracleAddress() internal view returns (address) {
        return FinderInterface(umaFinder).getImplementationAddress("OptimisticOracle");
    }

    function getOptimisticOracle() internal view returns (OptimisticOracleInterface) {
        return OptimisticOracleInterface(getOptimisticOracleAddress());
    }

    function getCollateralWhitelistAddress() internal view returns (address) {
        return FinderInterface(umaFinder).getImplementationAddress("CollateralWhitelist");
    }

    function supportedToken(address token) internal view returns (bool) {
        return AddressWhitelistInterface(getCollateralWhitelistAddress()).isOnWhitelist(token);
    }
}

File 4 of 8 : AddressWhitelistInterface.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;

interface AddressWhitelistInterface {
    function addToWhitelist(address newElement) external;

    function removeFromWhitelist(address newElement) external;

    function isOnWhitelist(address newElement) external view returns (bool);

    function getWhitelist() external view returns (address[] memory);
}

File 5 of 8 : FinderInterface.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.0;

/**
 * @title Provides addresses of the live contracts implementing certain interfaces.
 * @dev Examples are the Oracle or Store interfaces.
 */
interface FinderInterface {
    /**
     * @notice Updates the address of the contract that implements `interfaceName`.
     * @param interfaceName bytes32 encoding of the interface name that is either changed or registered.
     * @param implementationAddress address of the deployed contract that implements the interface.
     */
    function changeImplementationAddress(bytes32 interfaceName, address implementationAddress) external;

    /**
     * @notice Gets the address of the contract that implements the given `interfaceName`.
     * @param interfaceName queried interface.
     * @return implementationAddress address of the deployed contract that implements the interface.
     */
    function getImplementationAddress(bytes32 interfaceName) external view returns (address);
}

File 6 of 8 : IConditionalTokens.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IConditionalTokens {
    /// @dev Emitted upon the successful preparation of a condition.
    /// @param conditionId The condition's ID. This ID may be derived from the other three parameters via ``keccak256(abi.encodePacked(oracle, questionId, outcomeSlotCount))``.
    /// @param oracle The account assigned to report the result for the prepared condition.
    /// @param questionId An identifier for the question to be answered by the oracle.
    /// @param outcomeSlotCount The number of outcome slots which should be used for this condition. Must not exceed 256.
    event ConditionPreparation(
        bytes32 indexed conditionId,
        address indexed oracle,
        bytes32 indexed questionId,
        uint256 outcomeSlotCount
    );

    event ConditionResolution(
        bytes32 indexed conditionId,
        address indexed oracle,
        bytes32 indexed questionId,
        uint256 outcomeSlotCount,
        uint256[] payoutNumerators
    );

    /// @dev Emitted when a position is successfully split.
    event PositionSplit(
        address indexed stakeholder,
        IERC20 collateralToken,
        bytes32 indexed parentCollectionId,
        bytes32 indexed conditionId,
        uint256[] partition,
        uint256 amount
    );
    /// @dev Emitted when positions are successfully merged.
    event PositionsMerge(
        address indexed stakeholder,
        IERC20 collateralToken,
        bytes32 indexed parentCollectionId,
        bytes32 indexed conditionId,
        uint256[] partition,
        uint256 amount
    );
    event PayoutRedemption(
        address indexed redeemer,
        IERC20 indexed collateralToken,
        bytes32 indexed parentCollectionId,
        bytes32 conditionId,
        uint256[] indexSets,
        uint256 payout
    );

    /// Mapping key is an condition ID. Value represents numerators of the payout vector associated with the condition. This array is initialized with a length equal to the outcome slot count. E.g. Condition with 3 outcomes [A, B, C] and two of those correct [0.5, 0.5, 0]. In Ethereum there are no decimal values, so here, 0.5 is represented by fractions like 1/2 == 0.5. That's why we need numerator and denominator values. Payout numerators are also used as a check of initialization. If the numerators array is empty (has length zero), the condition was not created/prepared. See getOutcomeSlotCount.
    function payoutNumerators(bytes32) external returns (uint256[] memory);

    /// Denominator is also used for checking if the condition has been resolved. If the denominator is non-zero, then the condition has been resolved.
    function payoutDenominator(bytes32) external returns (uint256);

    /// @dev This function prepares a condition by initializing a payout vector associated with the condition.
    /// @param oracle The account assigned to report the result for the prepared condition.
    /// @param questionId An identifier for the question to be answered by the oracle.
    /// @param outcomeSlotCount The number of outcome slots which should be used for this condition. Must not exceed 256.
    function prepareCondition(
        address oracle,
        bytes32 questionId,
        uint256 outcomeSlotCount
    ) external;

    /// @dev Called by the oracle for reporting results of conditions. Will set the payout vector for the condition with the ID ``keccak256(abi.encodePacked(oracle, questionId, outcomeSlotCount))``, where oracle is the message sender, questionId is one of the parameters of this function, and outcomeSlotCount is the length of the payouts parameter, which contains the payoutNumerators for each outcome slot of the condition.
    /// @param questionId The question ID the oracle is answering for
    /// @param payouts The oracle's answer
    function reportPayouts(bytes32 questionId, uint256[] calldata payouts) external;

    /// @dev This function splits a position. If splitting from the collateral, this contract will attempt to transfer `amount` collateral from the message sender to itself. Otherwise, this contract will burn `amount` stake held by the message sender in the position being split worth of EIP 1155 tokens. Regardless, if successful, `amount` stake will be minted in the split target positions. If any of the transfers, mints, or burns fail, the transaction will revert. The transaction will also revert if the given partition is trivial, invalid, or refers to more slots than the condition is prepared with.
    /// @param collateralToken The address of the positions' backing collateral token.
    /// @param parentCollectionId The ID of the outcome collections common to the position being split and the split target positions. May be null, in which only the collateral is shared.
    /// @param conditionId The ID of the condition to split on.
    /// @param partition An array of disjoint index sets representing a nontrivial partition of the outcome slots of the given condition. E.g. A|B and C but not A|B and B|C (is not disjoint). Each element's a number which, together with the condition, represents the outcome collection. E.g. 0b110 is A|B, 0b010 is B, etc.
    /// @param amount The amount of collateral or stake to split.
    function splitPosition(
        IERC20 collateralToken,
        bytes32 parentCollectionId,
        bytes32 conditionId,
        uint256[] calldata partition,
        uint256 amount
    ) external;

    function mergePositions(
        IERC20 collateralToken,
        bytes32 parentCollectionId,
        bytes32 conditionId,
        uint256[] calldata partition,
        uint256 amount
    ) external;

    function redeemPositions(
        IERC20 collateralToken,
        bytes32 parentCollectionId,
        bytes32 conditionId,
        uint256[] calldata indexSets
    ) external;

    /// @dev Gets the outcome slot count of a condition.
    /// @param conditionId ID of the condition.
    /// @return Number of outcome slots associated with a condition, or zero if condition has not been prepared yet.
    function getOutcomeSlotCount(bytes32 conditionId) external view returns (uint256);

    /// @dev Constructs a condition ID from an oracle, a question ID, and the outcome slot count for the question.
    /// @param oracle The account assigned to report the result for the prepared condition.
    /// @param questionId An identifier for the question to be answered by the oracle.
    /// @param outcomeSlotCount The number of outcome slots which should be used for this condition. Must not exceed 256.
    function getConditionId(
        address oracle,
        bytes32 questionId,
        uint256 outcomeSlotCount
    ) external pure returns (bytes32);

    /// @dev Constructs an outcome collection ID from a parent collection and an outcome collection.
    /// @param parentCollectionId Collection ID of the parent outcome collection, or bytes32(0) if there's no parent.
    /// @param conditionId Condition ID of the outcome collection to combine with the parent outcome collection.
    /// @param indexSet Index set of the outcome collection to combine with the parent outcome collection.
    function getCollectionId(
        bytes32 parentCollectionId,
        bytes32 conditionId,
        uint256 indexSet
    ) external view returns (bytes32);

    /// @dev Constructs a position ID from a collateral token and an outcome collection. These IDs are used as the ERC-1155 ID for this contract.
    /// @param collateralToken Collateral token which backs the position.
    /// @param collectionId ID of the outcome collection associated with this position.
    function getPositionId(IERC20 collateralToken, bytes32 collectionId) external pure returns (uint256);
}

File 7 of 8 : OptimisticOracleInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface OptimisticOracleInterface {
    // Struct representing a price request.
    struct Request {
        address proposer; // Address of the proposer.
        address disputer; // Address of the disputer.
        IERC20 currency; // ERC20 token used to pay rewards and fees.
        bool settled; // True if the request is settled.
        bool refundOnDispute; // True if the requester should be refunded their reward on dispute.
        int256 proposedPrice; // Price that the proposer submitted.
        int256 resolvedPrice; // Price resolved once the request is settled.
        uint256 expirationTime; // Time at which the request auto-settles without a dispute.
        uint256 reward; // Amount of the currency to pay to the proposer on settlement.
        uint256 finalFee; // Final fee to pay to the Store upon request to the DVM.
        uint256 bond; // Bond that the proposer and disputer must pay on top of the final fee.
        uint256 customLiveness; // Custom liveness value set by the requester.
    }

    /**
     * @notice Requests a new price.
     * @param identifier price identifier being requested.
     * @param timestamp timestamp of the price being requested.
     * @param ancillaryData ancillary data representing additional args being passed with the price request.
     * @param currency ERC20 token used for payment of rewards and fees. Must be approved for use with the DVM.
     * @param reward reward offered to a successful proposer. Will be pulled from the caller. Note: this can be 0,
     *               which could make sense if the contract requests and proposes the value in the same call or
     *               provides its own reward system.
     * @return totalBond default bond (final fee) + final fee that the proposer and disputer will be required to pay.
     * This can be changed with a subsequent call to setBond().
     */
    function requestPrice(
        bytes32 identifier,
        uint256 timestamp,
        bytes memory ancillaryData,
        IERC20 currency,
        uint256 reward
    ) external returns (uint256 totalBond);

    /**
     * @notice Set the proposal bond associated with a price request.
     * @param identifier price identifier to identify the existing request.
     * @param timestamp timestamp to identify the existing request.
     * @param ancillaryData ancillary data of the price being requested.
     * @param bond custom bond amount to set.
     * @return totalBond new bond + final fee that the proposer and disputer will be required to pay. This can be
     * changed again with a subsequent call to setBond().
     */
    function setBond(
        bytes32 identifier,
        uint256 timestamp,
        bytes memory ancillaryData,
        uint256 bond
    ) external returns (uint256 totalBond);

    /**
     * @notice Gets the current data structure containing all information about a price request.
     * @param requester sender of the initial price request.
     * @param identifier price identifier to identify the existing request.
     * @param timestamp timestamp to identify the existing request.
     * @param ancillaryData ancillary data of the price being requested.
     * @return the Request data structure.
     */
    function getRequest(
        address requester,
        bytes32 identifier,
        uint256 timestamp,
        bytes memory ancillaryData
    ) external view returns (Request memory);

    /**
     * @notice Attempts to settle an outstanding price request. Will revert if it isn't settleable.
     * @param requester sender of the initial price request.
     * @param identifier price identifier to identify the existing request.
     * @param timestamp timestamp to identify the existing request.
     * @param ancillaryData ancillary data of the price being requested.
     * @return payout the amount that the "winner" (proposer or disputer) receives on settlement. This amount includes
     * the returned bonds as well as additional rewards.
     */
    function settle(
        address requester,
        bytes32 identifier,
        uint256 timestamp,
        bytes memory ancillaryData
    ) external returns (uint256 payout);

    /**
     * @notice Retrieves a price that was previously requested by a caller. Reverts if the request is not settled
     * or settleable. Note: this method is not view so that this call may actually settle the price request if it
     * hasn't been settled.
     * @param identifier price identifier to identify the existing request.
     * @param timestamp timestamp to identify the existing request.
     * @param ancillaryData ancillary data of the price being requested.
     * @return resolved price.
     */
    function settleAndGetPrice(
        bytes32 identifier,
        uint256 timestamp,
        bytes memory ancillaryData
    ) external returns (int256);

    /**
     * @notice Checks if a given request has resolved or been settled (i.e the optimistic oracle has a price).
     * @param requester sender of the initial price request.
     * @param identifier price identifier to identify the existing request.
     * @param timestamp timestamp to identify the existing request.
     * @param ancillaryData ancillary data of the price being requested.
     * @return true if price has resolved or settled, false otherwise.
     */
    function hasPrice(
        address requester,
        bytes32 identifier,
        uint256 timestamp,
        bytes memory ancillaryData
    ) external view returns (bool);
}

File 8 of 8 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title TransferHelper
/// @author Uniswap: https://github.com/Uniswap/v3-periphery/blob/main/contracts/libraries/TransferHelper.sol
library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))), "STF");
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "ST");
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "SA");
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{ value: value }(new bytes(0));
        require(success, "STE");
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"conditionalTokenAddress","type":"address"},{"internalType":"address","name":"umaFinderAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"AuthorizedUser","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"DeauthorizedUser","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldFinder","type":"address"},{"indexed":false,"internalType":"address","name":"newFinder","type":"address"}],"name":"NewFinderAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"QuestionFlaggedForAdminResolution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"questionID","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"resolutionTime","type":"uint256"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proposalBond","type":"uint256"},{"indexed":false,"internalType":"bool","name":"earlyResolutionEnabled","type":"bool"}],"name":"QuestionInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"QuestionPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"QuestionReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"questionID","type":"bytes32"},{"indexed":true,"internalType":"bool","name":"emergencyReport","type":"bool"}],"name":"QuestionResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"questionID","type":"bytes32"},{"indexed":true,"internalType":"int256","name":"settledPrice","type":"int256"},{"indexed":true,"internalType":"bool","name":"earlyResolution","type":"bool"}],"name":"QuestionSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"QuestionUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"questionID","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"resolutionTime","type":"uint256"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proposalBond","type":"uint256"},{"indexed":false,"internalType":"bool","name":"earlyResolutionEnabled","type":"bool"}],"name":"QuestionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requestor","type":"address"},{"indexed":true,"internalType":"uint256","name":"requestTimestamp","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"questionID","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"identifier","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proposalBond","type":"uint256"},{"indexed":false,"internalType":"bool","name":"earlyResolution","type":"bool"}],"name":"ResolutionDataRequested","type":"event"},{"inputs":[],"name":"conditionalTokenContract","outputs":[{"internalType":"contract IConditionalTokens","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"deny","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"},{"internalType":"uint256[]","name":"payouts","type":"uint256[]"}],"name":"emergencyReportPayouts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencySafetyPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"flagQuestionForEmergencyResolution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"getExpectedPayouts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identifier","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ignorePrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"},{"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"internalType":"uint256","name":"resolutionTime","type":"uint256"},{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"proposalBond","type":"uint256"},{"internalType":"bool","name":"earlyResolutionEnabled","type":"bool"}],"name":"initializeQuestion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"isQuestionFlaggedForEmergencyResolution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"isQuestionInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"pauseQuestion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"},{"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"internalType":"uint256","name":"resolutionTime","type":"uint256"},{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"proposalBond","type":"uint256"},{"internalType":"bool","name":"earlyResolutionEnabled","type":"bool"}],"name":"prepareAndInitialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"questions","outputs":[{"internalType":"uint256","name":"resolutionTime","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"proposalBond","type":"uint256"},{"internalType":"uint256","name":"settled","type":"uint256"},{"internalType":"uint256","name":"requestTimestamp","type":"uint256"},{"internalType":"uint256","name":"adminResolutionTimestamp","type":"uint256"},{"internalType":"bool","name":"earlyResolutionEnabled","type":"bool"},{"internalType":"bool","name":"resolved","type":"bool"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"bytes","name":"ancillaryData","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"readyToRequestResolution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"readyToSettle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"rely","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"reportPayouts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"requestResolutionData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFinderAddress","type":"address"}],"name":"setFinderAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"settle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"umaFinder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"}],"name":"unPauseQuestion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"questionID","type":"bytes32"},{"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"internalType":"uint256","name":"resolutionTime","type":"uint256"},{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"proposalBond","type":"uint256"},{"internalType":"bool","name":"earlyResolutionEnabled","type":"bool"}],"name":"updateQuestion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b506040516200353f3803806200353f8339810160408190526200003491620000c8565b6001600081815533808252602083905260408083209390935591517f6be99b533364b794276e94ff114fbf96f7a82420a2033d88717a24603e4bd2959190a260609190911b6001600160601b031916608052600280546001600160a01b0319166001600160a01b03909216919091179055620000ff565b80516001600160a01b0381168114620000c357600080fd5b919050565b60008060408385031215620000db578182fd5b620000e683620000ab565b9150620000f660208401620000ab565b90509250929050565b60805160601c61340c62000133600039600081816104a30152818161070101528181610af60152611157015261340c6000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806386ec6288116100ee578063a29f7fd811610097578063bf353dbb11610071578063bf353dbb14610361578063c66d4c6c14610374578063de0ea6121461037c578063e81439991461038f576101a3565b8063a29f7fd814610328578063a39cc2991461033b578063be7054731461034e576101a3565b806395addb90116100c857806395addb90146102d8578063987757dd146103025780639c52a7f114610315576101a3565b806386ec6288146102aa5780638b5dc504146102bd578063918e2e35146102c5576101a3565b8063275180c01161015057806365fae35e1161012a57806365fae35e1461027a57806370b9e9041461028d5780637998a1c4146102a2576101a3565b8063275180c01461023457806334e5e28e146102475780633cc7926514610267576101a3565b806314b2dffc1161018157806314b2dffc146101f95780631d45ae871461020c5780632654320c14610221576101a3565b8063092149ed146101a85780630b950ca9146101d15780630d21a1ac146101e6575b600080fd5b6101bb6101b636600461215a565b6103a2565b6040516101c89190612592565b60405180910390f35b6101e46101df3660046120ff565b6103b9565b005b6101e46101f43660046121eb565b610473565b6101e461020736600461215a565b610527565b6102146105ff565b6040516101c8919061259d565b6101bb61022f36600461215a565b610623565b6101e461024236600461215a565b61069c565b61025a61025536600461215a565b61079c565b6040516101c8919061257f565b6101e461027536600461215a565b6109e4565b6101e46102883660046120ff565b610a7d565b610295610af4565b6040516101c891906124bb565b610214610b18565b6101e46102b836600461215a565b610b2e565b610295610be1565b6101bb6102d336600461215a565b610bf0565b6102eb6102e636600461215a565b610c07565b6040516101c89b9a99989796959493929190613264565b6101e461031036600461215a565b610d01565b6101e46103233660046120ff565b610d6e565b6101e46103363660046121eb565b610de2565b6101e4610349366004612172565b611056565b6101e461035c36600461215a565b6111f6565b61021461036f3660046120ff565b611298565b6102146112aa565b6101e461038a3660046121eb565b6112b1565b6101bb61039d36600461215a565b6114b5565b60008181526003602052604090205415155b919050565b33600090815260016020819052604090912054146103f25760405162461bcd60e51b81526004016103e990612994565b60405180910390fd5b6002546040517fbedcf54426d8d55b60e4e4112df13f213106b6fdfb1f61984a08d007a165306991610431916001600160a01b039091169084906124cf565b60405180910390a1600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6040517fd96ee7540000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d96ee754906104dd9030908b9060029060040161250d565b600060405180830381600087803b1580156104f757600080fd5b505af115801561050b573d6000803e3d6000fd5b5050505061051e878787878787876112b1565b50505050505050565b33600090815260016020819052604090912054146105575760405162461bcd60e51b81526004016103e990612994565b610560816103a2565b61057c5760405162461bcd60e51b81526004016103e9906130f0565b61058581610bf0565b156105a25760405162461bcd60e51b81526004016103e990613044565b6105af6202a3004261330e565b6000828152600360205260409081902060050191909155517fd96b8927b38f8cc48e678eeb45ee1c3a281d2ba49078ed4a5c00895d251e573b906105f490839061259d565b60405180910390a150565b7f800000000000000000000000000000000000000000000000000000000000000090565b600061062e826103a2565b61063a575060006103b4565b6000828152600360205260409020610651816115e6565b156106605760009150506103b4565b6006810154610100900460ff161561067c5760009150506103b4565b600681015460ff16156106935760019150506103b4565b54421192915050565b6000818152600360205260408120906106b48361079c565b9050816003015443116106d95760405162461bcd60e51b81526004016103e990612db9565b60068201805461ff001916610100179055604051633124a62b60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c49298ac906107389086908590600401612600565b600060405180830381600087803b15801561075257600080fd5b505af1158015610766573d6000803e3d6000fd5b5050604051600092508591507f5c3937ed929cd157b73b417381d743daf6e1ef65999e3ccb5dd64bc3247e28d6908390a3505050565b60606107a7826103a2565b6107c35760405162461bcd60e51b81526004016103e990612c1f565b60008281526003602052604090206107da816115e6565b6107f65760405162461bcd60e51b81526004016103e99061273d565b6006810154610100900460ff16156108205760405162461bcd60e51b81526004016103e990612f8a565b60008160030154116108445760405162461bcd60e51b81526004016103e990612a4e565b600681015462010000900460ff161561086f5760405162461bcd60e51b81526004016103e990612937565b600061087a826115ef565b60408051600280825260608201835292935060009290916020830190803683370190505090508115806108b45750816706f05b59d3b20000145b806108c6575081670de0b6b3a7640000145b6108e25760405162461bcd60e51b81526004016103e9906127c0565b8161094a5760008160008151811061090a57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060018160018151811061093957634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506109dc565b816706f05b59d3b20000141561097d5760018160008151811061090a57634e487b7160e01b600052603260045260246000fd5b6001816000815181106109a057634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506000816001815181106109cf57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b949350505050565b60026000541415610a075760405162461bcd60e51b81526004016103e990613173565b6002600055610a1581610623565b610a315760405162461bcd60e51b81526004016103e9906129cb565b6000818152600360205260409020600681015462010000900460ff1615610a6a5760405162461bcd60e51b81526004016103e9906131aa565b610a74828261169e565b50506001600055565b3360009081526001602081905260409091205414610aad5760405162461bcd60e51b81526004016103e990612994565b6001600160a01b038116600081815260016020819052604080832091909155517f6be99b533364b794276e94ff114fbf96f7a82420a2033d88717a24603e4bd2959190a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b6e5945535f4f525f4e4f5f515545525960881b81565b3360009081526001602081905260409091205414610b5e5760405162461bcd60e51b81526004016103e990612994565b610b67816103a2565b610b835760405162461bcd60e51b81526004016103e9906128da565b6000818152600360205260409081902060068101805462ff000019166201000017905590517f6ded7250a9d5f79aef5add44600fc20a74a0af6f4730baa4fc4ab87bf484b81290610bd590849061259d565b60405180910390a15050565b6002546001600160a01b031681565b600090815260036020526040902060050154151590565b60036020819052600091825260409091208054600182015460028301549383015460048401546005850154600686015460078701805496989597959694959394929360ff8084169461010085048216946201000081049092169363010000009092046001600160a01b0316929190610c7e90613362565b80601f0160208091040260200160405190810160405280929190818152602001828054610caa90613362565b8015610cf75780601f10610ccc57610100808354040283529160200191610cf7565b820191906000526020600020905b815481529060010190602001808311610cda57829003601f168201915b505050505090508b565b610d0a816114b5565b610d265760405162461bcd60e51b81526004016103e990612d5c565b6000818152600360205260409020600681015462010000900460ff1615610d5f5760405162461bcd60e51b81526004016103e990612b65565b610d69828261180c565b505b50565b3360009081526001602081905260409091205414610d9e5760405162461bcd60e51b81526004016103e990612994565b6001600160a01b038116600081815260016020526040808220829055517f75f7d814a7e98645388e45a05bafaf87a30979dbebd30db64acf618a8de3b10a9190a250565b3360009081526001602081905260409091205414610e125760405162461bcd60e51b81526004016103e990612994565b610e1b876103a2565b610e375760405162461bcd60e51b81526004016103e990612f2d565b60008511610e575760405162461bcd60e51b81526004016103e990613207565b610e60846119c0565b610e7c5760405162461bcd60e51b81526004016103e990612ed0565b6000878152600360208190526040909120015415610eac5760405162461bcd60e51b81526004016103e990612e73565b6040518061016001604052808681526020018481526020018381526020016000815260200160008152602001600081526020018215158152602001600015158152602001600015158152602001856001600160a01b031681526020018781525060036000898152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff0219169083151502179055506101008201518160060160026101000a81548160ff0219169083151502179055506101208201518160060160036101000a8154816001600160a01b0302191690836001600160a01b0316021790555061014082015181600701908051906020019061100792919061203a565b50905050867f32da4770ea275a14ae9d822d58709fe7bfb296969d46357149ed02fb4135a17b878787878787604051611045969594939291906126f6565b60405180910390a250505050505050565b33600090815260016020819052604090912054146110865760405162461bcd60e51b81526004016103e990612994565b61108f836103a2565b6110ab5760405162461bcd60e51b81526004016103e990612b08565b6110b483610bf0565b6110d05760405162461bcd60e51b81526004016103e990612c7c565b60008381526003602052604090206005015442116111005760405162461bcd60e51b81526004016103e990612cff565b600281146111205760405162461bcd60e51b81526004016103e990612bc2565b6000838152600360205260409081902060068101805461ff0019166101001790559051633124a62b60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c49298ac90611190908790879087906004016125a6565b600060405180830381600087803b1580156111aa57600080fd5b505af11580156111be573d6000803e3d6000fd5b5050604051600192508691507f5c3937ed929cd157b73b417381d743daf6e1ef65999e3ccb5dd64bc3247e28d690600090a350505050565b33600090815260016020819052604090912054146112265760405162461bcd60e51b81526004016103e990612994565b61122f816103a2565b61124b5760405162461bcd60e51b81526004016103e990612aab565b6000818152600360205260409081902060068101805462ff00001916905590517f92d28918c5574e7fc0f4f948c39502682c81cfb4089b07b83f95b3264e5e5e0690610bd590849061259d565b60016020526000908152604090205481565b6202a30081565b6112ba876103a2565b156112d75760405162461bcd60e51b81526004016103e990612fe7565b600085116112f75760405162461bcd60e51b81526004016103e990612854565b611300846119c0565b61131c5760405162461bcd60e51b81526004016103e990612ed0565b6040518061016001604052808681526020018481526020018381526020016000815260200160008152602001600081526020018215158152602001600015158152602001600015158152602001856001600160a01b031681526020018781525060036000898152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff0219169083151502179055506101008201518160060160026101000a81548160ff0219169083151502179055506101208201518160060160036101000a8154816001600160a01b0302191690836001600160a01b0316021790555061014082015181600701908051906020019061147792919061203a565b50905050867f53af6c2e40505bb55a47d917203a12c8f063b6c505c11094d98ac8f772e8a031878787878787604051611045969594939291906126f6565b60006114c0826103a2565b6114cc575060006103b4565b60008281526003602052604090206114e3816115e6565b6114f15760009150506103b4565b600681015460ff610100909104161515600114156115135760009150506103b4565b6003810154156115275760009150506103b4565b6000611531611a4b565b6004808401546040517fbc58ccaa0000000000000000000000000000000000000000000000000000000081529293506001600160a01b0384169263bc58ccaa926115969230926e5945535f4f525f4e4f5f515545525960881b9260078a01910161252e565b60206040518083038186803b1580156115ae57600080fd5b505afa1580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dc919061213e565b60040154151590565b60006115f9611a4b565b6001600160a01b031663a9904f9b306e5945535f4f525f4e4f5f515545525960881b8560040154866007016040518563ffffffff1660e01b8152600401611643949392919061252e565b6101806040518083038186803b15801561165c57600080fd5b505afa158015611670573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169491906122d8565b60c0015192915050565b42600482018190556007820180546117749233926e5945535f4f525f4e4f5f515545525960881b926116cf90613362565b80601f01602080910402602001604051908101604052809291908181526020018280546116fb90613362565b80156117485780601f1061171d57610100808354040283529160200191611748565b820191906000526020600020905b81548152906001019060200180831161172b57829003601f168201915b50505050508560060160039054906101000a90046001600160a01b031686600101548760020154611a5a565b600481015460068201546001830154600284015485939233927f6010c5373137e7c7c584b6bf87be56bf4a685890351251ac0a8d74e599455929926e5945535f4f525f4e4f5f515545525960881b926007890192630100000082046001600160a01b031692909160ff1680156117ee5750895460048b0154105b60405161180096959493929190612619565b60405180910390a45050565b6000611816611a4b565b90506000816001600160a01b031663a9904f9b306e5945535f4f525f4e4f5f515545525960881b8660040154876007016040518563ffffffff1660e01b8152600401611865949392919061252e565b6101806040518083038186803b15801561187e57600080fd5b505afa158015611892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b691906122d8565b60a0015190506118c46105ff565b8114156118dd576118d6848484611c75565b5050610d69565b4360038401556004808401546040516353b5923960e01b81526000926001600160a01b038616926353b592399261192e926e5945535f4f525f4e4f5f515545525960881b929160078b0191016126ce565b602060405180830381600087803b15801561194857600080fd5b505af115801561195c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198091906122c0565b845460048601546040519293501090829087907fa6da625874a330dac87557bbedb7b127cb0a1877a8a3e62d97dc00f8b57622bb90600090a45050505050565b60006119ca611d45565b6001600160a01b0316633a3ab672836040518263ffffffff1660e01b81526004016119f591906124bb565b60206040518083038186803b158015611a0d57600080fd5b505afa158015611a21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a45919061213e565b92915050565b6000611a55611dc4565b905090565b6000611a64611a4b565b90508215611b2657611a7884893086611df3565b6040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600019906001600160a01b0386169063dd62ed3e90611ac390309086906004016124cf565b60206040518083038186803b158015611adb57600080fd5b505afa158015611aef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1391906122c0565b1015611b2657611b268482600019611f18565b6040517f11df92f10000000000000000000000000000000000000000000000000000000081526001600160a01b038216906311df92f190611b73908a908a908a908a908a90600401612662565b602060405180830381600087803b158015611b8d57600080fd5b505af1158015611ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc591906122c0565b508115611c6b576040517fad5a755a0000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063ad5a755a90611c17908a908a908a90889060040161269e565b602060405180830381600087803b158015611c3157600080fd5b505af1158015611c45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6991906122c0565b505b5050505050505050565b6004808301546040516353b5923960e01b81526001600160a01b038416926353b5923992611cbc926e5945535f4f525f4e4f5f515545525960881b926007890191016126ce565b602060405180830381600087803b158015611cd657600080fd5b505af1158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e91906122c0565b5060006004830181905560405184917f7981b5832932948db4e32a4a16a0f44b2ce7ff088574afb9364b313f70f82e8f91a2505050565b6002546040516302abf57960e61b81526000916001600160a01b03169063aafd5e4090611d74906004016130c7565b60206040518083038186803b158015611d8c57600080fd5b505afa158015611da0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a559190612122565b6002546040516302abf57960e61b81526000916001600160a01b03169063aafd5e4090611d74906004016128b1565b600080856001600160a01b03166323b872dd60e01b868686604051602401611e1d939291906124e9565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051611e88919061249f565b6000604051808303816000865af19150503d8060008114611ec5576040519150601f19603f3d011682016040523d82523d6000602084013e611eca565b606091505b5091509150818015611ef4575080511580611ef4575080806020019051810190611ef4919061213e565b611f105760405162461bcd60e51b81526004016103e990612e3c565b505050505050565b600080846001600160a01b031663095ea7b360e01b8585604051602401611f40929190612566565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051611fab919061249f565b6000604051808303816000865af19150503d8060008114611fe8576040519150601f19603f3d011682016040523d82523d6000602084013e611fed565b606091505b5091509150818015612017575080511580612017575080806020019051810190612017919061213e565b6120335760405162461bcd60e51b81526004016103e99061281d565b5050505050565b82805461204690613362565b90600052602060002090601f01602090048101928261206857600085556120ae565b82601f1061208157805160ff19168380011785556120ae565b828001600101855582156120ae579182015b828111156120ae578251825591602001919060010190612093565b506120ba9291506120be565b5090565b5b808211156120ba57600081556001016120bf565b80356103b4816133b3565b80516103b4816133b3565b80356103b4816133c8565b80516103b4816133c8565b600060208284031215612110578081fd5b813561211b816133b3565b9392505050565b600060208284031215612133578081fd5b815161211b816133b3565b60006020828403121561214f578081fd5b815161211b816133c8565b60006020828403121561216b578081fd5b5035919050565b600080600060408486031215612186578182fd5b83359250602084013567ffffffffffffffff808211156121a4578384fd5b818601915086601f8301126121b7578384fd5b8135818111156121c5578485fd5b87602080830285010111156121d8578485fd5b6020830194508093505050509250925092565b600080600080600080600060e0888a031215612205578283fd5b8735965060208089013567ffffffffffffffff80821115612224578586fd5b818b0191508b601f830112612237578586fd5b8135818111156122495761224961339d565b61225b601f8201601f191685016132d8565b91508082528c84828501011115612270578687fd5b8084840185840137810190920185905250955060408801359450612296606089016120d3565b93506080880135925060a088013591506122b260c089016120e9565b905092959891949750929550565b6000602082840312156122d1578081fd5b5051919050565b60006101808083850312156122eb578182fd5b6122f4816132d8565b90506122ff836120de565b815261230d602084016120de565b602082015261231e604084016120de565b604082015261232f606084016120f4565b6060820152612340608084016120f4565b608082015260a0838101519082015260c0808401519082015260e08084015190820152610100808401519082015261012080840151908201526101408084015190820152610160928301519281019290925250919050565b6000815180845260208085019450808401835b838110156123c7578151875295820195908201906001016123ab565b509495945050505050565b600081518084526123ea816020860160208601613332565b601f01601f19169290920160200192915050565b80546000906002810460018083168061241857607f831692505b602080841082141561243857634e487b7160e01b86526022600452602486fd5b612442848961259d565b828015612456576001811461246757612492565b60ff19871682528282019750612492565b61247089613302565b60005b8781101561248c57815484820152908601908401612473565b83019850505b5050505050505092915050565b600082516124b1818460208701613332565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039390931683526020830191909152604082015260600190565b60006001600160a01b03861682528460208301528360408301526080606083015261255c60808301846123fe565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b60006020825261211b6020830184612398565b901515815260200190565b90815260200190565b6000848252604060208301528260408301527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156125e4578081fd5b6020830280856060850137919091016060019081529392505050565b6000838252604060208301526109dc6040830184612398565b600087825260c0602083015261263260c08301886123fe565b90506001600160a01b038616604083015284606083015283608083015282151560a0830152979650505050505050565b600086825285602083015260a0604083015261268160a08301866123d2565b6001600160a01b0394909416606083015250608001529392505050565b6000858252846020830152608060408301526126bd60808301856123d2565b905082606083015295945050505050565b6000848252836020830152606060408301526126ed60608301846123fe565b95945050505050565b600060c0825261270960c08301896123d2565b6020830197909752506001600160a01b0394909416604085015260608401929092526080830152151560a090910152919050565b60208082526042908201527f416461707465723a3a67657445787065637465645061796f7574733a2072657360408201527f6f6c7574696f6e4461746120686173206e6f74206265656e207265717565737460608201527f6564000000000000000000000000000000000000000000000000000000000000608082015260a00190565b6020808252602f908201527f416461707465723a3a7265706f72745061796f7574733a20496e76616c69642060408201527f7265736f6c7574696f6e20646174610000000000000000000000000000000000606082015260800190565b60208082526002908201527f5341000000000000000000000000000000000000000000000000000000000000604082015260600190565b6020808252603c908201527f416461707465723a3a696e697469616c697a655175657374696f6e3a2072657360408201527f6f6c7574696f6e54696d65206d75737420626520706f73697469766500000000606082015260800190565b7f4f7074696d69737469634f7261636c6500000000000000000000000000000000815260200190565b60208082526035908201527f416461707465723a3a70617573655175657374696f6e3a207175657374696f6e60408201527f4944206973206e6f7420696e697469616c697a65640000000000000000000000606082015260800190565b6020808252602f908201527f416461707465723a3a67657445787065637465645061796f7574733a2051756560408201527f7374696f6e206973207061757365640000000000000000000000000000000000606082015260800190565b60208082526016908201527f416461707465722f6e6f742d617574686f72697a656400000000000000000000604082015260600190565b60208082526041908201527f416461707465723a3a726571756573745265736f6c7574696f6e446174613a2060408201527f5175657374696f6e206e6f7420726561647920746f206265207265736f6c766560608201527f6400000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526036908201527f416461707465723a3a67657445787065637465645061796f7574733a2071756560408201527f7374696f6e4944206973206e6f7420736574746c656400000000000000000000606082015260800190565b60208082526037908201527f416461707465723a3a756e50617573655175657374696f6e3a2071756573746960408201527f6f6e4944206973206e6f7420696e697469616c697a6564000000000000000000606082015260800190565b6020808252603e908201527f416461707465723a3a656d657267656e63795265706f72745061796f7574733a60408201527f207175657374696f6e4944206973206e6f7420696e697469616c697a65640000606082015260800190565b60208082526023908201527f416461707465723a3a736574746c653a205175657374696f6e2069732070617560408201527f7365640000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526037908201527f416461707465723a3a656d657267656e63795265706f72745061796f7574733a60408201527f207061796f757473206d7573742062652062696e617279000000000000000000606082015260800190565b6020808252603a908201527f416461707465723a3a67657445787065637465645061796f7574733a2071756560408201527f7374696f6e4944206973206e6f7420696e697469616c697a6564000000000000606082015260800190565b60208082526053908201527f416461707465723a3a656d657267656e63795265706f72745061796f7574733a60408201527f207175657374696f6e4944206973206e6f7420666c616767656420666f72206560608201527f6d657267656e6379207265736f6c7574696f6e00000000000000000000000000608082015260a00190565b6020808252603d908201527f416461707465723a3a656d657267656e63795265706f72745061796f7574733a60408201527f2073616665747920706572696f6420686173206e6f7420706173736564000000606082015260800190565b60208082526036908201527f416461707465723a3a736574746c653a207175657374696f6e4944206973206e60408201527f6f7420726561647920746f20626520736574746c656400000000000000000000606082015260800190565b60208082526050908201527f416461707465723a3a7265706f72745061796f7574733a20417474656d70746960408201527f6e6720746f20736574746c6520616e64207265706f72745061796f757473206960608201527f6e207468652073616d6520626c6f636b00000000000000000000000000000000608082015260a00190565b60208082526003908201527f5354460000000000000000000000000000000000000000000000000000000000604082015260600190565b60208082526034908201527f416461707465723a3a7570646174655175657374696f6e3a205175657374696f60408201527f6e20697320616c726561647920736574746c6564000000000000000000000000606082015260800190565b60208082526021908201527f416461707465723a3a756e737570706f727465642072657761726420746f6b6560408201527f6e00000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f416461707465723a3a7570646174655175657374696f6e3a205175657374696f60408201527f6e206e6f7420696e697469616c697a6564000000000000000000000000000000606082015260800190565b6020808252603b908201527f416461707465723a3a67657445787065637465645061796f7574733a2071756560408201527f7374696f6e494420697320616c7265616479207265736f6c7665640000000000606082015260800190565b60208082526039908201527f416461707465723a3a696e697469616c697a655175657374696f6e3a2051756560408201527f7374696f6e20616c726561647920696e697469616c697a656400000000000000606082015260800190565b60208082526057908201527f416461707465723a3a656d657267656e63795265706f72745061796f7574733a60408201527f207175657374696f6e494420697320616c726561647920666c6167676564206660608201527f6f7220656d657267656e6379207265736f6c7574696f6e000000000000000000608082015260a00190565b7f436f6c6c61746572616c57686974656c69737400000000000000000000000000815260200190565b60208082526046908201527f416461707465723a3a666c61675175657374696f6e466f724561726c7952657360408201527f6f6c7574696f6e3a207175657374696f6e4944206973206e6f7420696e69746960608201527f616c697a65640000000000000000000000000000000000000000000000000000608082015260a00190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526032908201527f416461707465723a3a726571756573745265736f6c7574696f6e446174613a2060408201527f5175657374696f6e206973207061757365640000000000000000000000000000606082015260800190565b60208082526038908201527f416461707465723a3a7570646174655175657374696f6e3a207265736f6c757460408201527f696f6e54696d65206d75737420626520706f7369746976650000000000000000606082015260800190565b60006101608d83528c60208401528b60408401528a60608401528960808401528860a084015287151560c084015286151560e08401528515156101008401526001600160a01b038516610120840152806101408401526132c6818401856123d2565b9e9d5050505050505050505050505050565b60405181810167ffffffffffffffff811182821017156132fa576132fa61339d565b604052919050565b60009081526020902090565b6000821982111561332d57634e487b7160e01b81526011600452602481fd5b500190565b60005b8381101561334d578181015183820152602001613335565b8381111561335c576000848401525b50505050565b60028104600182168061337657607f821691505b6020821081141561339757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610d6b57600080fd5b8015158114610d6b57600080fdfea26469706673582212200af94f9bb7e5b3daf25036e4d7aa67f867ea5d751e99a0987ac6f00da1b5f19164736f6c634300080000330000000000000000000000004d97dcd97ec945f40cf65f87097ace5ea047604500000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64

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

0000000000000000000000004d97dcd97ec945f40cf65f87097ace5ea047604500000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64

-----Decoded View---------------
Arg [0] : conditionalTokenAddress (address): 0x4d97dcd97ec945f40cf65f87097ace5ea0476045
Arg [1] : umaFinderAddress (address): 0x09aea4b2242abc8bb4bb78d537a67a245a7bec64

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004d97dcd97ec945f40cf65f87097ace5ea0476045
Arg [1] : 00000000000000000000000009aea4b2242abc8bb4bb78d537a67a245a7bec64


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.