ETH Price: $1,965.75 (-2.33%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Merge Positions245604242026-03-01 5:12:5920 hrs ago1772341979IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000011830.0387472
Merge Positions245604182026-03-01 5:11:4720 hrs ago1772341907IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.00001550.0552011
Redeem Proposal245146742026-02-22 20:02:237 days ago1771790543IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000015310.04265834
Redeem Proposal245146082026-02-22 19:49:117 days ago1771789751IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000016160.04297635
Split Position243983252026-02-06 14:17:2323 days ago1770387443IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000308631.01187753
Split Position243364172026-01-28 22:45:3532 days ago1769640335IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000017350.04592623
Merge Positions243357902026-01-28 20:39:5932 days ago1769632799IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000029320.08268217
Split Position243357792026-01-28 20:37:4732 days ago1769632667IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000032870.08698192
Split Position243357192026-01-28 20:25:4732 days ago1769631947IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000035530.09400676
Split Position243357002026-01-28 20:21:5932 days ago1769631719IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000044660.11018475
Merge Positions243356752026-01-28 20:16:5932 days ago1769631419IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000044470.12541128
Split Position243356632026-01-28 20:14:3532 days ago1769631275IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000061170.15093089
Split Position243356502026-01-28 20:11:5932 days ago1769631119IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000070.14016344
Merge Positions243356182026-01-28 20:05:3532 days ago1769630735IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000052790.14332435
Split Position243356032026-01-28 20:02:3532 days ago1769630555IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000063630.16835329
Split Position243355652026-01-28 19:54:5932 days ago1769630099IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000043760.11175484
Split Position243354742026-01-28 19:36:4732 days ago1769629007IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000063230.16145682
Merge Positions243346692026-01-28 16:55:1132 days ago1769619311IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000079920.21143109
Split Position243337912026-01-28 13:59:1132 days ago1769608751IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000048650.15952859
Merge Positions243322022026-01-28 8:39:2332 days ago1769589563IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000336851.14353351
Split Position243319452026-01-28 7:47:4732 days ago1769586467IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000018410.04679533
Split Position243303232026-01-28 2:22:3532 days ago1769566955IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000014950.03819115
Split Position243299012026-01-28 0:57:5933 days ago1769561879IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000014450.03824408
Split Position243260442026-01-27 12:02:5933 days ago1769515379IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000029620.07563988
Split Position243189272026-01-26 12:12:4734 days ago1769429567IN
0xAc9Bf8Eb...BD93f98Dc
0 ETH0.000041630.10272446
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FutarchyRouter

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 100 runs

Other Settings:
paris EvmVersion, MIT license
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import "./FutarchyProposal.sol";
import {IConditionalTokens, IERC20, IWrapped1155Factory} from "./Interfaces.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";

/// @dev Router implementation that allows to use two collateral tokens.
contract FutarchyRouter is ERC1155Holder {
    /// @dev Conditional Tokens contract.
    IConditionalTokens public immutable conditionalTokens;
    /// @dev Wrapped1155Factory contract.
    IWrapped1155Factory public immutable wrapped1155Factory;

    /// @dev Constructor.
    /// @param _conditionalTokens Conditional Tokens contract.
    /// @param _wrapped1155Factory Wrapped1155Factory contract.
    constructor(IConditionalTokens _conditionalTokens, IWrapped1155Factory _wrapped1155Factory) {
        conditionalTokens = _conditionalTokens;
        wrapped1155Factory = _wrapped1155Factory;
    }

    /// @notice Transfers the collateral to the Router, splits the position and sends the ERC20 outcome tokens back to the user.
    /// @dev The ERC20 associated to each outcome must be previously created on the wrapped1155Factory.
    /// @dev Collateral tokens are deposited only if we are not splitting a deep position (parentCollectionId is bytes32(0)).
    /// @param proposal The Proposal to split.
    /// @param collateralToken The address of the ERC20 used as collateral.
    /// @param amount The amount of collateral to split.
    function splitPosition(FutarchyProposal proposal, IERC20 collateralToken, uint256 amount) public {
        if (proposal.parentCollectionId() == bytes32(0)) {
            // transfer the collateral tokens to the Router.
            collateralToken.transferFrom(msg.sender, address(this), amount);
        }
        _splitPosition(proposal, collateralToken, amount);
    }

    /// @notice Splits a position and sends the ERC20 outcome tokens to the user.
    /// @dev The ERC20 associated to each outcome must be previously created on the wrapped1155Factory.
    /// @param proposal The Proposal to split.
    /// @param collateralToken The address of the ERC20 used as collateral.
    /// @param amount The amount of collateral to split.
    function _splitPosition(FutarchyProposal proposal, IERC20 collateralToken, uint256 amount) internal {
        bytes32 parentCollectionId = proposal.parentCollectionId();
        bytes32 conditionId = proposal.conditionId();

        uint256[] memory partition = new uint256[](2);
        partition[0] = 1;
        partition[1] = 2;

        if (parentCollectionId != bytes32(0)) {
            // it's splitting from a parent position, so we need to unwrap these tokens first because they will be burnt to mint the child outcome tokens.
            (IERC20 wrapped1155, bytes memory data) = proposal.parentWrappedOutcome();

            uint256 tokenId = conditionalTokens.getPositionId(address(collateralToken), parentCollectionId);

            wrapped1155.transferFrom(msg.sender, address(this), amount);
            wrapped1155Factory.unwrap(address(conditionalTokens), tokenId, amount, address(this), data);
        } else {
            collateralToken.approve(address(conditionalTokens), amount);
        }

        conditionalTokens.splitPosition(address(collateralToken), parentCollectionId, conditionId, partition, amount);

        bool isFirstCollateral = collateralToken == proposal.collateralToken1();

        // wrap & transfer the minted outcome tokens.
        for (uint256 j = 0; j < 2; j++) {
            uint256 tokenId = getTokenId(collateralToken, parentCollectionId, conditionId, 1 << j);

            (IERC20 wrapped1155, bytes memory data) = proposal.wrappedOutcome(isFirstCollateral ? j : j + 2);

            // wrap to erc20.
            conditionalTokens.safeTransferFrom(address(this), address(wrapped1155Factory), tokenId, amount, data);

            // transfer the ERC20 back to the user.
            require(wrapped1155.transfer(msg.sender, amount), "Wrapped token transfer failed");
        }
    }

    /// @notice Merges positions and sends the collateral tokens to the user.
    /// @dev The ERC20 associated to each outcome must be previously created on the wrapped1155Factory.
    /// @dev Collateral tokens are withdrawn only if we are not merging a deep position (parentCollectionId is bytes32(0)).
    /// @param proposal The Proposal to merge.
    /// @param collateralToken The address of the ERC20 used as collateral.
    /// @param amount The amount of outcome tokens to merge.
    function mergePositions(FutarchyProposal proposal, IERC20 collateralToken, uint256 amount) public {
        _mergePositions(proposal, collateralToken, amount);

        if (proposal.parentCollectionId() == bytes32(0)) {
            // send collateral tokens back to the user.
            require(collateralToken.transfer(msg.sender, amount), "Collateral transfer failed");
        }
    }

    /// @notice Merges positions and receives the collateral tokens.
    /// @dev Callers to this function must send the collateral to the user.
    /// @param proposal The Proposal to merge.
    /// @param collateralToken The address of the ERC20 used as collateral.
    /// @param amount The amount of outcome tokens to merge.
    function _mergePositions(FutarchyProposal proposal, IERC20 collateralToken, uint256 amount) internal {
        bytes32 parentCollectionId = proposal.parentCollectionId();
        bytes32 conditionId = proposal.conditionId();

        uint256[] memory partition = new uint256[](2);
        partition[0] = 1;
        partition[1] = 2;

        bool isFirstCollateral = collateralToken == proposal.collateralToken1();

        // we need to unwrap the outcome tokens because they will be burnt during the merge.
        for (uint256 j = 0; j < 2; j++) {
            uint256 tokenId = getTokenId(collateralToken, parentCollectionId, conditionId, 1 << j);

            (IERC20 wrapped1155, bytes memory data) = proposal.wrappedOutcome(isFirstCollateral ? j : j + 2);

            wrapped1155.transferFrom(msg.sender, address(this), amount);
            wrapped1155Factory.unwrap(address(conditionalTokens), tokenId, amount, address(this), data);
        }

        conditionalTokens.mergePositions(address(collateralToken), parentCollectionId, conditionId, partition, amount);

        if (parentCollectionId != bytes32(0)) {
            // it's merging from a parent position, so we need to wrap these tokens and send them back to the user.
            uint256 tokenId = conditionalTokens.getPositionId(address(collateralToken), parentCollectionId);

            (IERC20 wrapped1155, bytes memory data) = proposal.parentWrappedOutcome();

            // wrap to erc20.
            conditionalTokens.safeTransferFrom(address(this), address(wrapped1155Factory), tokenId, amount, data);

            // transfer the ERC20 back to the user.
            require(wrapped1155.transfer(msg.sender, amount), "Wrapped token transfer failed");
        }
    }

    /// @notice Redeems positions and sends the collateral tokens to the user.
    /// @dev The ERC20 associated to each outcome must be previously created on the wrapped1155Factory.
    /// @dev Collateral tokens are withdrawn only if we are not redeeming a deep position (parentCollectionId is bytes32(0)).
    /// @param proposal The Proposal to redeem.
    /// @param amount1 Amount to redeem for the first collateral.
    /// @param amount2 Amount to redeem for the second collateral.
    function redeemProposal(FutarchyProposal proposal, uint256 amount1, uint256 amount2) external {
        redeemPositions(proposal, proposal.collateralToken1(), amount1);
        redeemPositions(proposal, proposal.collateralToken2(), amount2);
    }

    /// @notice Redeems positions and sends the collateral tokens to the user.
    /// @dev The ERC20 associated to each outcome must be previously created on the wrapped1155Factory.
    /// @dev Collateral tokens are withdrawn only if we are not redeeming a deep position (parentCollectionId is bytes32(0)).
    /// @param proposal The Proposal to redeem.
    /// @param collateralToken The address of the ERC20 used as collateral.
    /// @param amount Amount to redeem.
    function redeemPositions(FutarchyProposal proposal, IERC20 collateralToken, uint256 amount) public {
        bytes32 parentCollectionId = proposal.parentCollectionId();
        uint256 initialBalance;

        if (parentCollectionId == bytes32(0)) {
            initialBalance = collateralToken.balanceOf(address(this));
        }

        _redeemPositions(proposal, collateralToken, amount);

        if (parentCollectionId == bytes32(0)) {
            uint256 finalBalance = collateralToken.balanceOf(address(this));

            if (finalBalance > initialBalance) {
                // send collateral tokens back to the user.
                require(
                    collateralToken.transfer(msg.sender, finalBalance - initialBalance), "Collateral transfer failed"
                );
            }
        }
    }

    /// @notice Redeems positions and receives the collateral tokens.
    /// @dev Callers to this function must send the collateral to the user.
    /// @param proposal The Proposal to redeem.
    /// @param collateralToken The address of the ERC20 used as collateral.
    /// @param amount Amount to redeem.
    function _redeemPositions(FutarchyProposal proposal, IERC20 collateralToken, uint256 amount) internal {
        bytes32 parentCollectionId = proposal.parentCollectionId();
        bytes32 conditionId = proposal.conditionId();

        uint256[] memory indexSets = new uint256[](1);
        bool isApproved = conditionalTokens.payoutNumerators(conditionId, 0) == 1;
        uint256 j = isApproved ? 0 : 1;
        indexSets[0] = 1 << j;
        uint256 tokenId = getTokenId(collateralToken, parentCollectionId, conditionId, indexSets[0]);

        // first we need to unwrap the outcome tokens that will be redeemed.
        (IERC20 wrapped1155, bytes memory data) =
            proposal.wrappedOutcome(collateralToken == proposal.collateralToken1() ? j : j + 2);

        wrapped1155.transferFrom(msg.sender, address(this), amount);

        wrapped1155Factory.unwrap(address(conditionalTokens), tokenId, amount, address(this), data);

        uint256 initialBalance = 0;

        if (parentCollectionId != bytes32(0)) {
            // if we are redeeming from a child market, the user may already have parent tokens so we need to track the balance change.
            tokenId = conditionalTokens.getPositionId(address(collateralToken), parentCollectionId);
            initialBalance = conditionalTokens.balanceOf(address(this), tokenId);
        }

        conditionalTokens.redeemPositions(address(collateralToken), parentCollectionId, conditionId, indexSets);

        if (parentCollectionId != bytes32(0)) {
            // if we are redeeming from a child market, redeemPositions() returned outcome tokens of the parent market. We need to wrap and send them to the user.
            uint256 finalBalance = conditionalTokens.balanceOf(address(this), tokenId);

            if (finalBalance > initialBalance) {
                // wrap to erc20.
                (IERC20 parentWrapped1155, bytes memory parentData) = proposal.parentWrappedOutcome();

                conditionalTokens.safeTransferFrom(
                    address(this), address(wrapped1155Factory), tokenId, finalBalance - initialBalance, parentData
                );

                // transfer the ERC20 back to the user.
                require(
                    parentWrapped1155.transfer(msg.sender, finalBalance - initialBalance),
                    "Parent wrapped token transfer failed"
                );
            }
        }
    }

    /// @notice Constructs a tokenId from a collateral token and an outcome collection.
    /// @param collateralToken The address of the ERC20 used as collateral.
    /// @param parentCollectionId The Conditional Tokens parent collection id.
    /// @param conditionId The id of the condition used to redeem.
    /// @param indexSet Index set of the outcome collection to combine with the parent outcome collection.
    /// @return The token id.
    function getTokenId(
        IERC20 collateralToken,
        bytes32 parentCollectionId,
        bytes32 conditionId,
        uint256 indexSet
    ) public view returns (uint256) {
        bytes32 collectionId = conditionalTokens.getCollectionId(parentCollectionId, conditionId, indexSet);
        return conditionalTokens.getPositionId(address(collateralToken), collectionId);
    }

    /// @notice Helper function used to know the redeemable outcomes associated to a conditionId.
    /// @param conditionId The id of the condition.
    /// @return An array of outcomes where a true value indicates that the outcome is redeemable.
    function getWinningOutcomes(bytes32 conditionId) external view returns (bool[] memory) {
        bool[] memory result = new bool[](conditionalTokens.getOutcomeSlotCount(conditionId));

        for (uint256 i = 0; i < result.length; i++) {
            result[i] = conditionalTokens.payoutNumerators(conditionId, i) == 0 ? false : true;
        }

        return result;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC-1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC-1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.20;

import {IERC165, ERC165} from "../../../utils/introspection/ERC165.sol";
import {IERC1155Receiver} from "../IERC1155Receiver.sol";

/**
 * @dev Simple implementation of `IERC1155Receiver` that will allow a contract to hold ERC-1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 */
abstract contract ERC1155Holder is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }

    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

/**
 *  @authors: [@xyzseer]
 *  @reviewers: []
 *  @auditors: []
 *  @bounties: []
 *  @deployments: []
 */

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import "./FutarchyRealityProxy.sol";
import {IERC20} from "./Interfaces.sol";

contract FutarchyProposal {
    /// @dev Flag to initialize the proposal only once.
    bool public initialized;

    /// @dev Contains the information associated to the proposal.
    /// @param conditionId Conditional Tokens conditionId.
    /// @param collateralToken1 First collateral token.
    /// @param collateralToken2 Second collateral token.
    /// @param parentCollectionId Conditional Tokens parentCollectionId.
    /// @param parentOutcome Conditional outcome to use (optional).
    /// @param parentMarket Conditional proposal to use (optional).
    /// @param questionId Conditional Tokens questionId.
    /// @param encodedQuestion Encoded question, needed to create and reopen a question.
    /// @param wrapped1155 Outcome tokens Wrapped1155 address.
    /// @param data Wrapped1155 token data.
    struct FutarchyProposalParams {
        bytes32 conditionId;
        IERC20 collateralToken1;
        IERC20 collateralToken2;
        bytes32 parentCollectionId;
        uint256 parentOutcome;
        address parentMarket;
        bytes32 questionId;
        string encodedQuestion;
        IERC20[] wrapped1155;
        bytes[] tokenData;
    }

    /// @dev The name of the proposal.
    string public marketName;
    /// @dev The proposal outcomes.
    string[] public outcomes;
    /// @dev Proposal parameters.
    FutarchyProposalParams public futarchyProposalParams;
    /// @dev Oracle contract.
    FutarchyRealityProxy public realityProxy;

    /// @dev Initializer.
    /// @param _marketName The name of the proposal.
    /// @param _outcomes The proposal outcomes.
    /// @param _futarchyProposalParams Futarchy Proposal params.
    /// @param _realityProxy Oracle contract.
    function initialize(
        string memory _marketName,
        string[] memory _outcomes,
        FutarchyProposalParams memory _futarchyProposalParams,
        FutarchyRealityProxy _realityProxy
    ) external {
        require(!initialized, "Already initialized.");

        marketName = _marketName;
        outcomes = _outcomes;
        futarchyProposalParams = _futarchyProposalParams;
        realityProxy = _realityProxy;

        initialized = true;
    }

    /// @dev Encoded question parameters, needed to create and reopen a question.
    /// @return The encoded question.
    function encodedQuestion() external view returns (string memory) {
        return futarchyProposalParams.encodedQuestion;
    }

    /// @dev Conditional Tokens questionId.
    /// @return the question ID.
    function questionId() external view returns (bytes32) {
        return futarchyProposalParams.questionId;
    }

    /// @dev Conditional Tokens conditionId.
    /// @return The condition ID.
    function conditionId() external view returns (bytes32) {
        return futarchyProposalParams.conditionId;
    }

    /// @dev First collateral token.
    /// @return The collateral token.
    function collateralToken1() external view returns (IERC20) {
        return futarchyProposalParams.collateralToken1;
    }

    /// @dev Second collateral token.
    /// @return The collateral token.
    function collateralToken2() external view returns (IERC20) {
        return futarchyProposalParams.collateralToken2;
    }

    /// @dev Conditional Tokens parentCollectionId.
    /// @return The parent collection ID.
    function parentCollectionId() external view returns (bytes32) {
        return futarchyProposalParams.parentCollectionId;
    }

    /// @dev The parent proposal (optional). This proposal redeems to an outcome token of the parent proposal.
    /// @return The parent proposal address.
    function parentMarket() external view returns (address) {
        return futarchyProposalParams.parentMarket;
    }

    /// @dev The parent outcome (optional). The parent proposal's outcome token this proposal redeems for.
    /// @return The parent outcome index.
    function parentOutcome() external view returns (uint256) {
        return futarchyProposalParams.parentOutcome;
    }

    /// @dev Returns the wrapped1155 and the data corresponding to an outcome token.
    /// @param index The outcome index.
    /// @return wrapped1155 The wrapped token.
    /// @return data The token data.
    function wrappedOutcome(uint256 index) external view returns (IERC20 wrapped1155, bytes memory data) {
        return (futarchyProposalParams.wrapped1155[index], futarchyProposalParams.tokenData[index]);
    }

    /// @dev Returns the wrapped1155 and the data corresponding to the parent proposal.
    /// @return wrapped1155 The wrapped token.
    /// @return data The token data.
    function parentWrappedOutcome() external view returns (IERC20 wrapped1155, bytes memory data) {
        if (futarchyProposalParams.parentMarket != address(0)) {
            (wrapped1155, data) = FutarchyProposal(futarchyProposalParams.parentMarket).wrappedOutcome(
                futarchyProposalParams.parentOutcome
            );
        }
    }

    /// @dev Returns the number of outcomes.
    /// @return numOutcomes The number of outcomes.
    function numOutcomes() external view returns (uint256) {
        return outcomes.length;
    }

    /// @dev Helper function to resolve the proposal.
    function resolve() external {
        realityProxy.resolve(this);
    }
}

/**
 *  @authors: [@xyzseer]
 *  @reviewers: []
 *  @auditors: []
 *  @bounties: []
 *  @deployments: []
 */

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import "./FutarchyProposal.sol";
import {IConditionalTokens, IRealityETH_v3_0} from "./Interfaces.sol";

contract FutarchyRealityProxy {
    /// @dev Conditional Tokens contract.
    IConditionalTokens public immutable conditionalTokens;
    /// @dev Reality.eth contract.
    IRealityETH_v3_0 public immutable realitio;

    /// @dev Constructor.
    /// @param _conditionalTokens Conditional Tokens contract address.
    /// @param _realitio Reality.eth contract address.
    constructor(IConditionalTokens _conditionalTokens, IRealityETH_v3_0 _realitio) {
        conditionalTokens = _conditionalTokens;
        realitio = _realitio;
    }

    /// @dev Resolves the specified proposal.
    /// @param proposal Proposal to resolve. UNTRUSTED.
    function resolve(FutarchyProposal proposal) external {
        bytes32 questionId = proposal.questionId();

        uint256 answer = uint256(realitio.resultForOnceSettled(questionId));
        uint256[] memory payouts = new uint256[](2);

        // FutarchyFactory prepares the condition with two outcomes (YES / NO)
        if (answer == 0) {
            // accept proposal if result is YES
            payouts[0] = 1;
        } else {
            // reject proposal if result is NO or INVALID
            payouts[1] = 1;
        }

        conditionalTokens.reportPayouts(questionId, payouts);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IERC20 {
    function symbol() external view returns (string memory);

    function transferFrom(address from, address to, uint256 amount) external returns (bool);

    function transfer(address to, uint256 amount) external returns (bool);

    function approve(address spender, uint256 amount) external returns (bool);

    function balanceOf(address owner) external returns (uint256);

    function totalSupply() external view returns (uint256);
}

// https://github.com/RealityETH/reality-eth-monorepo/blob/main/packages/contracts/flat/RealityETH-3.0.sol
interface IRealityETH_v3_0 {
    function askQuestionWithMinBond(
        uint256 template_id,
        string memory question,
        address arbitrator,
        uint32 timeout,
        uint32 opening_ts,
        uint256 nonce,
        uint256 min_bond
    ) external payable returns (bytes32);

    function resultForOnceSettled(bytes32 question_id) external view returns (bytes32);

    function getContentHash(bytes32 question_id) external view returns (bytes32);

    function getTimeout(bytes32 question_id) external view returns (uint32);

    function submitAnswer(bytes32 question_id, bytes32 answer, uint256 max_previous) external payable;
}

interface IConditionalTokens {
    function payoutNumerators(bytes32 conditionId, uint256 index) external view returns (uint256);

    function payoutDenominator(bytes32 conditionId) external view returns (uint256);

    function prepareCondition(address oracle, bytes32 questionId, uint256 outcomeSlotCount) external;

    function reportPayouts(bytes32 questionId, uint256[] calldata payouts) external;

    function splitPosition(
        /*IERC20*/
        address collateralToken,
        bytes32 parentCollectionId,
        bytes32 conditionId,
        uint256[] calldata partition,
        uint256 amount
    ) external;

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

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

    function getConditionId(
        address oracle,
        bytes32 questionId,
        uint256 outcomeSlotCount
    ) external pure returns (bytes32);

    function getCollectionId(
        bytes32 parentCollectionId,
        bytes32 conditionId,
        uint256 indexSet
    ) external view returns (bytes32);

    function getPositionId(address collateralToken, bytes32 collectionId) external pure returns (uint256);

    function getOutcomeSlotCount(bytes32 conditionId) external view returns (uint256);

    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;

    function balanceOf(address owner, uint256 id) external view returns (uint256);
}

interface IWrapped1155Factory {
    function requireWrapped1155(
        /*IERC1155*/
        address multiToken,
        uint256 tokenId,
        bytes calldata data
    ) external /*Wrapped1155*/ returns (IERC20);

    function unwrap(
        /*IERC1155*/
        address multiToken,
        uint256 tokenId,
        uint256 amount,
        address recipient,
        bytes calldata data
    ) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IConditionalTokens","name":"_conditionalTokens","type":"address"},{"internalType":"contract IWrapped1155Factory","name":"_wrapped1155Factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"conditionalTokens","outputs":[{"internalType":"contract IConditionalTokens","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"collateralToken","type":"address"},{"internalType":"bytes32","name":"parentCollectionId","type":"bytes32"},{"internalType":"bytes32","name":"conditionId","type":"bytes32"},{"internalType":"uint256","name":"indexSet","type":"uint256"}],"name":"getTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"conditionId","type":"bytes32"}],"name":"getWinningOutcomes","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract FutarchyProposal","name":"proposal","type":"address"},{"internalType":"contract IERC20","name":"collateralToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mergePositions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract FutarchyProposal","name":"proposal","type":"address"},{"internalType":"contract IERC20","name":"collateralToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemPositions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract FutarchyProposal","name":"proposal","type":"address"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"amount2","type":"uint256"}],"name":"redeemProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract FutarchyProposal","name":"proposal","type":"address"},{"internalType":"contract IERC20","name":"collateralToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"splitPosition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wrapped1155Factory","outputs":[{"internalType":"contract IWrapped1155Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c06040523480156200001157600080fd5b50604051620028a8380380620028a8833981016040819052620000349162000065565b6001600160a01b039182166080521660a052620000a4565b6001600160a01b03811681146200006257600080fd5b50565b600080604083850312156200007957600080fd5b825162000086816200004c565b602084015190925062000099816200004c565b809150509250929050565b60805160a0516127296200017f6000396000818160fb01528181610d990152818161111901528181611564015281816117e001528181611b9d0152611ebd015260008181610165015281816102720152818161034901528181610437015281816104bc01528181610b3401528181610dc601528181610e4901528181610eda01528181610f6a01528181610ff8015281816110f10152818161159101528181611621015281816116b2015281816117b101528181611a8201528181611bca01528181611c5801528181611cde0152611e8e01526127296000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80635bd9e299116100715780635bd9e29914610160578063721ae889146101875780637abef8d11461019a578063bc197c81146101ad578063d5f82280146101e5578063f23a6e61146101f857600080fd5b806301ffc9a7146100ae57806302bd74c3146100d6578063150c5b97146100f65780631a09424a1461012a5780633f325a2b1461014b575b600080fd5b6100c16100bc366004611fca565b610217565b60405190151581526020015b60405180910390f35b6100e96100e4366004611ffb565b61024e565b6040516100cd9190612014565b61011d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516100cd919061205a565b61013d610138366004612086565b610406565b6040519081526020016100cd565b61015e6101593660046120c1565b61053e565b005b61011d7f000000000000000000000000000000000000000000000000000000000000000081565b61015e6101953660046120f6565b61061b565b61015e6101a83660046120f6565b61082e565b6101cc6101bb366004612279565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016100cd565b61015e6101f33660046120f6565b610931565b6101cc610206366004612326565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b148061024857506301ffc9a760e01b6001600160e01b03198316145b92915050565b604051636a16e06160e11b8152600481018290526060906000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d42dc0c290602401602060405180830381865afa1580156102b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102dd919061238e565b6001600160401b038111156102f4576102f4612137565b60405190808252806020026020018201604052801561031d578160200160208202803683370190505b50905060005b81518110156103ff57604051630141320560e21b815260048101859052602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630504c81490604401602060405180830381865afa158015610398573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bc919061238e565b156103c85760016103cb565b60005b8282815181106103dd576103dd6123a7565b91151560209283029190910190910152806103f7816123d3565b915050610323565b5092915050565b60405163856296f760e01b815260048101849052602481018390526044810182905260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063856296f790606401602060405180830381865afa15801561047e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a2919061238e565b60405163039dd75360e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906339dd7530906104f390899085906004016123ec565b602060405180830381865afa158015610510573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610534919061238e565b9695505050505050565b6105aa83846001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190612405565b8461061b565b61061683846001600160a01b031663c4a091d26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106109190612405565b8361061b565b505050565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561065b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067f919061238e565b90506000816106fa576040516370a0823160e01b81526001600160a01b038516906370a08231906106b490309060040161205a565b6020604051808303816000875af11580156106d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f7919061238e565b90505b610705858585610a1c565b81610827576040516370a0823160e01b81526000906001600160a01b038616906370a082319061073990309060040161205a565b6020604051808303816000875af1158015610758573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077c919061238e565b905081811115610825576001600160a01b03851663a9059cbb336107a08585612422565b6040518363ffffffff1660e01b81526004016107bd9291906123ec565b6020604051808303816000875af11580156107dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108009190612435565b6108255760405162461bcd60e51b815260040161081c90612457565b60405180910390fd5b505b5050505050565b61083983838361127d565b6000801b836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561087b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089f919061238e565b036106165760405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb906108d290339085906004016123ec565b6020604051808303816000875af11580156108f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109159190612435565b6106165760405162461bcd60e51b815260040161081c90612457565b6000801b836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610973573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610997919061238e565b03610a11576040516323b872dd60e01b81526001600160a01b038316906323b872dd906109cc9033903090869060040161248e565b6020604051808303816000875af11580156109eb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0f9190612435565b505b6106168383836118da565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a80919061238e565b90506000846001600160a01b0316632ddc7de76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae6919061238e565b604080516001808252818301909252919250600091906020808301908036833701905050604051630141320560e21b8152600481018490526000602482018190529192506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630504c81490604401602060405180830381865afa158015610b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9f919061238e565b6001149050600081610bb2576001610bb5565b60005b60ff169050806001901b83600081518110610bd257610bd26123a7565b6020026020010181815250506000610c0688878787600081518110610bf957610bf96123a7565b6020026020010151610406565b90506000808a6001600160a01b03166318a988a88c6001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c9190612405565b6001600160a01b03168c6001600160a01b031614610ca457610c9f8660026124b2565b610ca6565b855b6040518263ffffffff1660e01b8152600401610cc491815260200190565b600060405180830381865afa158015610ce1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d0991908101906124e9565b6040516323b872dd60e01b815291935091506001600160a01b038316906323b872dd90610d3e90339030908e9060040161248e565b6020604051808303816000875af1158015610d5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d819190612435565b506040516314abb2c960e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906352aecb2490610df6907f00000000000000000000000000000000000000000000000000000000000000009087908e90309088906004016125a1565b600060405180830381600087803b158015610e1057600080fd5b505af1158015610e24573d6000803e3d6000fd5b50600092505089159050610f545760405163039dd75360e41b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906339dd753090610e80908e908d906004016123ec565b602060405180830381865afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec1919061238e565b604051627eeac760e11b81529094506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169062fdd58e90610f1090309088906004016123ec565b602060405180830381865afa158015610f2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f51919061238e565b90505b604051626dc0df60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906301b7037c90610fa5908e908d908d908d90600401612616565b600060405180830381600087803b158015610fbf57600080fd5b505af1158015610fd3573d6000803e3d6000fd5b50508a15915061126f905057604051627eeac760e11b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169062fdd58e9061102e90309089906004016123ec565b602060405180830381865afa15801561104b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106f919061238e565b90508181111561126d576000808e6001600160a01b0316636fc4eddd6040518163ffffffff1660e01b8152600401600060405180830381865afa1580156110ba573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110e291908101906124e9565b90925090506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663f242432a307f00000000000000000000000000000000000000000000000000000000000000008a6111438989612422565b866040518663ffffffff1660e01b8152600401611164959493929190612643565b600060405180830381600087803b15801561117e57600080fd5b505af1158015611192573d6000803e3d6000fd5b50505050816001600160a01b031663a9059cbb3386866111b29190612422565b6040518363ffffffff1660e01b81526004016111cf9291906123ec565b6020604051808303816000875af11580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112129190612435565b61126a5760405162461bcd60e51b8152602060048201526024808201527f506172656e74207772617070656420746f6b656e207472616e736665722066616044820152631a5b195960e21b606482015260840161081c565b50505b505b505050505050505050505050565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e1919061238e565b90506000846001600160a01b0316632ddc7de76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611323573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611347919061238e565b6040805160028082526060820183529293506000929091602083019080368337019050509050600181600081518110611382576113826123a7565b6020026020010181815250506002816001815181106113a3576113a36123a7565b6020026020010181815250506000866001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114139190612405565b6001600160a01b0316866001600160a01b031614905060005b60028110156116095760006114468887876001861b610406565b90506000808a6001600160a01b03166318a988a88661146f5761146a8660026124b2565b611471565b855b6040518263ffffffff1660e01b815260040161148f91815260200190565b600060405180830381865afa1580156114ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114d491908101906124e9565b6040516323b872dd60e01b815291935091506001600160a01b038316906323b872dd9061150990339030908e9060040161248e565b6020604051808303816000875af1158015611528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154c9190612435565b506040516314abb2c960e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906352aecb24906115c1907f00000000000000000000000000000000000000000000000000000000000000009087908e90309088906004016125a1565b600060405180830381600087803b1580156115db57600080fd5b505af11580156115ef573d6000803e3d6000fd5b505050505050508080611601906123d3565b91505061142c565b50604051639e7212ad60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639e7212ad9061165e9089908890889088908c9060040161267d565b600060405180830381600087803b15801561167857600080fd5b505af115801561168c573d6000803e3d6000fd5b5050851591506118d190505760405163039dd75360e41b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906339dd7530906116e9908a9089906004016123ec565b602060405180830381865afa158015611706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172a919061238e565b9050600080896001600160a01b0316636fc4eddd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561176d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261179591908101906124e9565b604051637921219560e11b815291935091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f242432a9061180e9030907f00000000000000000000000000000000000000000000000000000000000000009088908e908890600401612643565b600060405180830381600087803b15801561182857600080fd5b505af115801561183c573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516925063a9059cbb915061186e9033908c906004016123ec565b6020604051808303816000875af115801561188d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b19190612435565b6118cd5760405162461bcd60e51b815260040161081c906126bc565b5050505b50505050505050565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561191a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193e919061238e565b90506000846001600160a01b0316632ddc7de76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a4919061238e565b60408051600280825260608201835292935060009290916020830190803683370190505090506001816000815181106119df576119df6123a7565b602002602001018181525050600281600181518110611a0057611a006123a7565b60209081029190910101528215611c3457600080876001600160a01b0316636fc4eddd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611a52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a7a91908101906124e9565b9150915060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166339dd753089886040518363ffffffff1660e01b8152600401611ace9291906123ec565b602060405180830381865afa158015611aeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0f919061238e565b6040516323b872dd60e01b81529091506001600160a01b038416906323b872dd90611b4290339030908c9060040161248e565b6020604051808303816000875af1158015611b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b859190612435565b506040516314abb2c960e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906352aecb2490611bfa907f00000000000000000000000000000000000000000000000000000000000000009085908c90309089906004016125a1565b600060405180830381600087803b158015611c1457600080fd5b505af1158015611c28573d6000803e3d6000fd5b50505050505050611cc7565b60405163095ea7b360e01b81526001600160a01b0386169063095ea7b390611c82907f00000000000000000000000000000000000000000000000000000000000000009088906004016123ec565b6020604051808303816000875af1158015611ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc59190612435565b505b6040516372ce427560e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906372ce427590611d1b9088908790879087908b9060040161267d565b600060405180830381600087803b158015611d3557600080fd5b505af1158015611d49573d6000803e3d6000fd5b505050506000866001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db19190612405565b6001600160a01b0316866001600160a01b031614905060005b6002811015611fc0576000611de48887876001861b610406565b90506000808a6001600160a01b03166318a988a886611e0d57611e088660026124b2565b611e0f565b855b6040518263ffffffff1660e01b8152600401611e2d91815260200190565b600060405180830381865afa158015611e4a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e7291908101906124e9565b604051637921219560e11b815291935091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f242432a90611eeb9030907f00000000000000000000000000000000000000000000000000000000000000009088908f908890600401612643565b600060405180830381600087803b158015611f0557600080fd5b505af1158015611f19573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516925063a9059cbb9150611f4b9033908d906004016123ec565b6020604051808303816000875af1158015611f6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8e9190612435565b611faa5760405162461bcd60e51b815260040161081c906126bc565b5050508080611fb8906123d3565b915050611dca565b5050505050505050565b600060208284031215611fdc57600080fd5b81356001600160e01b031981168114611ff457600080fd5b9392505050565b60006020828403121561200d57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561204e578351151583529284019291840191600101612030565b50909695505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461208357600080fd5b50565b6000806000806080858703121561209c57600080fd5b84356120a78161206e565b966020860135965060408601359560600135945092505050565b6000806000606084860312156120d657600080fd5b83356120e18161206e565b95602085013595506040909401359392505050565b60008060006060848603121561210b57600080fd5b83356121168161206e565b925060208401356121268161206e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561217557612175612137565b604052919050565b600082601f83011261218e57600080fd5b813560206001600160401b038211156121a9576121a9612137565b8160051b6121b882820161214d565b92835284810182019282810190878511156121d257600080fd5b83870192505b848310156121f1578235825291830191908301906121d8565b979650505050505050565b60006001600160401b0382111561221557612215612137565b50601f01601f191660200190565b600082601f83011261223457600080fd5b8135612247612242826121fc565b61214d565b81815284602083860101111561225c57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561229157600080fd5b853561229c8161206e565b945060208601356122ac8161206e565b935060408601356001600160401b03808211156122c857600080fd5b6122d489838a0161217d565b945060608801359150808211156122ea57600080fd5b6122f689838a0161217d565b9350608088013591508082111561230c57600080fd5b5061231988828901612223565b9150509295509295909350565b600080600080600060a0868803121561233e57600080fd5b85356123498161206e565b945060208601356123598161206e565b9350604086013592506060860135915060808601356001600160401b0381111561238257600080fd5b61231988828901612223565b6000602082840312156123a057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123e5576123e56123bd565b5060010190565b6001600160a01b03929092168252602082015260400190565b60006020828403121561241757600080fd5b8151611ff48161206e565b81810381811115610248576102486123bd565b60006020828403121561244757600080fd5b81518015158114611ff457600080fd5b6020808252601a908201527f436f6c6c61746572616c207472616e73666572206661696c6564000000000000604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b80820180821115610248576102486123bd565b60005b838110156124e05781810151838201526020016124c8565b50506000910152565b600080604083850312156124fc57600080fd5b82516125078161206e565b60208401519092506001600160401b0381111561252357600080fd5b8301601f8101851361253457600080fd5b8051612542612242826121fc565b81815286602083850101111561255757600080fd5b6125688260208301602086016124c5565b8093505050509250929050565b6000815180845261258d8160208601602086016124c5565b601f01601f19169290920160200192915050565b6001600160a01b03868116825260208201869052604082018590528316606082015260a0608082018190526000906121f190830184612575565b600081518084526020808501945080840160005b8381101561260b578151875295820195908201906001016125ef565b509495945050505050565b60018060a01b038516815283602082015282604082015260806060820152600061053460808301846125db565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906121f190830184612575565b60018060a01b038616815284602082015283604082015260a0606082015260006126aa60a08301856125db565b90508260808301529695505050505050565b6020808252601d908201527f5772617070656420746f6b656e207472616e73666572206661696c656400000060408201526060019056fea26469706673582212209e0412b50457c7a211f2ae99be1ab27b5931c3e085c5d354e7eb7cd19ce6631364736f6c63430008140033000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80635bd9e299116100715780635bd9e29914610160578063721ae889146101875780637abef8d11461019a578063bc197c81146101ad578063d5f82280146101e5578063f23a6e61146101f857600080fd5b806301ffc9a7146100ae57806302bd74c3146100d6578063150c5b97146100f65780631a09424a1461012a5780633f325a2b1461014b575b600080fd5b6100c16100bc366004611fca565b610217565b60405190151581526020015b60405180910390f35b6100e96100e4366004611ffb565b61024e565b6040516100cd9190612014565b61011d7f000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f81565b6040516100cd919061205a565b61013d610138366004612086565b610406565b6040519081526020016100cd565b61015e6101593660046120c1565b61053e565b005b61011d7f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c81565b61015e6101953660046120f6565b61061b565b61015e6101a83660046120f6565b61082e565b6101cc6101bb366004612279565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016100cd565b61015e6101f33660046120f6565b610931565b6101cc610206366004612326565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b148061024857506301ffc9a760e01b6001600160e01b03198316145b92915050565b604051636a16e06160e11b8152600481018290526060906000906001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c169063d42dc0c290602401602060405180830381865afa1580156102b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102dd919061238e565b6001600160401b038111156102f4576102f4612137565b60405190808252806020026020018201604052801561031d578160200160208202803683370190505b50905060005b81518110156103ff57604051630141320560e21b815260048101859052602481018290527f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c6001600160a01b031690630504c81490604401602060405180830381865afa158015610398573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bc919061238e565b156103c85760016103cb565b60005b8282815181106103dd576103dd6123a7565b91151560209283029190910190910152806103f7816123d3565b915050610323565b5092915050565b60405163856296f760e01b815260048101849052602481018390526044810182905260009081906001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c169063856296f790606401602060405180830381865afa15801561047e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a2919061238e565b60405163039dd75360e41b81529091506001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c16906339dd7530906104f390899085906004016123ec565b602060405180830381865afa158015610510573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610534919061238e565b9695505050505050565b6105aa83846001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190612405565b8461061b565b61061683846001600160a01b031663c4a091d26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106109190612405565b8361061b565b505050565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561065b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067f919061238e565b90506000816106fa576040516370a0823160e01b81526001600160a01b038516906370a08231906106b490309060040161205a565b6020604051808303816000875af11580156106d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f7919061238e565b90505b610705858585610a1c565b81610827576040516370a0823160e01b81526000906001600160a01b038616906370a082319061073990309060040161205a565b6020604051808303816000875af1158015610758573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077c919061238e565b905081811115610825576001600160a01b03851663a9059cbb336107a08585612422565b6040518363ffffffff1660e01b81526004016107bd9291906123ec565b6020604051808303816000875af11580156107dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108009190612435565b6108255760405162461bcd60e51b815260040161081c90612457565b60405180910390fd5b505b5050505050565b61083983838361127d565b6000801b836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561087b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089f919061238e565b036106165760405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb906108d290339085906004016123ec565b6020604051808303816000875af11580156108f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109159190612435565b6106165760405162461bcd60e51b815260040161081c90612457565b6000801b836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610973573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610997919061238e565b03610a11576040516323b872dd60e01b81526001600160a01b038316906323b872dd906109cc9033903090869060040161248e565b6020604051808303816000875af11580156109eb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0f9190612435565b505b6106168383836118da565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a80919061238e565b90506000846001600160a01b0316632ddc7de76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae6919061238e565b604080516001808252818301909252919250600091906020808301908036833701905050604051630141320560e21b8152600481018490526000602482018190529192506001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c1690630504c81490604401602060405180830381865afa158015610b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9f919061238e565b6001149050600081610bb2576001610bb5565b60005b60ff169050806001901b83600081518110610bd257610bd26123a7565b6020026020010181815250506000610c0688878787600081518110610bf957610bf96123a7565b6020026020010151610406565b90506000808a6001600160a01b03166318a988a88c6001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c9190612405565b6001600160a01b03168c6001600160a01b031614610ca457610c9f8660026124b2565b610ca6565b855b6040518263ffffffff1660e01b8152600401610cc491815260200190565b600060405180830381865afa158015610ce1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d0991908101906124e9565b6040516323b872dd60e01b815291935091506001600160a01b038316906323b872dd90610d3e90339030908e9060040161248e565b6020604051808303816000875af1158015610d5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d819190612435565b506040516314abb2c960e21b81526001600160a01b037f000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f16906352aecb2490610df6907f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c9087908e90309088906004016125a1565b600060405180830381600087803b158015610e1057600080fd5b505af1158015610e24573d6000803e3d6000fd5b50600092505089159050610f545760405163039dd75360e41b81526001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c16906339dd753090610e80908e908d906004016123ec565b602060405180830381865afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec1919061238e565b604051627eeac760e11b81529094506001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c169062fdd58e90610f1090309088906004016123ec565b602060405180830381865afa158015610f2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f51919061238e565b90505b604051626dc0df60e21b81526001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c16906301b7037c90610fa5908e908d908d908d90600401612616565b600060405180830381600087803b158015610fbf57600080fd5b505af1158015610fd3573d6000803e3d6000fd5b50508a15915061126f905057604051627eeac760e11b81526000906001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c169062fdd58e9061102e90309089906004016123ec565b602060405180830381865afa15801561104b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106f919061238e565b90508181111561126d576000808e6001600160a01b0316636fc4eddd6040518163ffffffff1660e01b8152600401600060405180830381865afa1580156110ba573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110e291908101906124e9565b90925090506001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c1663f242432a307f000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f8a6111438989612422565b866040518663ffffffff1660e01b8152600401611164959493929190612643565b600060405180830381600087803b15801561117e57600080fd5b505af1158015611192573d6000803e3d6000fd5b50505050816001600160a01b031663a9059cbb3386866111b29190612422565b6040518363ffffffff1660e01b81526004016111cf9291906123ec565b6020604051808303816000875af11580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112129190612435565b61126a5760405162461bcd60e51b8152602060048201526024808201527f506172656e74207772617070656420746f6b656e207472616e736665722066616044820152631a5b195960e21b606482015260840161081c565b50505b505b505050505050505050505050565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e1919061238e565b90506000846001600160a01b0316632ddc7de76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611323573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611347919061238e565b6040805160028082526060820183529293506000929091602083019080368337019050509050600181600081518110611382576113826123a7565b6020026020010181815250506002816001815181106113a3576113a36123a7565b6020026020010181815250506000866001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114139190612405565b6001600160a01b0316866001600160a01b031614905060005b60028110156116095760006114468887876001861b610406565b90506000808a6001600160a01b03166318a988a88661146f5761146a8660026124b2565b611471565b855b6040518263ffffffff1660e01b815260040161148f91815260200190565b600060405180830381865afa1580156114ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114d491908101906124e9565b6040516323b872dd60e01b815291935091506001600160a01b038316906323b872dd9061150990339030908e9060040161248e565b6020604051808303816000875af1158015611528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154c9190612435565b506040516314abb2c960e21b81526001600160a01b037f000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f16906352aecb24906115c1907f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c9087908e90309088906004016125a1565b600060405180830381600087803b1580156115db57600080fd5b505af11580156115ef573d6000803e3d6000fd5b505050505050508080611601906123d3565b91505061142c565b50604051639e7212ad60e01b81526001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c1690639e7212ad9061165e9089908890889088908c9060040161267d565b600060405180830381600087803b15801561167857600080fd5b505af115801561168c573d6000803e3d6000fd5b5050851591506118d190505760405163039dd75360e41b81526000906001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c16906339dd7530906116e9908a9089906004016123ec565b602060405180830381865afa158015611706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172a919061238e565b9050600080896001600160a01b0316636fc4eddd6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561176d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261179591908101906124e9565b604051637921219560e11b815291935091506001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c169063f242432a9061180e9030907f000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f9088908e908890600401612643565b600060405180830381600087803b15801561182857600080fd5b505af115801561183c573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516925063a9059cbb915061186e9033908c906004016123ec565b6020604051808303816000875af115801561188d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b19190612435565b6118cd5760405162461bcd60e51b815260040161081c906126bc565b5050505b50505050505050565b6000836001600160a01b03166344bea37e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561191a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193e919061238e565b90506000846001600160a01b0316632ddc7de76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a4919061238e565b60408051600280825260608201835292935060009290916020830190803683370190505090506001816000815181106119df576119df6123a7565b602002602001018181525050600281600181518110611a0057611a006123a7565b60209081029190910101528215611c3457600080876001600160a01b0316636fc4eddd6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611a52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a7a91908101906124e9565b9150915060007f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c6001600160a01b03166339dd753089886040518363ffffffff1660e01b8152600401611ace9291906123ec565b602060405180830381865afa158015611aeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0f919061238e565b6040516323b872dd60e01b81529091506001600160a01b038416906323b872dd90611b4290339030908c9060040161248e565b6020604051808303816000875af1158015611b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b859190612435565b506040516314abb2c960e21b81526001600160a01b037f000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f16906352aecb2490611bfa907f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c9085908c90309089906004016125a1565b600060405180830381600087803b158015611c1457600080fd5b505af1158015611c28573d6000803e3d6000fd5b50505050505050611cc7565b60405163095ea7b360e01b81526001600160a01b0386169063095ea7b390611c82907f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c9088906004016123ec565b6020604051808303816000875af1158015611ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc59190612435565b505b6040516372ce427560e01b81526001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c16906372ce427590611d1b9088908790879087908b9060040161267d565b600060405180830381600087803b158015611d3557600080fd5b505af1158015611d49573d6000803e3d6000fd5b505050506000866001600160a01b0316634d7b09006040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db19190612405565b6001600160a01b0316866001600160a01b031614905060005b6002811015611fc0576000611de48887876001861b610406565b90506000808a6001600160a01b03166318a988a886611e0d57611e088660026124b2565b611e0f565b855b6040518263ffffffff1660e01b8152600401611e2d91815260200190565b600060405180830381865afa158015611e4a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e7291908101906124e9565b604051637921219560e11b815291935091506001600160a01b037f000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c169063f242432a90611eeb9030907f000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f9088908f908890600401612643565b600060405180830381600087803b158015611f0557600080fd5b505af1158015611f19573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038516925063a9059cbb9150611f4b9033908d906004016123ec565b6020604051808303816000875af1158015611f6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8e9190612435565b611faa5760405162461bcd60e51b815260040161081c906126bc565b5050508080611fb8906123d3565b915050611dca565b5050505050505050565b600060208284031215611fdc57600080fd5b81356001600160e01b031981168114611ff457600080fd5b9392505050565b60006020828403121561200d57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561204e578351151583529284019291840191600101612030565b50909695505050505050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461208357600080fd5b50565b6000806000806080858703121561209c57600080fd5b84356120a78161206e565b966020860135965060408601359560600135945092505050565b6000806000606084860312156120d657600080fd5b83356120e18161206e565b95602085013595506040909401359392505050565b60008060006060848603121561210b57600080fd5b83356121168161206e565b925060208401356121268161206e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561217557612175612137565b604052919050565b600082601f83011261218e57600080fd5b813560206001600160401b038211156121a9576121a9612137565b8160051b6121b882820161214d565b92835284810182019282810190878511156121d257600080fd5b83870192505b848310156121f1578235825291830191908301906121d8565b979650505050505050565b60006001600160401b0382111561221557612215612137565b50601f01601f191660200190565b600082601f83011261223457600080fd5b8135612247612242826121fc565b61214d565b81815284602083860101111561225c57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561229157600080fd5b853561229c8161206e565b945060208601356122ac8161206e565b935060408601356001600160401b03808211156122c857600080fd5b6122d489838a0161217d565b945060608801359150808211156122ea57600080fd5b6122f689838a0161217d565b9350608088013591508082111561230c57600080fd5b5061231988828901612223565b9150509295509295909350565b600080600080600060a0868803121561233e57600080fd5b85356123498161206e565b945060208601356123598161206e565b9350604086013592506060860135915060808601356001600160401b0381111561238257600080fd5b61231988828901612223565b6000602082840312156123a057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123e5576123e56123bd565b5060010190565b6001600160a01b03929092168252602082015260400190565b60006020828403121561241757600080fd5b8151611ff48161206e565b81810381811115610248576102486123bd565b60006020828403121561244757600080fd5b81518015158114611ff457600080fd5b6020808252601a908201527f436f6c6c61746572616c207472616e73666572206661696c6564000000000000604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b80820180821115610248576102486123bd565b60005b838110156124e05781810151838201526020016124c8565b50506000910152565b600080604083850312156124fc57600080fd5b82516125078161206e565b60208401519092506001600160401b0381111561252357600080fd5b8301601f8101851361253457600080fd5b8051612542612242826121fc565b81815286602083850101111561255757600080fd5b6125688260208301602086016124c5565b8093505050509250929050565b6000815180845261258d8160208601602086016124c5565b601f01601f19169290920160200192915050565b6001600160a01b03868116825260208201869052604082018590528316606082015260a0608082018190526000906121f190830184612575565b600081518084526020808501945080840160005b8381101561260b578151875295820195908201906001016125ef565b509495945050505050565b60018060a01b038516815283602082015282604082015260806060820152600061053460808301846125db565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906121f190830184612575565b60018060a01b038616815284602082015283604082015260a0606082015260006126aa60a08301856125db565b90508260808301529695505050505050565b6020808252601d908201527f5772617070656420746f6b656e207472616e73666572206661696c656400000060408201526060019056fea26469706673582212209e0412b50457c7a211f2ae99be1ab27b5931c3e085c5d354e7eb7cd19ce6631364736f6c63430008140033

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

000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f

-----Decoded View---------------
Arg [0] : _conditionalTokens (address): 0xC59b0e4De5F1248C1140964E0fF287B192407E0C
Arg [1] : _wrapped1155Factory (address): 0xD194319D1804C1051DD21Ba1Dc931cA72410B79f

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c59b0e4de5f1248c1140964e0ff287b192407e0c
Arg [1] : 000000000000000000000000d194319d1804c1051dd21ba1dc931ca72410b79f


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.