{"message":"OK","result":[{"ABI":"[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"usdc_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"challengeWindow\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BadExpiry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadQuestion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Exists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"adapter\",\"type\":\"address\"}],\"name\":\"AdapterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"outcomeId\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"questionId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"}],\"name\":\"MarketCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previous\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"next\",\"type\":\"address\"}],\"name\":\"OwnerTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adapter\",\"outputs\":[{\"internalType\":\"contract ISettlementAdapter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"outcomeId\",\"type\":\"uint32\"},{\"internalType\":\"string\",\"name\":\"question\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"}],\"name\":\"createMarket\",\"outputs\":[{\"internalType\":\"contract Market\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"questionId\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"prompt\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"uint32[]\",\"name\":\"outcomeIds\",\"type\":\"uint32[]\"},{\"internalType\":\"string[]\",\"name\":\"outcomeTexts\",\"type\":\"string[]\"}],\"name\":\"createQuestion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fees\",\"outputs\":[{\"internalType\":\"contract FeeConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isMarket\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"keeper\",\"outputs\":[{\"internalType\":\"contract KeeperSettlement\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"marketOf\",\"outputs\":[{\"internalType\":\"contract Market\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"outcomeIdAt\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parlay\",\"outputs\":[{\"internalType\":\"contract RollingParlay\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pool\",\"outputs\":[{\"internalType\":\"contract VirtualPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"questionId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"questionOutcomeAt\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"questionId\",\"type\":\"bytes32\"}],\"name\":\"questionOutcomeCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"questionPrompt\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserve\",\"outputs\":[{\"internalType\":\"contract PayoutReserve\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISettlementAdapter\",\"name\":\"next\",\"type\":\"address\"}],\"name\":\"setAdapter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"next\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"usdc\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]","CompilerType":"solc","CompilerVersion":"v0.8.28+commit.7893614a","ConstructorArguments":"000000000000000000000000b47c4c8f73f009cc0c0d3f92b388d13e293f0b650000000000000000000000005a9b871f66e84d676deae9340808c9df9c159e56000000000000000000000000000000000000000000000000000000000002a300","ContractFileName":"src/MarketFactory.sol","ContractName":"MarketFactory","EVMVersion":"prague","Implementation":"","Library":"","LicenseType":"None","OptimizationUsed":"1","Proxy":"0","Runs":"200","SimilarMatch":"","SourceCode":"{{\"language\":\"Solidity\",\"settings\":{\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"appendCBOR\":true,\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":false},\"optimizer\":{\"enabled\":true,\"runs\":200},\"outputSelection\":{\"*\":{\"\":[\"*\"],\"*\":[\"*\"]}},\"remappings\":[\"forge-std/=lib/forge-std/src/\"],\"viaIR\":false},\"sources\":{\"src/MarketFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { BadExpiry, BadQuestion, Exists, ZeroAddress } from \\\"./Errors.sol\\\";\\nimport { FeeConfig } from \\\"./FeeConfig.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\nimport { PayoutReserve } from \\\"./PayoutReserve.sol\\\";\\nimport { RollingParlay } from \\\"./RollingParlay.sol\\\";\\nimport { VirtualPool } from \\\"./VirtualPool.sol\\\";\\nimport { ISettlementAdapter } from \\\"./settlement/ISettlementAdapter.sol\\\";\\nimport { KeeperSettlement } from \\\"./settlement/KeeperSettlement.sol\\\";\\nimport { Ownable } from \\\"./lib/Ownable.sol\\\";\\n\\n/// @notice Creates one market per HIP-4 outcome id and wires the working settlement adapter.\\ncontract MarketFactory is Ownable {\\n    address public immutable usdc;\\n    FeeConfig public immutable fees;\\n    PayoutReserve public immutable reserve;\\n    KeeperSettlement public immutable keeper;\\n    VirtualPool public immutable pool;\\n    RollingParlay public immutable parlay;\\n\\n    ISettlementAdapter public adapter;\\n\\n    mapping(uint32 => Market) public marketOf;\\n    mapping(address => bool) public isMarket;\\n    mapping(bytes32 => string) public questionPrompt;\\n    uint32[] internal _outcomeIds;\\n    mapping(bytes32 => uint32[]) internal _questionOutcomes;\\n\\n    event MarketCreated(uint32 indexed outcomeId, address indexed market, bytes32 questionId, uint64 expiry);\\n    event AdapterSet(address indexed adapter);\\n\\n    constructor(address usdc_, address owner_, uint64 challengeWindow) {\\n        if (usdc_ == address(0)) revert ZeroAddress();\\n        usdc = usdc_;\\n        fees = new FeeConfig(owner_);\\n        reserve = new PayoutReserve(usdc_, owner_, address(this));\\n        keeper = new KeeperSettlement(owner_, challengeWindow, address(this));\\n        adapter = keeper;\\n        pool = new VirtualPool(this, owner_);\\n        parlay = new RollingParlay(this);\\n        _initOwner(owner_);\\n        emit AdapterSet(address(keeper));\\n    }\\n\\n    function marketCount() external view returns (uint256) {\\n        return _outcomeIds.length;\\n    }\\n\\n    function outcomeIdAt(uint256 index) external view returns (uint32) {\\n        return _outcomeIds[index];\\n    }\\n\\n    function questionOutcomeCount(bytes32 questionId) external view returns (uint256) {\\n        return _questionOutcomes[questionId].length;\\n    }\\n\\n    function questionOutcomeAt(bytes32 questionId, uint256 index) external view returns (uint32) {\\n        return _questionOutcomes[questionId][index];\\n    }\\n\\n    function setAdapter(ISettlementAdapter next) external onlyOwner {\\n        if (address(next) == address(0)) revert ZeroAddress();\\n        adapter = next;\\n        emit AdapterSet(address(next));\\n    }\\n\\n    function createMarket(uint32 outcomeId, string calldata question, uint64 expiry)\\n        external\\n        onlyOwner\\n        returns (Market)\\n    {\\n        return _create(outcomeId, question, expiry, bytes32(0));\\n    }\\n\\n    /// @notice A grouped question settles exactly one outcome to Yes.\\n    function createQuestion(\\n        bytes32 questionId,\\n        string calldata prompt,\\n        uint64 expiry,\\n        uint32[] calldata outcomeIds,\\n        string[] calldata outcomeTexts\\n    ) external onlyOwner {\\n        if (questionId == bytes32(0) || bytes(questionPrompt[questionId]).length != 0) {\\n            revert BadQuestion();\\n        }\\n        if (outcomeIds.length < 2 || outcomeIds.length != outcomeTexts.length) revert BadQuestion();\\n        if (bytes(prompt).length == 0 || bytes(prompt).length > 512) revert BadQuestion();\\n        questionPrompt[questionId] = prompt;\\n        for (uint256 i; i < outcomeIds.length; ++i) {\\n            _create(outcomeIds[i], outcomeTexts[i], expiry, questionId);\\n            _questionOutcomes[questionId].push(outcomeIds[i]);\\n        }\\n        keeper.registerQuestion(questionId, outcomeIds);\\n    }\\n\\n    function _create(uint32 outcomeId, string calldata question, uint64 expiry, bytes32 questionId)\\n        internal\\n        returns (Market market)\\n    {\\n        if (outcomeId == 0 || address(marketOf[outcomeId]) != address(0)) revert Exists();\\n        if (bytes(question).length == 0 || bytes(question).length > 512) revert BadQuestion();\\n        if (expiry <= block.timestamp) revert BadExpiry();\\n        market = new Market(this, outcomeId, question, expiry, questionId);\\n        marketOf[outcomeId] = market;\\n        isMarket[address(market)] = true;\\n        _outcomeIds.push(outcomeId);\\n        if (questionId == bytes32(0)) keeper.registerOutcome(outcomeId);\\n        emit MarketCreated(outcomeId, address(market), questionId, expiry);\\n    }\\n}\\n\"},\"src/settlement/KeeperSettlement.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport {\\n    AlreadyFinal,\\n    BadFraction,\\n    BadWindow,\\n    ChallengeClosed,\\n    ChallengeSpent,\\n    AlreadyChallenged,\\n    NotFactory,\\n    NotGroup,\\n    NotKeeper,\\n    NotPosted,\\n    NotStandalone,\\n    StillOpen,\\n    WinnerMissing,\\n    WindowOpen,\\n    ZeroAddress\\n} from \\\"../Errors.sol\\\";\\nimport { ISettlementAdapter } from \\\"./ISettlementAdapter.sol\\\";\\nimport { Ownable } from \\\"../lib/Ownable.sol\\\";\\n\\n/// @notice Keeper-posted settlement with a challenge window. This is the working\\n///         adapter until a real Elysium read of HIP-4 exists.\\ncontract KeeperSettlement is ISettlementAdapter, Ownable {\\n    uint256 public constant WAD = 1e18;\\n\\n    struct Proposal {\\n        bool posted;\\n        bool challenged;\\n        bool finalized;\\n        uint64 proposedAt;\\n        uint256 fraction;\\n        address proposer;\\n        address challenger;\\n        string details;\\n        bool challengeSpent;\\n    }\\n\\n    uint64 public immutable challengeWindow;\\n    address public immutable factory;\\n    address public keeper;\\n\\n    mapping(uint32 => Proposal) internal _proposals;\\n    mapping(uint32 => bool) public standalone;\\n    mapping(uint32 => bytes32) public outcomeQuestion;\\n    mapping(bytes32 => uint32[]) internal _questionOutcomes;\\n\\n    event KeeperSet(address indexed keeper);\\n    event Proposed(uint32 indexed outcomeId, uint256 fraction, address indexed proposer);\\n    event Challenged(uint32 indexed outcomeId, address indexed challenger);\\n    event Finalized(uint32 indexed outcomeId, uint256 fraction);\\n\\n    modifier onlyFactory() {\\n        if (msg.sender != factory) revert NotFactory();\\n        _;\\n    }\\n\\n    modifier onlyKeeper() {\\n        if (msg.sender != keeper) revert NotKeeper();\\n        _;\\n    }\\n\\n    constructor(address owner_, uint64 window_, address factory_) {\\n        if (window_ == 0 || window_ > 30 days) revert BadWindow();\\n        if (factory_ == address(0)) revert ZeroAddress();\\n        challengeWindow = window_;\\n        factory = factory_;\\n        keeper = owner_;\\n        _initOwner(owner_);\\n    }\\n\\n    function setKeeper(address next) external onlyOwner {\\n        if (next == address(0)) revert ZeroAddress();\\n        keeper = next;\\n        emit KeeperSet(next);\\n    }\\n\\n    function registerOutcome(uint32 outcomeId) external onlyFactory {\\n        require(!standalone[outcomeId], \\\"reg\\\");\\n        require(outcomeQuestion[outcomeId] == bytes32(0), \\\"grouped\\\");\\n        standalone[outcomeId] = true;\\n    }\\n\\n    function registerQuestion(bytes32 questionId, uint32[] calldata outcomeIds) external onlyFactory {\\n        require(questionId != bytes32(0), \\\"qid\\\");\\n        require(_questionOutcomes[questionId].length == 0, \\\"q\\\");\\n        require(outcomeIds.length >= 2, \\\"size\\\");\\n        for (uint256 i; i < outcomeIds.length; ++i) {\\n            uint32 id = outcomeIds[i];\\n            require(!standalone[id], \\\"standalone\\\");\\n            require(outcomeQuestion[id] == bytes32(0), \\\"member\\\");\\n            for (uint256 j; j < i; ++j) {\\n                require(outcomeIds[j] != id, \\\"dup\\\");\\n            }\\n            outcomeQuestion[id] = questionId;\\n            _questionOutcomes[questionId].push(id);\\n        }\\n    }\\n\\n    function questionOutcomes(bytes32 questionId) external view returns (uint32[] memory) {\\n        return _questionOutcomes[questionId];\\n    }\\n\\n    /// @notice True after the single challenge allowed for this outcome.\\n    ///         A replacement posted after that challenge stays true and cannot be challenged.\\n    function challengeSpent(uint32 outcomeId) external view returns (bool) {\\n        return _proposals[outcomeId].challengeSpent;\\n    }\\n\\n    function proposal(uint32 outcomeId)\\n        external\\n        view\\n        returns (\\n            bool posted,\\n            bool challenged,\\n            bool finalized,\\n            uint64 proposedAt,\\n            uint256 fraction,\\n            address proposer,\\n            address challenger,\\n            string memory details\\n        )\\n    {\\n        Proposal storage p = _proposals[outcomeId];\\n        return (\\n            p.posted, p.challenged, p.finalized, p.proposedAt, p.fraction, p.proposer, p.challenger, p.details\\n        );\\n    }\\n\\n    function getSettlement(uint32 outcomeId)\\n        external\\n        view\\n        returns (bool posted, bool finalized, uint256 settleFractionWad)\\n    {\\n        Proposal storage p = _proposals[outcomeId];\\n        return (p.posted, p.finalized, p.fraction);\\n    }\\n\\n    /// @notice Standalone outcome. `fractionWad` may be any value from 0 to 1e18.\\n    function propose(uint32 outcomeId, uint256 fractionWad, string calldata details) external onlyKeeper {\\n        if (!standalone[outcomeId] || outcomeQuestion[outcomeId] != bytes32(0)) revert NotStandalone();\\n        _propose(outcomeId, fractionWad, details);\\n    }\\n\\n    /// @notice Grouped question. Exactly one outcome is 1 and the others are 0.\\n    function proposeQuestion(bytes32 questionId, uint32 winner, string calldata details) external onlyKeeper {\\n        uint32[] storage ids = _questionOutcomes[questionId];\\n        if (ids.length < 2) revert NotGroup();\\n        bool found;\\n        for (uint256 i; i < ids.length; ++i) {\\n            uint256 fraction = ids[i] == winner ? WAD : 0;\\n            if (ids[i] == winner) found = true;\\n            _propose(ids[i], fraction, details);\\n        }\\n        if (!found) revert WinnerMissing();\\n    }\\n\\n    /// @notice One challenge per outcome, and one challenge per grouped question.\\n    ///         After it, the keeper's replacement cannot be challenged.\\n    function challenge(uint32 outcomeId) external {\\n        bytes32 qid = outcomeQuestion[outcomeId];\\n        if (qid == bytes32(0)) {\\n            _challenge(outcomeId);\\n            return;\\n        }\\n        uint32[] storage ids = _questionOutcomes[qid];\\n        for (uint256 i; i < ids.length; ++i) {\\n            _challenge(ids[i]);\\n        }\\n    }\\n\\n    function finalize(uint32 outcomeId) external {\\n        bytes32 qid = outcomeQuestion[outcomeId];\\n        if (qid == bytes32(0)) {\\n            _finalize(outcomeId);\\n            return;\\n        }\\n        uint32[] storage ids = _questionOutcomes[qid];\\n        for (uint256 i; i < ids.length; ++i) {\\n            _finalize(ids[i]);\\n        }\\n    }\\n\\n    function _propose(uint32 outcomeId, uint256 fractionWad, string calldata details) internal {\\n        if (fractionWad > WAD) revert BadFraction();\\n        require(bytes(details).length <= 256, \\\"details\\\");\\n        Proposal storage p = _proposals[outcomeId];\\n        if (p.finalized) revert AlreadyFinal();\\n        if (p.posted && !p.challenged) revert StillOpen();\\n        bool spent = p.challengeSpent;\\n        p.posted = true;\\n        p.challenged = false;\\n        p.finalized = false;\\n        p.proposedAt = uint64(block.timestamp);\\n        p.fraction = fractionWad;\\n        p.proposer = msg.sender;\\n        p.challenger = address(0);\\n        p.details = details;\\n        p.challengeSpent = spent;\\n        emit Proposed(outcomeId, fractionWad, msg.sender);\\n    }\\n\\n    function _challenge(uint32 outcomeId) internal {\\n        Proposal storage p = _proposals[outcomeId];\\n        if (!p.posted || p.finalized) revert NotPosted();\\n        if (p.challengeSpent) revert ChallengeSpent();\\n        if (p.challenged) revert AlreadyChallenged();\\n        if (block.timestamp >= p.proposedAt + challengeWindow) revert ChallengeClosed();\\n        p.challenged = true;\\n        p.challengeSpent = true;\\n        p.challenger = msg.sender;\\n        emit Challenged(outcomeId, msg.sender);\\n    }\\n\\n    function _finalize(uint32 outcomeId) internal {\\n        Proposal storage p = _proposals[outcomeId];\\n        if (!p.posted || p.finalized) revert NotPosted();\\n        if (p.challenged) revert AlreadyChallenged();\\n        if (block.timestamp < p.proposedAt + challengeWindow) revert WindowOpen();\\n        p.finalized = true;\\n        emit Finalized(outcomeId, p.fraction);\\n    }\\n}\\n\"},\"src/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\ninterface IERC20 {\\n    function totalSupply() external view returns (uint256);\\n    function balanceOf(address account) external view returns (uint256);\\n    function allowance(address owner, address spender) external view returns (uint256);\\n    function approve(address spender, uint256 amount) external returns (bool);\\n    function transfer(address to, uint256 amount) external returns (bool);\\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n    function decimals() external view returns (uint8);\\n    function symbol() external view returns (string memory);\\n    function name() external view returns (string memory);\\n}\\n\"},\"src/lib/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"../interfaces/IERC20.sol\\\";\\n\\ncontract ERC20 is IERC20 {\\n    string public name;\\n    string public symbol;\\n    uint8 public immutable decimals;\\n\\n    uint256 public totalSupply;\\n    mapping(address => uint256) public balanceOf;\\n    mapping(address => mapping(address => uint256)) public allowance;\\n\\n    event Transfer(address indexed from, address indexed to, uint256 amount);\\n    event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n    constructor(string memory name_, string memory symbol_, uint8 decimals_) {\\n        name = name_;\\n        symbol = symbol_;\\n        decimals = decimals_;\\n    }\\n\\n    function approve(address spender, uint256 amount) external returns (bool) {\\n        allowance[msg.sender][spender] = amount;\\n        emit Approval(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    function transfer(address to, uint256 amount) external returns (bool) {\\n        _transfer(msg.sender, to, amount);\\n        return true;\\n    }\\n\\n    function transferFrom(address from, address to, uint256 amount) external returns (bool) {\\n        uint256 allowed = allowance[from][msg.sender];\\n        if (allowed != type(uint256).max) {\\n            require(allowed >= amount, \\\"allowance\\\");\\n            allowance[from][msg.sender] = allowed - amount;\\n        }\\n        _transfer(from, to, amount);\\n        return true;\\n    }\\n\\n    function _transfer(address from, address to, uint256 amount) internal {\\n        require(to != address(0), \\\"to\\\");\\n        balanceOf[from] -= amount;\\n        balanceOf[to] += amount;\\n        emit Transfer(from, to, amount);\\n    }\\n\\n    function _mint(address to, uint256 amount) internal {\\n        require(to != address(0), \\\"to\\\");\\n        totalSupply += amount;\\n        balanceOf[to] += amount;\\n        emit Transfer(address(0), to, amount);\\n    }\\n\\n    function _burn(address from, uint256 amount) internal {\\n        balanceOf[from] -= amount;\\n        totalSupply -= amount;\\n        emit Transfer(from, address(0), amount);\\n    }\\n}\\n\"},\"src/lib/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nlibrary Math {\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        if (a == 0) return 0;\\n        return (a + b - 1) / b;\\n    }\\n\\n    function sqrt(uint256 x) internal pure returns (uint256 y) {\\n        if (x == 0) return 0;\\n        uint256 z = (x + 1) / 2;\\n        y = x;\\n        while (z < y) {\\n            y = z;\\n            z = (x / z + z) / 2;\\n        }\\n    }\\n\\n    /// @dev Smallest integer whose square is at least `x`.\\n    function sqrtCeil(uint256 x) internal pure returns (uint256 y) {\\n        y = sqrt(x);\\n        if (y * y < x) y += 1;\\n    }\\n}\\n\"},\"src/lib/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { NotOwner, ZeroAddress } from \\\"../Errors.sol\\\";\\n\\nabstract contract Ownable {\\n    address public owner;\\n\\n    event OwnerTransferred(address indexed previous, address indexed next);\\n\\n    modifier onlyOwner() {\\n        if (msg.sender != owner) revert NotOwner();\\n        _;\\n    }\\n\\n    function _initOwner(address next) internal {\\n        if (next == address(0)) revert ZeroAddress();\\n        owner = next;\\n        emit OwnerTransferred(address(0), next);\\n    }\\n\\n    function transferOwnership(address next) external onlyOwner {\\n        if (next == address(0)) revert ZeroAddress();\\n        emit OwnerTransferred(owner, next);\\n        owner = next;\\n    }\\n}\\n\"},\"src/lib/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nabstract contract ReentrancyGuard {\\n    uint256 private locked = 1;\\n\\n    modifier nonReentrant() {\\n        require(locked == 1);\\n        locked = 2;\\n        _;\\n        locked = 1;\\n    }\\n}\\n\"},\"src/lib/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { IERC20 } from \\\"../interfaces/IERC20.sol\\\";\\n\\nlibrary SafeERC20 {\\n    function safeTransfer(IERC20 token, address to, uint256 amount) internal {\\n        _call(token, abi.encodeCall(IERC20.transfer, (to, amount)));\\n    }\\n\\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal {\\n        _call(token, abi.encodeCall(IERC20.transferFrom, (from, to, amount)));\\n    }\\n\\n    function safeApprove(IERC20 token, address spender, uint256 amount) internal {\\n        _call(token, abi.encodeCall(IERC20.approve, (spender, amount)));\\n    }\\n\\n    function _call(IERC20 token, bytes memory data) private {\\n        (bool ok, bytes memory ret) = address(token).call(data);\\n        require(ok && (ret.length == 0 || abi.decode(ret, (bool))), \\\"usdc\\\");\\n    }\\n}\\n\"},\"src/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nerror NotOwner();\\nerror ZeroAddress();\\nerror ZeroAmount();\\nerror Halted();\\nerror NotFinal();\\nerror Settled();\\nerror ReserveShortfall();\\nerror Slippage();\\nerror Dust();\\nerror BadPrice();\\nerror BadLegs();\\nerror DuplicateLeg();\\nerror NotKeeper();\\nerror NotPosted();\\nerror StillOpen();\\nerror AlreadyChallenged();\\nerror ChallengeSpent();\\nerror ChallengeClosed();\\nerror WindowOpen();\\nerror AlreadyFinal();\\nerror NotFactory();\\nerror UnknownMarket();\\nerror Exists();\\nerror BadQuestion();\\nerror BadExpiry();\\nerror BadFraction();\\nerror NotStandalone();\\nerror NotGroup();\\nerror WinnerMissing();\\nerror NotHolder();\\nerror NotParlay();\\nerror NotPool();\\nerror NoCash();\\nerror Holding();\\nerror Idle();\\nerror BadWindow();\\nerror NoReference();\\nerror StaleReference();\\nerror OutOfBand();\\nerror BadConfig();\\n\"},\"src/FeeConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { ZeroAddress } from \\\"./Errors.sol\\\";\\nimport { Ownable } from \\\"./lib/Ownable.sol\\\";\\n\\n/// @notice Fixed 1% (100 bps) activity fee. The owner can turn it on or off.\\n///         The rate does not change. The recipient defaults to the owner.\\ncontract FeeConfig is Ownable {\\n    uint16 public constant BPS = 100;\\n    uint16 public constant DENOMINATOR = 10_000;\\n\\n    bool public enabled = true;\\n    address public recipient;\\n\\n    event FeeToggled(bool enabled);\\n    event RecipientSet(address indexed recipient);\\n\\n    constructor(address owner_) {\\n        recipient = owner_;\\n        _initOwner(owner_);\\n    }\\n\\n    /// @dev One percent of `amount` while the switch is on, otherwise zero.\\n    function quote(uint256 amount) public view returns (uint256) {\\n        if (!enabled || amount == 0) return 0;\\n        return (amount * BPS) / DENOMINATOR;\\n    }\\n\\n    function setEnabled(bool on) external onlyOwner {\\n        enabled = on;\\n        emit FeeToggled(on);\\n    }\\n\\n    function setRecipient(address next) external onlyOwner {\\n        if (next == address(0)) revert ZeroAddress();\\n        recipient = next;\\n        emit RecipientSet(next);\\n    }\\n}\\n\"},\"src/Market.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { BadFraction, Halted, NotFinal, NotParlay, NotPool, Settled, ZeroAmount } from \\\"./Errors.sol\\\";\\nimport { OutcomeToken } from \\\"./OutcomeToken.sol\\\";\\nimport { FeeConfig } from \\\"./FeeConfig.sol\\\";\\nimport { MarketFactory } from \\\"./MarketFactory.sol\\\";\\nimport { PayoutReserve } from \\\"./PayoutReserve.sol\\\";\\nimport { IERC20 } from \\\"./interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"./lib/SafeERC20.sol\\\";\\nimport { ReentrancyGuard } from \\\"./lib/ReentrancyGuard.sol\\\";\\n\\n/// @notice One HIP-4 outcome on Elysium. 1 collateral locks into 1 Yes and 1 No.\\n///         The 1% fee, when on, is charged once on the action and does not change that ratio.\\ncontract Market is ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    uint256 public constant WAD = 1e18;\\n\\n    MarketFactory public immutable factory;\\n    uint32 public immutable outcomeId;\\n    uint64 public immutable expiry;\\n    bytes32 public immutable questionId;\\n    string public question;\\n\\n    OutcomeToken public immutable yesToken;\\n    OutcomeToken public immutable noToken;\\n\\n    /// @notice Collateral locked against outstanding token liabilities.\\n    uint256 public backing;\\n\\n    event Split(address indexed user, uint256 amount, uint256 fee);\\n    event Merged(address indexed user, uint256 amount, uint256 fee);\\n    event Redeemed(address indexed user, bool yesSide, uint256 amount, uint256 payout, uint256 fee);\\n\\n    modifier onlyPool() {\\n        if (msg.sender != address(factory.pool())) revert NotPool();\\n        _;\\n    }\\n\\n    modifier onlyParlay() {\\n        if (msg.sender != address(factory.parlay())) revert NotParlay();\\n        _;\\n    }\\n\\n    constructor(\\n        MarketFactory factory_,\\n        uint32 outcomeId_,\\n        string memory question_,\\n        uint64 expiry_,\\n        bytes32 questionId_\\n    ) {\\n        factory = factory_;\\n        outcomeId = outcomeId_;\\n        question = question_;\\n        expiry = expiry_;\\n        questionId = questionId_;\\n        string memory idText = _u32(outcomeId_);\\n        yesToken = new OutcomeToken(string.concat(\\\"Mirror Yes \\\", idText), string.concat(\\\"YES-\\\", idText));\\n        noToken = new OutcomeToken(string.concat(\\\"Mirror No \\\", idText), string.concat(\\\"NO-\\\", idText));\\n    }\\n\\n    function usdc() public view returns (IERC20) {\\n        return IERC20(factory.usdc());\\n    }\\n\\n    function tradingHalted() public view returns (bool) {\\n        if (block.timestamp >= expiry) return true;\\n        (bool posted,,) = factory.adapter().getSettlement(outcomeId);\\n        return posted;\\n    }\\n\\n    function finalized() public view returns (bool) {\\n        (, bool isFinal,) = factory.adapter().getSettlement(outcomeId);\\n        return isFinal;\\n    }\\n\\n    function settlement() external view returns (bool posted, bool isFinal, uint256 fractionWad) {\\n        return factory.adapter().getSettlement(outcomeId);\\n    }\\n\\n    /// @return tokens Yes and No minted, equal to `amount`\\n    /// @return cost Collateral the user pays, including the activity fee when it is on\\n    function previewSplit(uint256 amount) external view returns (uint256 tokens, uint256 cost) {\\n        tokens = amount;\\n        cost = amount + factory.fees().quote(amount);\\n    }\\n\\n    function previewMerge(uint256 amount) external view returns (uint256 collateralOut) {\\n        collateralOut = amount - factory.fees().quote(amount);\\n    }\\n\\n    function previewRedeem(bool yesSide, uint256 amount) external view returns (uint256 collateralOut) {\\n        (,, uint256 fraction) = factory.adapter().getSettlement(outcomeId);\\n        uint256 gross = _gross(yesSide, amount, fraction);\\n        collateralOut = gross - factory.fees().quote(gross);\\n    }\\n\\n    /// @notice Lock `amount` collateral and mint `amount` Yes and `amount` No.\\n    ///         When the fee is on, the user also pays 1% of `amount`. That fee is not minted.\\n    function split(uint256 amount) external nonReentrant {\\n        if (tradingHalted()) revert Halted();\\n        if (amount == 0) revert ZeroAmount();\\n        uint256 fee = factory.fees().quote(amount);\\n        usdc().safeTransferFrom(msg.sender, address(this), amount);\\n        if (fee > 0) usdc().safeTransferFrom(msg.sender, factory.fees().recipient(), fee);\\n        backing += amount;\\n        yesToken.mint(msg.sender, amount);\\n        noToken.mint(msg.sender, amount);\\n        emit Split(msg.sender, amount, fee);\\n    }\\n\\n    /// @notice Burn a complete set before settlement and release the collateral.\\n    ///         The activity fee, when on, is taken once from the released collateral.\\n    function merge(uint256 amount) external nonReentrant {\\n        if (finalized()) revert Settled();\\n        if (amount == 0) revert ZeroAmount();\\n        yesToken.burn(msg.sender, amount);\\n        noToken.burn(msg.sender, amount);\\n        uint256 fee = factory.fees().quote(amount);\\n        _disburse(msg.sender, amount - fee, factory.fees().recipient(), fee);\\n        emit Merged(msg.sender, amount, fee);\\n    }\\n\\n    /// @notice After settlement, Yes pays the fraction and No pays one minus the fraction.\\n    ///         The activity fee, when on, is taken once from that payout.\\n    function redeem(bool yesSide, uint256 amount) external nonReentrant returns (uint256 net) {\\n        (uint256 gross, uint256 fee) = _redeem(msg.sender, yesSide, amount, true);\\n        net = gross - fee;\\n    }\\n\\n    /// @notice Parlay rollover redeems with no fee. The parlay charges once, on the user's payout.\\n    function redeemTo(address to, bool yesSide, uint256 amount)\\n        external\\n        onlyParlay\\n        nonReentrant\\n        returns (uint256 gross)\\n    {\\n        (gross,) = _redeem(to, yesSide, amount, false);\\n    }\\n\\n    function creditBacking(uint256 amount) external onlyPool {\\n        backing += amount;\\n        require(usdc().balanceOf(address(this)) >= backing, \\\"backing\\\");\\n    }\\n\\n    function mintOutcome(address to, bool yesSide, uint256 amount) external onlyPool {\\n        _token(yesSide).mint(to, amount);\\n    }\\n\\n    function burnOutcome(address from, bool yesSide, uint256 amount) external onlyPool {\\n        _token(yesSide).burn(from, amount);\\n    }\\n\\n    /// @notice Pool sells pay collateral out. The pool already applied the trade fee once.\\n    function payout(address user, uint256 userAmount, address feeTo, uint256 feeAmount) external onlyPool {\\n        _disburse(user, userAmount, feeTo, feeAmount);\\n    }\\n\\n    function _redeem(address to, bool yesSide, uint256 amount, bool chargeFee)\\n        internal\\n        returns (uint256 gross, uint256 fee)\\n    {\\n        if (!finalized()) revert NotFinal();\\n        if (amount == 0) revert ZeroAmount();\\n        (,, uint256 fraction) = factory.adapter().getSettlement(outcomeId);\\n        gross = _gross(yesSide, amount, fraction);\\n        _token(yesSide).burn(to, amount);\\n        if (chargeFee) fee = factory.fees().quote(gross);\\n        _disburse(to, gross - fee, factory.fees().recipient(), fee);\\n        emit Redeemed(to, yesSide, amount, gross - fee, fee);\\n    }\\n\\n    function _gross(bool yesSide, uint256 amount, uint256 fraction) internal pure returns (uint256) {\\n        if (fraction > WAD) revert BadFraction();\\n        if (yesSide) return amount * fraction / WAD;\\n        return amount * (WAD - fraction) / WAD;\\n    }\\n\\n    function _disburse(address user, uint256 userAmount, address feeTo, uint256 feeAmount) internal {\\n        uint256 total = userAmount + feeAmount;\\n        if (total == 0) return;\\n        if (total > backing) {\\n            uint256 shortfall = total - backing;\\n            PayoutReserve(factory.reserve()).draw(shortfall);\\n            backing += shortfall;\\n        }\\n        backing -= total;\\n        if (feeAmount > 0) usdc().safeTransfer(feeTo, feeAmount);\\n        if (userAmount > 0) usdc().safeTransfer(user, userAmount);\\n    }\\n\\n    function _token(bool yesSide) internal view returns (OutcomeToken) {\\n        return yesSide ? yesToken : noToken;\\n    }\\n\\n    function _u32(uint32 v) internal pure returns (string memory) {\\n        if (v == 0) return \\\"0\\\";\\n        uint256 digits;\\n        uint32 x = v;\\n        while (x != 0) {\\n            digits++;\\n            x /= 10;\\n        }\\n        bytes memory buf = new bytes(digits);\\n        x = v;\\n        while (x != 0) {\\n            digits -= 1;\\n            buf[digits] = bytes1(uint8(48 + (x % 10)));\\n            x /= 10;\\n        }\\n        return string(buf);\\n    }\\n}\\n\"},\"src/OutcomeToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { ERC20 } from \\\"./lib/ERC20.sol\\\";\\n\\n/// @notice Yes or No token for one Mirror market. Only the market can mint and burn.\\ncontract OutcomeToken is ERC20 {\\n    address public immutable market;\\n\\n    error OnlyMarket();\\n\\n    constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_, 6) {\\n        market = msg.sender;\\n    }\\n\\n    function mint(address to, uint256 amount) external {\\n        if (msg.sender != market) revert OnlyMarket();\\n        _mint(to, amount);\\n    }\\n\\n    function burn(address from, uint256 amount) external {\\n        if (msg.sender != market) revert OnlyMarket();\\n        _burn(from, amount);\\n    }\\n}\\n\"},\"src/PayoutReserve.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport { ReserveShortfall, ZeroAmount } from \\\"./Errors.sol\\\";\\nimport { IERC20 } from \\\"./interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"./lib/SafeERC20.sol\\\";\\nimport { Ownable } from \\\"./lib/Ownable.sol\\\";\\n\\ninterface IMarketRegistry {\\n    function isMarket(address market) external view returns (bool);\\n}\\n\\n/// @notice Collateral the owner can add later. Markets draw it only when a payout\\n///         is larger than the collateral already backing that payout.\\ncontract PayoutReserve is Ownable {\\n    using SafeERC20 for IERC20;\\n\\n    IERC20 public immutable usdc;\\n    address public immutable registry;\\n    uint256 public accounted;\\n\\n    event Funded(address indexed from, uint256 amount);\\n    event Drawn(address indexed market, uint256 amount);\\n\\n    constructor(address usdc_, address owner_, address registry_) {\\n        usdc = IERC20(usdc_);\\n        registry = registry_;\\n        _initOwner(owner_);\\n    }\\n\\n    function fund(uint256 amount) external onlyOwner {\\n        if (amount == 0) revert ZeroAmount();\\n        usdc.safeTransferFrom(msg.sender, address(this), amount);\\n        accounted += amount;\\n        emit Funded(msg.sender, amount);\\n    }\\n\\n    function draw(uint256 amount) external {\\n        require(IMarketRegistry(registry).isMarket(msg.sender), \\\"market\\\");\\n        if (amount == 0) revert ZeroAmount();\\n        if (accounted < amount) revert ReserveShortfall();\\n        accounted -= amount;\\n        usdc.safeTransfer(msg.sender, amount);\\n        emit Drawn(msg.sender, amount);\\n    }\\n}\\n\"},\"src/RollingParlay.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport {\\n    BadLegs,\\n    BadPrice,\\n    DuplicateLeg,\\n    Dust,\\n    Halted,\\n    Holding,\\n    Idle,\\n    NoCash,\\n    NotFinal,\\n    NotHolder,\\n    UnknownMarket,\\n    ZeroAmount\\n} from \\\"./Errors.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\nimport { MarketFactory } from \\\"./MarketFactory.sol\\\";\\nimport { VirtualPool } from \\\"./VirtualPool.sol\\\";\\nimport { IERC20 } from \\\"./interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"./lib/SafeERC20.sol\\\";\\nimport { ReentrancyGuard } from \\\"./lib/ReentrancyGuard.sol\\\";\\n\\n/// @notice Two to five legs. A settled leg's full payout buys the next leg, up to the\\n///         max price on that leg. Every leg buy goes through the pool's reference checks:\\n///         the first leg's buy reverts on a missing or stale reference or a band breach,\\n///         and a later leg whose buy would fail those checks pays out as claimable cash. The activity fee is charged once on entry and once\\n///         on the user's payout, not again on the internal redeem or buy.\\ncontract RollingParlay is ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    uint256 public constant WAD = 1e18;\\n\\n    struct Leg {\\n        uint32 outcomeId;\\n        bool yesSide;\\n        uint256 maxPriceWad;\\n    }\\n\\n    struct Position {\\n        address owner;\\n        uint8 length;\\n        uint8 index;\\n        uint256 tokens;\\n        uint256 cash;\\n        bool holding;\\n    }\\n\\n    MarketFactory public immutable factory;\\n    uint256 public nextId;\\n\\n    mapping(uint256 => Position) internal _positions;\\n    mapping(uint256 => mapping(uint8 => Leg)) internal _legs;\\n    mapping(address => uint256[]) internal _userPositions;\\n\\n    event Opened(uint256 indexed id, address indexed owner, uint256 stake, uint256 tokens);\\n    event Rolled(uint256 indexed id, uint8 index, uint256 amount, bool holding);\\n    event Claimed(uint256 indexed id, address indexed owner, uint256 net);\\n\\n    constructor(MarketFactory factory_) {\\n        factory = factory_;\\n    }\\n\\n    function position(uint256 id)\\n        external\\n        view\\n        returns (address owner, uint8 length, uint8 index, uint256 tokens, uint256 cash, bool holding)\\n    {\\n        Position storage p = _positions[id];\\n        return (p.owner, p.length, p.index, p.tokens, p.cash, p.holding);\\n    }\\n\\n    function leg(uint256 id, uint8 index)\\n        external\\n        view\\n        returns (uint32 outcomeId, bool yesSide, uint256 maxPriceWad)\\n    {\\n        Leg storage l = _legs[id][index];\\n        return (l.outcomeId, l.yesSide, l.maxPriceWad);\\n    }\\n\\n    function positionsOf(address owner) external view returns (uint256[] memory) {\\n        return _userPositions[owner];\\n    }\\n\\n    function previewOpen(uint32 outcomeId, bool yesSide, uint256 stake, uint256 maxPriceWad)\\n        external\\n        view\\n        returns (uint256 tokensOut)\\n    {\\n        if (maxPriceWad == 0) return 0;\\n        uint256 net = stake - factory.fees().quote(stake);\\n        if (net == 0) return 0;\\n        tokensOut = VirtualPool(address(factory.pool())).quoteBuyExempt(outcomeId, yesSide, net);\\n        if (tokensOut < _minOut(net, maxPriceWad)) return 0;\\n    }\\n\\n    function open(Leg[] calldata legsIn, uint256 stake) external nonReentrant returns (uint256 id) {\\n        uint256 n = legsIn.length;\\n        if (n < 2 || n > 5) revert BadLegs();\\n        if (stake == 0) revert ZeroAmount();\\n        for (uint256 i; i < n; ++i) {\\n            if (legsIn[i].maxPriceWad == 0 || legsIn[i].maxPriceWad > WAD) revert BadPrice();\\n            Market market = factory.marketOf(legsIn[i].outcomeId);\\n            if (address(market) == address(0)) revert UnknownMarket();\\n            if (market.tradingHalted()) revert Halted();\\n            for (uint256 j; j < i; ++j) {\\n                if (legsIn[j].outcomeId == legsIn[i].outcomeId) revert DuplicateLeg();\\n            }\\n        }\\n\\n        uint256 fee = factory.fees().quote(stake);\\n        uint256 net = stake - fee;\\n        if (net == 0) revert Dust();\\n        IERC20 token = IERC20(factory.usdc());\\n        if (fee > 0) token.safeTransferFrom(msg.sender, factory.fees().recipient(), fee);\\n        token.safeTransferFrom(msg.sender, address(this), net);\\n\\n        id = nextId++;\\n        Position storage p = _positions[id];\\n        p.owner = msg.sender;\\n        p.length = uint8(n);\\n        p.holding = true;\\n        for (uint256 i; i < n; ++i) {\\n            _legs[id][uint8(i)] = legsIn[i];\\n        }\\n        _userPositions[msg.sender].push(id);\\n\\n        uint256 minOut = _minOut(net, legsIn[0].maxPriceWad);\\n        token.safeApprove(address(factory.pool()), net);\\n        uint256 tokens = VirtualPool(address(factory.pool()))\\n            .buyExempt(legsIn[0].outcomeId, legsIn[0].yesSide, net, minOut);\\n        p.tokens = tokens;\\n        emit Opened(id, msg.sender, stake, tokens);\\n    }\\n\\n    /// @notice Anyone can crank a settled leg. The payout buys the next leg or becomes claimable.\\n    function roll(uint256 id) external nonReentrant {\\n        Position storage p = _positions[id];\\n        if (!p.holding) revert Idle();\\n        Leg storage current = _legs[id][p.index];\\n        Market market = factory.marketOf(current.outcomeId);\\n        if (!market.finalized()) revert NotFinal();\\n        uint256 payout = market.redeemTo(address(this), current.yesSide, p.tokens);\\n        p.tokens = 0;\\n        p.holding = false;\\n\\n        if (payout == 0 || p.index + 1 == p.length) {\\n            p.cash = payout;\\n            emit Rolled(id, p.index, payout, false);\\n            return;\\n        }\\n\\n        Leg storage next = _legs[id][p.index + 1];\\n        Market nextMarket = factory.marketOf(next.outcomeId);\\n        uint256 minOut = _minOut(payout, next.maxPriceWad);\\n        uint256 quoted =\\n            VirtualPool(address(factory.pool())).quoteBuyExempt(next.outcomeId, next.yesSide, payout);\\n        if (nextMarket.tradingHalted() || quoted < minOut || quoted == 0) {\\n            p.cash = payout;\\n            emit Rolled(id, p.index, payout, false);\\n            return;\\n        }\\n\\n        IERC20(factory.usdc()).safeApprove(address(factory.pool()), payout);\\n        uint256 bought =\\n            VirtualPool(address(factory.pool())).buyExempt(next.outcomeId, next.yesSide, payout, minOut);\\n        p.index += 1;\\n        p.tokens = bought;\\n        p.holding = true;\\n        emit Rolled(id, p.index, bought, true);\\n    }\\n\\n    /// @notice Pays the user. The activity fee is taken once here, not on the earlier redeem.\\n    function claim(uint256 id) external nonReentrant {\\n        Position storage p = _positions[id];\\n        if (p.owner != msg.sender) revert NotHolder();\\n        if (p.holding) revert Holding();\\n        uint256 cash = p.cash;\\n        if (cash == 0) revert NoCash();\\n        p.cash = 0;\\n        uint256 fee = factory.fees().quote(cash);\\n        IERC20 token = IERC20(factory.usdc());\\n        if (fee > 0) token.safeTransfer(factory.fees().recipient(), fee);\\n        token.safeTransfer(msg.sender, cash - fee);\\n        emit Claimed(id, msg.sender, cash - fee);\\n    }\\n\\n    function _minOut(uint256 collateral, uint256 maxPriceWad) internal pure returns (uint256) {\\n        return collateral * WAD / maxPriceWad;\\n    }\\n}\\n\"},\"src/VirtualPool.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\nimport {\\n    BadConfig,\\n    BadPrice,\\n    Dust,\\n    Halted,\\n    NoReference,\\n    NotKeeper,\\n    NotParlay,\\n    OutOfBand,\\n    Slippage,\\n    StaleReference,\\n    UnknownMarket,\\n    ZeroAddress,\\n    ZeroAmount\\n} from \\\"./Errors.sol\\\";\\nimport { Market } from \\\"./Market.sol\\\";\\nimport { MarketFactory } from \\\"./MarketFactory.sol\\\";\\nimport { IERC20 } from \\\"./interfaces/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"./lib/SafeERC20.sol\\\";\\nimport { Math } from \\\"./lib/Math.sol\\\";\\nimport { Ownable } from \\\"./lib/Ownable.sol\\\";\\nimport { ReentrancyGuard } from \\\"./lib/ReentrancyGuard.sol\\\";\\n\\n/// @notice Constant-product Yes/No pricing with virtual reserves, anchored to a\\n///         keeper-posted HIP-4 reference price.\\n///\\n///         Each post of a reference re-centers that outcome's virtual reserves so the\\n///         Yes price equals the reference. Between posts, trades move the price along the\\n///         constant-product curve, but a trade reverts if it would leave the price more than\\n///         `bandBps` (absolute, in price points) from the reference, if the reference is\\n///         older than `maxAge`, or if no reference was ever posted.\\n///\\n///         Virtual reserves only price trades. Collateral accounting lives in each Market's\\n///         `backing`, and a re-center never touches it. A payout larger than backing draws\\n///         the payout reserve, which starts empty.\\n///\\n///         The reference is keeper-trusted until Elysium can read HIP-4 prices directly.\\ncontract VirtualPool is Ownable, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    uint256 public constant WAD = 1e18;\\n    uint256 public constant BPS = 10_000;\\n\\n    /// @dev 1,500 USDC of virtual depth on each side when the price is one half.\\n    uint256 public constant DEFAULT_DEPTH = 1_500_000_000;\\n    uint256 public constant MIN_DEPTH = 100_000_000;\\n    uint256 public constant MAX_DEPTH = 100_000_000_000;\\n\\n    uint256 public constant DEFAULT_BAND_BPS = 300;\\n    uint256 public constant MIN_BAND_BPS = 10;\\n    uint256 public constant MAX_BAND_BPS = 2_000;\\n\\n    uint256 public constant DEFAULT_MAX_AGE = 15 minutes;\\n    uint256 public constant MIN_MAX_AGE = 30 seconds;\\n    uint256 public constant MAX_MAX_AGE = 1 days;\\n\\n    /// @dev References must sit in [0.5%, 99.5%]. Near-certain books do not trade.\\n    uint256 public constant MIN_REFERENCE = 5e15;\\n    uint256 public constant MAX_REFERENCE = WAD - MIN_REFERENCE;\\n\\n    uint256 public constant MAX_BATCH = 64;\\n\\n    /// @notice Why a trade on an outcome would or would not go through.\\n    uint8 public constant OK = 0;\\n    uint8 public constant NO_REFERENCE = 1;\\n    uint8 public constant STALE = 2;\\n    uint8 public constant OUT_OF_BAND = 3;\\n\\n    struct Reserves {\\n        uint256 yes;\\n        uint256 no;\\n        bool live;\\n    }\\n\\n    struct Reference {\\n        uint128 priceWad;\\n        uint64 observedAt;\\n        uint64 postedAt;\\n    }\\n\\n    MarketFactory public immutable factory;\\n\\n    address public priceKeeper;\\n    uint256 public virtualDepth = DEFAULT_DEPTH;\\n    uint256 public bandBps = DEFAULT_BAND_BPS;\\n    uint256 public maxAge = DEFAULT_MAX_AGE;\\n\\n    mapping(uint32 => Reserves) public reserves;\\n    mapping(uint32 => Reference) internal _references;\\n\\n    event Bought(\\n        address indexed user, uint32 indexed outcomeId, bool yesSide, uint256 collateralIn, uint256 tokensOut\\n    );\\n    event Sold(\\n        address indexed user, uint32 indexed outcomeId, bool yesSide, uint256 tokensIn, uint256 collateralOut\\n    );\\n    event ReferencePosted(uint32 indexed outcomeId, uint256 priceWad, uint64 observedAt);\\n    event PriceKeeperSet(address indexed keeper);\\n    event DepthSet(uint256 depth);\\n    event BandSet(uint256 bandBps);\\n    event MaxAgeSet(uint256 maxAge);\\n\\n    modifier onlyPriceKeeper() {\\n        if (msg.sender != priceKeeper) revert NotKeeper();\\n        _;\\n    }\\n\\n    constructor(MarketFactory factory_, address owner_) {\\n        factory = factory_;\\n        priceKeeper = owner_;\\n        _initOwner(owner_);\\n        emit PriceKeeperSet(owner_);\\n    }\\n\\n    // ----------------------------------------------------------------- owner\\n\\n    function setPriceKeeper(address next) external onlyOwner {\\n        if (next == address(0)) revert ZeroAddress();\\n        priceKeeper = next;\\n        emit PriceKeeperSet(next);\\n    }\\n\\n    /// @notice Applies from each outcome's next reference post.\\n    function setVirtualDepth(uint256 depth) external onlyOwner {\\n        if (depth < MIN_DEPTH || depth > MAX_DEPTH) revert BadConfig();\\n        virtualDepth = depth;\\n        emit DepthSet(depth);\\n    }\\n\\n    function setBandBps(uint256 next) external onlyOwner {\\n        if (next < MIN_BAND_BPS || next > MAX_BAND_BPS) revert BadConfig();\\n        bandBps = next;\\n        emit BandSet(next);\\n    }\\n\\n    function setMaxAge(uint256 next) external onlyOwner {\\n        if (next < MIN_MAX_AGE || next > MAX_MAX_AGE) revert BadConfig();\\n        maxAge = next;\\n        emit MaxAgeSet(next);\\n    }\\n\\n    // ---------------------------------------------------------------- keeper\\n\\n    /// @param priceWad HIP-4 Yes price, 1e18 = 1.\\n    /// @param observedAt Unix time the keeper read the price. Staleness counts from here.\\n    function postReference(uint32 outcomeId, uint256 priceWad, uint64 observedAt) external onlyPriceKeeper {\\n        _post(outcomeId, priceWad, observedAt);\\n    }\\n\\n    function postReferences(uint32[] calldata outcomeIds, uint256[] calldata pricesWad, uint64 observedAt)\\n        external\\n        onlyPriceKeeper\\n    {\\n        uint256 n = outcomeIds.length;\\n        if (n == 0 || n > MAX_BATCH || n != pricesWad.length) revert BadConfig();\\n        for (uint256 i; i < n; ++i) {\\n            _post(outcomeIds[i], pricesWad[i], observedAt);\\n        }\\n    }\\n\\n    function _post(uint32 outcomeId, uint256 priceWad, uint64 observedAt) internal {\\n        _market(outcomeId);\\n        if (priceWad < MIN_REFERENCE || priceWad > MAX_REFERENCE) revert BadPrice();\\n        if (observedAt > block.timestamp || block.timestamp - observedAt > maxAge) revert StaleReference();\\n        Reference storage ref = _references[outcomeId];\\n        if (observedAt < ref.observedAt) revert StaleReference();\\n        ref.priceWad = uint128(priceWad);\\n        ref.observedAt = observedAt;\\n        ref.postedAt = uint64(block.timestamp);\\n        // Re-center: Yes price = no / (yes + no) = priceWad, with yes + no = 2 * depth.\\n        uint256 total = 2 * virtualDepth;\\n        uint256 no = total * priceWad / WAD;\\n        reserves[outcomeId] = Reserves({ yes: total - no, no: no, live: true });\\n        emit ReferencePosted(outcomeId, priceWad, observedAt);\\n    }\\n\\n    // ----------------------------------------------------------------- views\\n\\n    function referenceOf(uint32 outcomeId)\\n        external\\n        view\\n        returns (uint256 priceWad, uint64 observedAt, uint64 postedAt, bool fresh)\\n    {\\n        Reference storage ref = _references[outcomeId];\\n        priceWad = ref.priceWad;\\n        observedAt = ref.observedAt;\\n        postedAt = ref.postedAt;\\n        fresh = observedAt != 0 && block.timestamp <= uint256(observedAt) + maxAge;\\n    }\\n\\n    /// @notice OK, NO_REFERENCE, or STALE for the outcome's current reference.\\n    function referenceStatus(uint32 outcomeId) public view returns (uint8) {\\n        Reference storage ref = _references[outcomeId];\\n        if (ref.observedAt == 0) return NO_REFERENCE;\\n        if (block.timestamp > uint256(ref.observedAt) + maxAge) return STALE;\\n        return OK;\\n    }\\n\\n    /// @notice Pool price. Zero before the first reference is posted.\\n    function spotPrice(uint32 outcomeId, bool yesSide) external view returns (uint256 priceWad) {\\n        Reserves storage r = reserves[outcomeId];\\n        if (!r.live) return 0;\\n        uint256 yesPrice = _yesPrice(r.yes, r.no);\\n        priceWad = yesSide ? yesPrice : WAD - yesPrice;\\n    }\\n\\n    /// @notice Tokens bought with `collateralIn`, after the trade fee when it is on.\\n    ///         Zero when the trade would revert for the reference or the band.\\n    function quoteBuy(uint32 outcomeId, bool yesSide, uint256 collateralIn)\\n        external\\n        view\\n        returns (uint256 tokensOut)\\n    {\\n        uint256 net = collateralIn - factory.fees().quote(collateralIn);\\n        tokensOut = _safeQuoteBuy(outcomeId, yesSide, net);\\n    }\\n\\n    /// @notice Collateral the seller receives, after the trade fee when it is on.\\n    ///         Zero when the trade would revert for the reference or the band.\\n    function quoteSell(uint32 outcomeId, bool yesSide, uint256 tokenIn)\\n        external\\n        view\\n        returns (uint256 collateralOut)\\n    {\\n        if (tokenIn == 0 || !reserves[outcomeId].live) return 0;\\n        (uint256 gross, Reserves memory next) = _quoteSell(outcomeId, yesSide, tokenIn);\\n        if (_status(outcomeId, next) != OK) return 0;\\n        collateralOut = gross - factory.fees().quote(gross);\\n    }\\n\\n    /// @notice Parlay buys skip the trade fee. Entry already charged once.\\n    ///         Zero when the trade would revert for the reference or the band.\\n    function quoteBuyExempt(uint32 outcomeId, bool yesSide, uint256 collateralIn)\\n        external\\n        view\\n        returns (uint256 tokensOut)\\n    {\\n        tokensOut = _safeQuoteBuy(outcomeId, yesSide, collateralIn);\\n    }\\n\\n    /// @notice Largest net collateral (after fee) one buy can spend before the band stops it.\\n    ///         Rounded down with a small margin. Zero when the reference is missing or stale.\\n    function maxBuy(uint32 outcomeId, bool yesSide) external view returns (uint256 net) {\\n        if (referenceStatus(outcomeId) != OK) return 0;\\n        Reserves storage r = reserves[outcomeId];\\n        uint256 ref = _references[outcomeId].priceWad;\\n        uint256 band = bandBps * WAD / BPS;\\n        // Bought side's price at the band edge, capped below 1.\\n        uint256 ownPrice = yesSide ? ref + band : (WAD - ref) + band;\\n        if (ownPrice >= WAD) ownPrice = WAD - 1e12;\\n        (uint256 own, uint256 other) = yesSide ? (r.yes, r.no) : (r.no, r.yes);\\n        // Price of own side = other / (own + other). With own * other = k at the edge,\\n        // other' = sqrt(k * p / (1 - p)).\\n        uint256 k = own * other;\\n        uint256 otherEdge = Math.sqrt(k * ownPrice / (WAD - ownPrice));\\n        if (otherEdge <= other) return 0;\\n        net = otherEdge - other;\\n        net -= net / 1000 + 1;\\n    }\\n\\n    // ---------------------------------------------------------------- trades\\n\\n    function buy(uint32 outcomeId, bool yesSide, uint256 collateralIn, uint256 minTokens)\\n        external\\n        nonReentrant\\n        returns (uint256 tokensOut)\\n    {\\n        uint256 fee = factory.fees().quote(collateralIn);\\n        uint256 net = collateralIn - fee;\\n        tokensOut = _buy(msg.sender, outcomeId, yesSide, collateralIn, net, fee, minTokens);\\n    }\\n\\n    function buyExempt(uint32 outcomeId, bool yesSide, uint256 collateralIn, uint256 minTokens)\\n        external\\n        nonReentrant\\n        returns (uint256 tokensOut)\\n    {\\n        if (msg.sender != address(factory.parlay())) revert NotParlay();\\n        tokensOut = _buy(msg.sender, outcomeId, yesSide, collateralIn, collateralIn, 0, minTokens);\\n    }\\n\\n    function sell(uint32 outcomeId, bool yesSide, uint256 tokenIn, uint256 minCollateral)\\n        external\\n        nonReentrant\\n        returns (uint256 collateralOut)\\n    {\\n        Market market = _market(outcomeId);\\n        if (market.tradingHalted()) revert Halted();\\n        _requireReference(outcomeId);\\n        (uint256 gross, Reserves memory next) = _quoteSell(outcomeId, yesSide, tokenIn);\\n        _requireBand(outcomeId, next);\\n        uint256 fee = factory.fees().quote(gross);\\n        collateralOut = gross - fee;\\n        if (collateralOut < minCollateral || gross == 0) revert Slippage();\\n        reserves[outcomeId] = next;\\n        market.burnOutcome(msg.sender, yesSide, tokenIn);\\n        market.payout(msg.sender, collateralOut, factory.fees().recipient(), fee);\\n        emit Sold(msg.sender, outcomeId, yesSide, tokenIn, collateralOut);\\n    }\\n\\n    function _buy(\\n        address payer,\\n        uint32 outcomeId,\\n        bool yesSide,\\n        uint256 pulled,\\n        uint256 net,\\n        uint256 fee,\\n        uint256 minTokens\\n    ) internal returns (uint256 tokensOut) {\\n        Market market = _market(outcomeId);\\n        if (market.tradingHalted()) revert Halted();\\n        if (net == 0) revert ZeroAmount();\\n        _requireReference(outcomeId);\\n        (uint256 quoted, Reserves memory next) = _quoteBuy(outcomeId, yesSide, net);\\n        _requireBand(outcomeId, next);\\n        if (quoted < minTokens || quoted == 0) revert Slippage();\\n        reserves[outcomeId] = next;\\n        IERC20 token = IERC20(factory.usdc());\\n        if (fee > 0) token.safeTransferFrom(payer, factory.fees().recipient(), fee);\\n        token.safeTransferFrom(payer, address(market), net);\\n        market.creditBacking(net);\\n        market.mintOutcome(payer, yesSide, quoted);\\n        emit Bought(payer, outcomeId, yesSide, pulled, quoted);\\n        return quoted;\\n    }\\n\\n    // -------------------------------------------------------------- internals\\n\\n    function _requireReference(uint32 outcomeId) internal view {\\n        uint8 s = referenceStatus(outcomeId);\\n        if (s == NO_REFERENCE) revert NoReference();\\n        if (s == STALE) revert StaleReference();\\n    }\\n\\n    function _requireBand(uint32 outcomeId, Reserves memory next) internal view {\\n        if (!_inBand(outcomeId, next)) revert OutOfBand();\\n    }\\n\\n    function _inBand(uint32 outcomeId, Reserves memory next) internal view returns (bool) {\\n        uint256 ref = _references[outcomeId].priceWad;\\n        uint256 band = bandBps * WAD / BPS;\\n        uint256 p = _yesPrice(next.yes, next.no);\\n        return p <= ref + band && p + band >= ref;\\n    }\\n\\n    function _status(uint32 outcomeId, Reserves memory next) internal view returns (uint8) {\\n        uint8 s = referenceStatus(outcomeId);\\n        if (s != OK) return s;\\n        return _inBand(outcomeId, next) ? OK : OUT_OF_BAND;\\n    }\\n\\n    function _safeQuoteBuy(uint32 outcomeId, bool yesSide, uint256 net) internal view returns (uint256) {\\n        if (net == 0 || !reserves[outcomeId].live) return 0;\\n        (bool ok, bytes memory data) =\\n            address(this).staticcall(abi.encodeCall(this.rawQuoteBuy, (outcomeId, yesSide, net)));\\n        if (!ok) return 0;\\n        (uint256 tokens, uint256 y, uint256 n) = abi.decode(data, (uint256, uint256, uint256));\\n        if (_status(outcomeId, Reserves({ yes: y, no: n, live: true })) != OK) return 0;\\n        return tokens;\\n    }\\n\\n    /// @notice Unchecked curve quote with no reference or band check. Reverts on dust.\\n    ///         For tooling only. Trades always apply the checks.\\n    function rawQuoteBuy(uint32 outcomeId, bool yesSide, uint256 net)\\n        external\\n        view\\n        returns (uint256 tokensOut, uint256 nextYes, uint256 nextNo)\\n    {\\n        Reserves memory next;\\n        (tokensOut, next) = _quoteBuy(outcomeId, yesSide, net);\\n        return (tokensOut, next.yes, next.no);\\n    }\\n\\n    function _quoteBuy(uint32 outcomeId, bool yesSide, uint256 net)\\n        internal\\n        view\\n        returns (uint256 tokensOut, Reserves memory next)\\n    {\\n        (uint256 y, uint256 n) = _viewReserves(outcomeId);\\n        if (yesSide) {\\n            (tokensOut, next.yes, next.no) = _buySide(y, n, net);\\n        } else {\\n            (tokensOut, next.no, next.yes) = _buySide(n, y, net);\\n        }\\n        next.live = true;\\n    }\\n\\n    function _quoteSell(uint32 outcomeId, bool yesSide, uint256 tokenIn)\\n        internal\\n        view\\n        returns (uint256 gross, Reserves memory next)\\n    {\\n        (uint256 y, uint256 n) = _viewReserves(outcomeId);\\n        if (yesSide) {\\n            gross = _sellSide(y, n, tokenIn);\\n            next.yes = y + tokenIn - gross;\\n            next.no = n - gross;\\n        } else {\\n            gross = _sellSide(n, y, tokenIn);\\n            next.no = n + tokenIn - gross;\\n            next.yes = y - gross;\\n        }\\n        next.live = true;\\n    }\\n\\n    function _yesPrice(uint256 y, uint256 n) internal pure returns (uint256) {\\n        return n * WAD / (y + n);\\n    }\\n\\n    /// @dev Add `net` to both virtual reserves, then remove the bought side so the product holds.\\n    function _buySide(uint256 own, uint256 other, uint256 net)\\n        internal\\n        pure\\n        returns (uint256 tokens, uint256 newOwn, uint256 newOther)\\n    {\\n        uint256 k = own * other;\\n        newOther = other + net;\\n        uint256 ownAdded = own + net;\\n        newOwn = Math.divUp(k, newOther);\\n        if (ownAdded <= newOwn) revert Dust();\\n        tokens = ownAdded - newOwn;\\n    }\\n\\n    /// @dev Collateral removed when `sold` tokens of `own` come back and a complete set leaves.\\n    function _sellSide(uint256 own, uint256 other, uint256 sold) internal pure returns (uint256 gross) {\\n        if (sold == 0 || other < 2) revert Dust();\\n        uint256 k = own * other;\\n        uint256 b = own + other + sold;\\n        uint256 disc = b * b - 4 * sold * other;\\n        uint256 root = Math.sqrtCeil(disc);\\n        if (b <= root) revert Dust();\\n        gross = (b - root) / 2;\\n        if (gross >= other) gross = other - 1;\\n        uint256 guard;\\n        while (gross > 0 && (own + sold - gross) * (other - gross) < k) {\\n            gross -= 1;\\n            guard += 1;\\n            if (guard > 8) revert Dust();\\n        }\\n        if (gross == 0 || own + sold <= gross) revert Dust();\\n    }\\n\\n    function _viewReserves(uint32 outcomeId) internal view returns (uint256 y, uint256 n) {\\n        Reserves storage r = reserves[outcomeId];\\n        if (!r.live) revert NoReference();\\n        return (r.yes, r.no);\\n    }\\n\\n    function _market(uint32 outcomeId) internal view returns (Market market) {\\n        market = factory.marketOf(outcomeId);\\n        if (address(market) == address(0)) revert UnknownMarket();\\n    }\\n}\\n\"},\"src/settlement/ISettlementAdapter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.28;\\n\\n/// @notice What a Mirror market needs from settlement. Swap the adapter on the factory.\\n///\\n/// The working adapter posts a keeper value and waits out a challenge window.\\n/// Nobody votes. There is no separate oracle.\\n///\\n/// This is not a trustless HIP-4 read. Elysium's HyperCore read precompile is not\\n/// live, and Elysium's docs do not list HIP-4 outcome status. HyperEVM exposes\\n/// outcome status at precompile 0x814: calldata `abi.encode(uint32 outcome)` with\\n/// no selector, returning `(uint8 status, uint64 settledValue, uint32 question)`.\\n/// Status 2 means settled and `settledValue` uses 1e8 = 1. A bridge from a\\n/// HyperEVM contract into Elysium is unconfirmed, so Mirror does not call 0x814.\\ninterface ISettlementAdapter {\\n    /// @param posted Trading halts once a settlement is posted, including while it is challenged.\\n    /// @param finalized Redeem opens only after the challenge window passes without a live challenge.\\n    /// @param settleFractionWad 1e18 = 1. Yes is paid this fraction. No is paid one minus it.\\n    function getSettlement(uint32 outcomeId)\\n        external\\n        view\\n        returns (bool posted, bool finalized, uint256 settleFractionWad);\\n}\\n\"}}}}","SwarmSource":""}],"status":"1"}