Contract 0xA6bfF4f91016C2b4aac140B2D8D7317B36AfE5aB 2

 
 
Txn Hash
Method
Block
From
To
Value
0xb37ea93ba44fa2ce8a9c345cb29744d1c701fd4a0fe660ad6ba6ea7f3c9221a6Public Sell Comp...99616122020-04-28 14:43:19944 days 4 hrs agoENS Name melvin.eth IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.008937047
0x110c2bcea10f0d296b2e66d2db3c954249a2b8621281012f910456e05fb800c1Public Sell Comp...95739212020-02-28 18:58:451004 days 20 mins ago0x97c96eaa506d4b6a0c4d27363d4c157625571132 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000727281
0xe2b5fd047ce3f4611856513093b4a5acff6305c8529e4290a6be3ae8a43fae98Public Sell Comp...94180752020-02-04 19:41:001027 days 23 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.00391094
0x6de21440a68a51b42233af3fc064f1002b50394620be7d8f55f862e494c39612Public Sell Comp...94129212020-02-04 0:52:341028 days 18 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.00391094
0xeb0940a4ae13efe8f3699b53b1e6fbf52d15934c58571a71f3ec38a86ff81b62Public Sell Comp...94126832020-02-03 23:55:271028 days 19 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.00391094
0xc7bac825c6e2417b7144571612438da861daa27af3679b5d9d347202103caec8Public Sell Comp...94117652020-02-03 20:27:251028 days 22 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.00391094
0x224408f8d21b171c97542b916fb817be312b992ddef6a1a1e8e5c03d9f4bd513Public Sell Comp...94057362020-02-02 22:18:261029 days 21 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.003920163
0xda829cce81782c42114ad6a254535f0a65ae58e5490ab5e8791319aaf870b21fPublic Sell Comp...94056702020-02-02 22:02:361029 days 21 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.003920193
0xbaef6352f26d525abf520d681d03aa91746f8dcd312ea6abc8ea595749d48fa2Public Sell Comp...94040452020-02-02 16:03:311030 days 3 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.003920193
0x278e94b37eaa98219b69e694b51fde51a953ba7c1951964ce1d4c69abbcd3e43Public Sell Comp...93141452020-01-19 21:03:081043 days 22 hrs ago0x3312f0770f7690d90633d3d3a5e8d788cc9bb162 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000829631.25
0x4fd07fbdc774cacec57f7e16abcb9490a196c4c3110377ee05525842d50d573dPublic Sell Comp...93131782020-01-19 17:38:381044 days 1 hr ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.003920193
0x82f180ff23143b784dc38738eae8f02a9e7b55f1820004f6f7e0bee6deda82e3Public Sell Comp...92670732020-01-12 15:57:401051 days 3 hrs ago0x3312f0770f7690d90633d3d3a5e8d788cc9bb162 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000792131.25
0x3b6d5d52d488c2bdd3a990b1b8b74646eed8b8128314f7e77c7e9d11e8a31c59Public Sell Comp...92670732020-01-12 15:57:401051 days 3 hrs ago0x3312f0770f7690d90633d3d3a5e8d788cc9bb162 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000829631.25
0x963596c484b3aac758410f7fe7aa0318b09c8f6020befc447db9f819332c2bb7Public Sell Comp...92619662020-01-11 21:08:111051 days 22 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.002114771.6
0x2034261b582f735b1e71d73d43569e2a671dc4d96092ee1952492c4864aa8580Public Sell Comp...92616472020-01-11 20:02:451051 days 23 hrs ago0x3312f0770f7690d90633d3d3a5e8d788cc9bb162 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000829631.25
0xe9ee9e1a9f9b133f1d066df88b788f610cffbf1af7320abe8e01308e331f47b1Public Sell Comp...92604462020-01-11 15:35:361052 days 3 hrs ago0x3312f0770f7690d90633d3d3a5e8d788cc9bb162 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000829631.25
0x36ba63c2fa63f251e838b3178ee5debc9910df85d64b0a518eb6a9a3474046c9Public Sell Comp...92524242020-01-10 10:13:411053 days 9 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.004340225
0xa370cb2e835a4918a71ca4c20a9ed74c36ff7928c67b61f499c35126bdb68600Public Sell Comp...92329012020-01-07 10:19:151056 days 8 hrs ago0x1672420884fdcdc721a1d01aed1a2c2269a8691f IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.004415345
0x5719516a5a4366d592db51a997e4c4a9239b7115e66f61af1fefc7b9b2fd7c0ePublic Sell Comp...92199002020-01-05 10:40:401058 days 8 hrs ago0x3312f0770f7690d90633d3d3a5e8d788cc9bb162 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000829631.25
0xadb30ee44e71468f14b32c8f47a1dd1fe58323d22528119d117fe11d006d4318Public Sell Comp...92164272020-01-04 21:44:081058 days 21 hrs ago0x3312f0770f7690d90633d3d3a5e8d788cc9bb162 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000829631.25
0x4d495ed529f93044ca2470f277e4dd990b8124037155960c86e9fd641cb3c9cbPublic Sell Comp...91932702020-01-01 0:02:411062 days 19 hrs ago0xeb32276da20cb2e9c985cea981b70510639e7f16 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.00260423
0x104282e11cadfb2a263d2ff704e9285c5a8ed2e6d7d622f3e629d1183c50a8d9Public Sell Comp...91701992019-12-27 9:53:011067 days 9 hrs ago0xeb32276da20cb2e9c985cea981b70510639e7f16 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.00251423
0x34f9aafaa327ce3d98aef50e654859bca431cbd5247ad672a774945976bda03fPublic Sell Comp...91550162019-12-24 9:15:411070 days 10 hrs ago0xeb32276da20cb2e9c985cea981b70510639e7f16 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.004340225
0x8fdbeb6b54a7d0aa4d2e0ee7840cfb48d5d1d05d3a18fd0514ea6c8926681701Public Sell Comp...91275922019-12-18 22:02:511075 days 21 hrs ago0xeb32276da20cb2e9c985cea981b70510639e7f16 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.001516792
0x52ce4f9f0a77082500138dd775b3f2e7346dc92e899e6c2a0904b48ac1d33d17Public Sell Comp...91270242019-12-18 19:23:431075 days 23 hrs ago0xeb32276da20cb2e9c985cea981b70510639e7f16 IN  0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0 Ether0.000274621.20000004
[ Download CSV Export 
Latest 14 internal transactions
Parent Txn Hash Block From To Value
0x7eaaf0446684bbe0cb41020d46c7cd86eb6e06170081b63418a270b46d27444c79231602019-06-09 6:24:151268 days 12 hrs ago 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab Augur: Delegator1.68 Ether
0x7eaaf0446684bbe0cb41020d46c7cd86eb6e06170081b63418a270b46d27444c79231602019-06-09 6:24:151268 days 12 hrs ago 0x52a437d10ca61eabc1948c0ad84e9a50defa99bb 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab1.68 Ether
0xd083b580bb40071d285c76f4b7e505dcaf354fbc8cec2ed2d55ab0e80b3caaa866999022018-11-14 0:26:411475 days 18 hrs ago 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab Augur: Delegator23.8 Ether
0xd083b580bb40071d285c76f4b7e505dcaf354fbc8cec2ed2d55ab0e80b3caaa866999022018-11-14 0:26:411475 days 18 hrs ago 0xefaa3a2d1c8b26fefc1dfd1285c8e35f588e34a5 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab23.8 Ether
0x20d75237f80907fbb8789a7478256c07c8a3f3d5e06eafba49ee29afce8d44bf66925832018-11-12 19:49:291476 days 23 hrs ago 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab Augur: Delegator5.75 Ether
0x20d75237f80907fbb8789a7478256c07c8a3f3d5e06eafba49ee29afce8d44bf66925832018-11-12 19:49:291476 days 23 hrs ago 0xefaa3a2d1c8b26fefc1dfd1285c8e35f588e34a5 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab5.75 Ether
0x3ced5768daed72eac078e0b6ba603bdbf10760b95f58278a3fd0e1d6fc9a711366801722018-11-10 19:10:551479 days 8 mins ago 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab Augur: Delegator5 Ether
0x3ced5768daed72eac078e0b6ba603bdbf10760b95f58278a3fd0e1d6fc9a711366801722018-11-10 19:10:551479 days 8 mins ago 0xefaa3a2d1c8b26fefc1dfd1285c8e35f588e34a5 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab5 Ether
0xcc29813fceed03598804b07801f90218f2f1c350216e6bd123a1fc95d4baa2f166801592018-11-10 19:06:281479 days 12 mins ago 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab Augur: Delegator0.5 Ether
0xcc29813fceed03598804b07801f90218f2f1c350216e6bd123a1fc95d4baa2f166801592018-11-10 19:06:281479 days 12 mins ago 0xefaa3a2d1c8b26fefc1dfd1285c8e35f588e34a5 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0.5 Ether
0x993023385c80960d1494371cd09b238adfef4cf91713435a2007957bcb3bb53566796532018-11-10 17:10:421479 days 2 hrs ago 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab Augur: Delegator14.5 Ether
0x993023385c80960d1494371cd09b238adfef4cf91713435a2007957bcb3bb53566796532018-11-10 17:10:421479 days 2 hrs ago 0x3c9923956c7a48b46a8a028ff93eb36aca927ebc 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab14.5 Ether
0x976b4f00fc09201fe1b02a9745115309560839f641c4d7f20adf0b3c9ed408a561591842018-08-16 18:09:031565 days 1 hr ago 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab Augur: Delegator0.05 Ether
0x976b4f00fc09201fe1b02a9745115309560839f641c4d7f20adf0b3c9ed408a561591842018-08-16 18:09:031565 days 1 hr ago 0x3c9923956c7a48b46a8a028ff93eb36aca927ebc 0xa6bff4f91016c2b4aac140b2d8d7317b36afe5ab0.05 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CompleteSets

Compiler Version
v0.4.20+commit.3155dd80

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-07-08
*/

pragma solidity 0.4.20;

contract IAugur {
    function createChildUniverse(bytes32 _parentPayoutDistributionHash, uint256[] _parentPayoutNumerators, bool _parentInvalid) public returns (IUniverse);
    function isKnownUniverse(IUniverse _universe) public view returns (bool);
    function trustedTransfer(ERC20 _token, address _from, address _to, uint256 _amount) public returns (bool);
    function logMarketCreated(bytes32 _topic, string _description, string _extraInfo, IUniverse _universe, address _market, address _marketCreator, bytes32[] _outcomes, int256 _minPrice, int256 _maxPrice, IMarket.MarketType _marketType) public returns (bool);
    function logMarketCreated(bytes32 _topic, string _description, string _extraInfo, IUniverse _universe, address _market, address _marketCreator, int256 _minPrice, int256 _maxPrice, IMarket.MarketType _marketType) public returns (bool);
    function logInitialReportSubmitted(IUniverse _universe, address _reporter, address _market, uint256 _amountStaked, bool _isDesignatedReporter, uint256[] _payoutNumerators, bool _invalid) public returns (bool);
    function disputeCrowdsourcerCreated(IUniverse _universe, address _market, address _disputeCrowdsourcer, uint256[] _payoutNumerators, uint256 _size, bool _invalid) public returns (bool);
    function logDisputeCrowdsourcerContribution(IUniverse _universe, address _reporter, address _market, address _disputeCrowdsourcer, uint256 _amountStaked) public returns (bool);
    function logDisputeCrowdsourcerCompleted(IUniverse _universe, address _market, address _disputeCrowdsourcer) public returns (bool);
    function logInitialReporterRedeemed(IUniverse _universe, address _reporter, address _market, uint256 _amountRedeemed, uint256 _repReceived, uint256 _reportingFeesReceived, uint256[] _payoutNumerators) public returns (bool);
    function logDisputeCrowdsourcerRedeemed(IUniverse _universe, address _reporter, address _market, uint256 _amountRedeemed, uint256 _repReceived, uint256 _reportingFeesReceived, uint256[] _payoutNumerators) public returns (bool);
    function logFeeWindowRedeemed(IUniverse _universe, address _reporter, uint256 _amountRedeemed, uint256 _reportingFeesReceived) public returns (bool);
    function logMarketFinalized(IUniverse _universe) public returns (bool);
    function logMarketMigrated(IMarket _market, IUniverse _originalUniverse) public returns (bool);
    function logReportingParticipantDisavowed(IUniverse _universe, IMarket _market) public returns (bool);
    function logMarketParticipantsDisavowed(IUniverse _universe) public returns (bool);
    function logOrderCanceled(IUniverse _universe, address _shareToken, address _sender, bytes32 _orderId, Order.Types _orderType, uint256 _tokenRefund, uint256 _sharesRefund) public returns (bool);
    function logOrderCreated(Order.Types _orderType, uint256 _amount, uint256 _price, address _creator, uint256 _moneyEscrowed, uint256 _sharesEscrowed, bytes32 _tradeGroupId, bytes32 _orderId, IUniverse _universe, address _shareToken) public returns (bool);
    function logOrderFilled(IUniverse _universe, address _shareToken, address _filler, bytes32 _orderId, uint256 _numCreatorShares, uint256 _numCreatorTokens, uint256 _numFillerShares, uint256 _numFillerTokens, uint256 _marketCreatorFees, uint256 _reporterFees, uint256 _amountFilled, bytes32 _tradeGroupId) public returns (bool);
    function logCompleteSetsPurchased(IUniverse _universe, IMarket _market, address _account, uint256 _numCompleteSets) public returns (bool);
    function logCompleteSetsSold(IUniverse _universe, IMarket _market, address _account, uint256 _numCompleteSets) public returns (bool);
    function logTradingProceedsClaimed(IUniverse _universe, address _shareToken, address _sender, address _market, uint256 _numShares, uint256 _numPayoutTokens, uint256 _finalTokenBalance) public returns (bool);
    function logUniverseForked() public returns (bool);
    function logFeeWindowTransferred(IUniverse _universe, address _from, address _to, uint256 _value) public returns (bool);
    function logReputationTokensTransferred(IUniverse _universe, address _from, address _to, uint256 _value) public returns (bool);
    function logDisputeCrowdsourcerTokensTransferred(IUniverse _universe, address _from, address _to, uint256 _value) public returns (bool);
    function logShareTokensTransferred(IUniverse _universe, address _from, address _to, uint256 _value) public returns (bool);
    function logReputationTokenBurned(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logReputationTokenMinted(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logShareTokenBurned(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logShareTokenMinted(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logFeeWindowBurned(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logFeeWindowMinted(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logDisputeCrowdsourcerTokensBurned(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logDisputeCrowdsourcerTokensMinted(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logFeeWindowCreated(IFeeWindow _feeWindow, uint256 _id) public returns (bool);
    function logFeeTokenTransferred(IUniverse _universe, address _from, address _to, uint256 _value) public returns (bool);
    function logFeeTokenBurned(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logFeeTokenMinted(IUniverse _universe, address _target, uint256 _amount) public returns (bool);
    function logTimestampSet(uint256 _newTimestamp) public returns (bool);
    function logInitialReporterTransferred(IUniverse _universe, IMarket _market, address _from, address _to) public returns (bool);
    function logMarketTransferred(IUniverse _universe, address _from, address _to) public returns (bool);
    function logMarketMailboxTransferred(IUniverse _universe, IMarket _market, address _from, address _to) public returns (bool);
    function logEscapeHatchChanged(bool _isOn) public returns (bool);
}

contract IControlled {
    function getController() public view returns (IController);
    function setController(IController _controller) public returns(bool);
}

contract Controlled is IControlled {
    IController internal controller;

    modifier onlyWhitelistedCallers {
        require(controller.assertIsWhitelisted(msg.sender));
        _;
    }

    modifier onlyCaller(bytes32 _key) {
        require(msg.sender == controller.lookup(_key));
        _;
    }

    modifier onlyControllerCaller {
        require(IController(msg.sender) == controller);
        _;
    }

    modifier onlyInGoodTimes {
        require(controller.stopInEmergency());
        _;
    }

    modifier onlyInBadTimes {
        require(controller.onlyInEmergency());
        _;
    }

    function Controlled() public {
        controller = IController(msg.sender);
    }

    function getController() public view returns(IController) {
        return controller;
    }

    function setController(IController _controller) public onlyControllerCaller returns(bool) {
        controller = _controller;
        return true;
    }
}

contract IController {
    function assertIsWhitelisted(address _target) public view returns(bool);
    function lookup(bytes32 _key) public view returns(address);
    function stopInEmergency() public view returns(bool);
    function onlyInEmergency() public view returns(bool);
    function getAugur() public view returns (IAugur);
    function getTimestamp() public view returns (uint256);
}

contract CashAutoConverter is Controlled {
    /**
     * @dev Convert any ETH provided in the transaction into Cash before the function executes and convert any remaining Cash balance into ETH after the function completes
     */
    modifier convertToAndFromCash() {
        ethToCash();
        _;
        cashToEth();
    }

    function ethToCash() private returns (bool) {
        if (msg.value > 0) {
            ICash(controller.lookup("Cash")).depositEtherFor.value(msg.value)(msg.sender);
        }
        return true;
    }

    function cashToEth() private returns (bool) {
        ICash _cash = ICash(controller.lookup("Cash"));
        uint256 _tokenBalance = _cash.balanceOf(msg.sender);
        if (_tokenBalance > 0) {
            IAugur augur = controller.getAugur();
            augur.trustedTransfer(_cash, msg.sender, this, _tokenBalance);
            _cash.withdrawEtherTo(msg.sender, _tokenBalance);
        }
        return true;
    }
}

contract IOwnable {
    function getOwner() public view returns (address);
    function transferOwnership(address newOwner) public returns (bool);
}

contract ITyped {
    function getTypeName() public view returns (bytes32);
}

contract Initializable {
    bool private initialized = false;

    modifier afterInitialized {
        require(initialized);
        _;
    }

    modifier beforeInitialized {
        require(!initialized);
        _;
    }

    function endInitialization() internal beforeInitialized returns (bool) {
        initialized = true;
        return true;
    }

    function getInitialized() public view returns (bool) {
        return initialized;
    }
}

contract MarketValidator is Controlled {
    modifier marketIsLegit(IMarket _market) {
        IUniverse _universe = _market.getUniverse();
        require(controller.getAugur().isKnownUniverse(_universe));
        require(_universe.isContainerForMarket(_market));
        _;
    }
}

contract ReentrancyGuard {
    /**
     * @dev We use a single lock for the whole contract.
     */
    bool private rentrancyLock = false;

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * @notice If you mark a function `nonReentrant`, you should also mark it `external`. Calling one nonReentrant function from another is not supported. Instead, you can implement a `private` function doing the actual work, and a `external` wrapper marked as `nonReentrant`.
     */
    modifier nonReentrant() {
        require(!rentrancyLock);
        rentrancyLock = true;
        _;
        rentrancyLock = false;
    }
}

library SafeMathUint256 {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a * b;
        require(a == 0 || c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        return a - b;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);
        return c;
    }

    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a <= b) {
            return a;
        } else {
            return b;
        }
    }

    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a >= b) {
            return a;
        } else {
            return b;
        }
    }

    function getUint256Min() internal pure returns (uint256) {
        return 0;
    }

    function getUint256Max() internal pure returns (uint256) {
        return 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
    }

    function isMultipleOf(uint256 a, uint256 b) internal pure returns (bool) {
        return a % b == 0;
    }

    // Float [fixed point] Operations
    function fxpMul(uint256 a, uint256 b, uint256 base) internal pure returns (uint256) {
        return div(mul(a, b), base);
    }

    function fxpDiv(uint256 a, uint256 b, uint256 base) internal pure returns (uint256) {
        return div(mul(a, base), b);
    }
}

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

    function balanceOf(address _who) public view returns (uint256);
    function transfer(address _to, uint256 _value) public returns (bool);
    function totalSupply() public view returns (uint256);
}

contract ERC20 is ERC20Basic {
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function allowance(address _owner, address _spender) public view returns (uint256);
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
    function approve(address _spender, uint256 _value) public returns (bool);
}

contract IFeeToken is ERC20, Initializable {
    function initialize(IFeeWindow _feeWindow) public returns (bool);
    function getFeeWindow() public view returns (IFeeWindow);
    function feeWindowBurn(address _target, uint256 _amount) public returns (bool);
    function mintForReportingParticipant(address _target, uint256 _amount) public returns (bool);
}

contract IFeeWindow is ITyped, ERC20 {
    function initialize(IUniverse _universe, uint256 _feeWindowId) public returns (bool);
    function getUniverse() public view returns (IUniverse);
    function getReputationToken() public view returns (IReputationToken);
    function getStartTime() public view returns (uint256);
    function getEndTime() public view returns (uint256);
    function getNumMarkets() public view returns (uint256);
    function getNumInvalidMarkets() public view returns (uint256);
    function getNumIncorrectDesignatedReportMarkets() public view returns (uint256);
    function getNumDesignatedReportNoShows() public view returns (uint256);
    function getFeeToken() public view returns (IFeeToken);
    function isActive() public view returns (bool);
    function isOver() public view returns (bool);
    function onMarketFinalized() public returns (bool);
    function buy(uint256 _attotokens) public returns (bool);
    function redeem(address _sender) public returns (bool);
    function redeemForReportingParticipant() public returns (bool);
    function mintFeeTokens(uint256 _amount) public returns (bool);
    function trustedUniverseBuy(address _buyer, uint256 _attotokens) public returns (bool);
}

contract IMailbox {
    function initialize(address _owner, IMarket _market) public returns (bool);
    function depositEther() public payable returns (bool);
}

contract IMarket is ITyped, IOwnable {
    enum MarketType {
        YES_NO,
        CATEGORICAL,
        SCALAR
    }

    function initialize(IUniverse _universe, uint256 _endTime, uint256 _feePerEthInAttoeth, ICash _cash, address _designatedReporterAddress, address _creator, uint256 _numOutcomes, uint256 _numTicks) public payable returns (bool _success);
    function derivePayoutDistributionHash(uint256[] _payoutNumerators, bool _invalid) public view returns (bytes32);
    function getUniverse() public view returns (IUniverse);
    function getFeeWindow() public view returns (IFeeWindow);
    function getNumberOfOutcomes() public view returns (uint256);
    function getNumTicks() public view returns (uint256);
    function getDenominationToken() public view returns (ICash);
    function getShareToken(uint256 _outcome)  public view returns (IShareToken);
    function getMarketCreatorSettlementFeeDivisor() public view returns (uint256);
    function getForkingMarket() public view returns (IMarket _market);
    function getEndTime() public view returns (uint256);
    function getMarketCreatorMailbox() public view returns (IMailbox);
    function getWinningPayoutDistributionHash() public view returns (bytes32);
    function getWinningPayoutNumerator(uint256 _outcome) public view returns (uint256);
    function getReputationToken() public view returns (IReputationToken);
    function getFinalizationTime() public view returns (uint256);
    function getInitialReporterAddress() public view returns (address);
    function deriveMarketCreatorFeeAmount(uint256 _amount) public view returns (uint256);
    function isContainerForShareToken(IShareToken _shadyTarget) public view returns (bool);
    function isContainerForReportingParticipant(IReportingParticipant _reportingParticipant) public view returns (bool);
    function isInvalid() public view returns (bool);
    function finalize() public returns (bool);
    function designatedReporterWasCorrect() public view returns (bool);
    function designatedReporterShowed() public view returns (bool);
    function isFinalized() public view returns (bool);
    function finalizeFork() public returns (bool);
    function assertBalances() public view returns (bool);
}

contract IReportingParticipant {
    function getStake() public view returns (uint256);
    function getPayoutDistributionHash() public view returns (bytes32);
    function liquidateLosing() public returns (bool);
    function redeem(address _redeemer) public returns (bool);
    function isInvalid() public view returns (bool);
    function isDisavowed() public view returns (bool);
    function migrate() public returns (bool);
    function getPayoutNumerator(uint256 _outcome) public view returns (uint256);
    function getMarket() public view returns (IMarket);
    function getSize() public view returns (uint256);
}

contract IDisputeCrowdsourcer is IReportingParticipant, ERC20 {
    function initialize(IMarket market, uint256 _size, bytes32 _payoutDistributionHash, uint256[] _payoutNumerators, bool _invalid) public returns (bool);
    function contribute(address _participant, uint256 _amount) public returns (uint256);
}

contract IReputationToken is ITyped, ERC20 {
    function initialize(IUniverse _universe) public returns (bool);
    function migrateOut(IReputationToken _destination, uint256 _attotokens) public returns (bool);
    function migrateIn(address _reporter, uint256 _attotokens) public returns (bool);
    function trustedReportingParticipantTransfer(address _source, address _destination, uint256 _attotokens) public returns (bool);
    function trustedMarketTransfer(address _source, address _destination, uint256 _attotokens) public returns (bool);
    function trustedFeeWindowTransfer(address _source, address _destination, uint256 _attotokens) public returns (bool);
    function trustedUniverseTransfer(address _source, address _destination, uint256 _attotokens) public returns (bool);
    function getUniverse() public view returns (IUniverse);
    function getTotalMigrated() public view returns (uint256);
    function getTotalTheoreticalSupply() public view returns (uint256);
    function mintForReportingParticipant(uint256 _amountMigrated) public returns (bool);
}

contract IUniverse is ITyped {
    function initialize(IUniverse _parentUniverse, bytes32 _parentPayoutDistributionHash) external returns (bool);
    function fork() public returns (bool);
    function getParentUniverse() public view returns (IUniverse);
    function createChildUniverse(uint256[] _parentPayoutNumerators, bool _invalid) public returns (IUniverse);
    function getChildUniverse(bytes32 _parentPayoutDistributionHash) public view returns (IUniverse);
    function getReputationToken() public view returns (IReputationToken);
    function getForkingMarket() public view returns (IMarket);
    function getForkEndTime() public view returns (uint256);
    function getForkReputationGoal() public view returns (uint256);
    function getParentPayoutDistributionHash() public view returns (bytes32);
    function getDisputeRoundDurationInSeconds() public view returns (uint256);
    function getOrCreateFeeWindowByTimestamp(uint256 _timestamp) public returns (IFeeWindow);
    function getOrCreateCurrentFeeWindow() public returns (IFeeWindow);
    function getOrCreateNextFeeWindow() public returns (IFeeWindow);
    function getOpenInterestInAttoEth() public view returns (uint256);
    function getRepMarketCapInAttoeth() public view returns (uint256);
    function getTargetRepMarketCapInAttoeth() public view returns (uint256);
    function getOrCacheValidityBond() public returns (uint256);
    function getOrCacheDesignatedReportStake() public returns (uint256);
    function getOrCacheDesignatedReportNoShowBond() public returns (uint256);
    function getOrCacheReportingFeeDivisor() public returns (uint256);
    function getDisputeThresholdForFork() public view returns (uint256);
    function getInitialReportMinValue() public view returns (uint256);
    function calculateFloatingValue(uint256 _badMarkets, uint256 _totalMarkets, uint256 _targetDivisor, uint256 _previousValue, uint256 _defaultValue, uint256 _floor) public pure returns (uint256 _newValue);
    function getOrCacheMarketCreationCost() public returns (uint256);
    function getCurrentFeeWindow() public view returns (IFeeWindow);
    function getOrCreateFeeWindowBefore(IFeeWindow _feeWindow) public returns (IFeeWindow);
    function isParentOf(IUniverse _shadyChild) public view returns (bool);
    function updateTentativeWinningChildUniverse(bytes32 _parentPayoutDistributionHash) public returns (bool);
    function isContainerForFeeWindow(IFeeWindow _shadyTarget) public view returns (bool);
    function isContainerForMarket(IMarket _shadyTarget) public view returns (bool);
    function isContainerForReportingParticipant(IReportingParticipant _reportingParticipant) public view returns (bool);
    function isContainerForShareToken(IShareToken _shadyTarget) public view returns (bool);
    function isContainerForFeeToken(IFeeToken _shadyTarget) public view returns (bool);
    function addMarketTo() public returns (bool);
    function removeMarketFrom() public returns (bool);
    function decrementOpenInterest(uint256 _amount) public returns (bool);
    function decrementOpenInterestFromMarket(uint256 _amount) public returns (bool);
    function incrementOpenInterest(uint256 _amount) public returns (bool);
    function incrementOpenInterestFromMarket(uint256 _amount) public returns (bool);
    function getWinningChildUniverse() public view returns (IUniverse);
    function isForking() public view returns (bool);
}

contract ICash is ERC20 {
    function depositEther() external payable returns(bool);
    function depositEtherFor(address _to) external payable returns(bool);
    function withdrawEther(uint256 _amount) external returns(bool);
    function withdrawEtherTo(address _to, uint256 _amount) external returns(bool);
    function withdrawEtherToIfPossible(address _to, uint256 _amount) external returns (bool);
}

contract ICompleteSets {
    function buyCompleteSets(address _sender, IMarket _market, uint256 _amount) external returns (bool);
    function sellCompleteSets(address _sender, IMarket _market, uint256 _amount) external returns (uint256, uint256);
}

contract CompleteSets is Controlled, CashAutoConverter, ReentrancyGuard, MarketValidator, ICompleteSets {
    using SafeMathUint256 for uint256;

    /**
     * Buys `_amount` shares of every outcome in the specified market.
    **/
    function publicBuyCompleteSets(IMarket _market, uint256 _amount) external marketIsLegit(_market) payable convertToAndFromCash onlyInGoodTimes returns (bool) {
        this.buyCompleteSets(msg.sender, _market, _amount);
        controller.getAugur().logCompleteSetsPurchased(_market.getUniverse(), _market, msg.sender, _amount);
        _market.assertBalances();
        return true;
    }

    function publicBuyCompleteSetsWithCash(IMarket _market, uint256 _amount) external marketIsLegit(_market) onlyInGoodTimes returns (bool) {
        this.buyCompleteSets(msg.sender, _market, _amount);
        controller.getAugur().logCompleteSetsPurchased(_market.getUniverse(), _market, msg.sender, _amount);
        _market.assertBalances();
        return true;
    }

    function buyCompleteSets(address _sender, IMarket _market, uint256 _amount) external onlyWhitelistedCallers nonReentrant returns (bool) {
        require(_sender != address(0));

        uint256 _numOutcomes = _market.getNumberOfOutcomes();
        ICash _denominationToken = _market.getDenominationToken();
        IAugur _augur = controller.getAugur();

        uint256 _cost = _amount.mul(_market.getNumTicks());
        require(_augur.trustedTransfer(_denominationToken, _sender, _market, _cost));
        for (uint256 _outcome = 0; _outcome < _numOutcomes; ++_outcome) {
            _market.getShareToken(_outcome).createShares(_sender, _amount);
        }

        if (!_market.isFinalized()) {
            _market.getUniverse().incrementOpenInterest(_cost);
        }

        return true;
    }

    function publicSellCompleteSets(IMarket _market, uint256 _amount) external marketIsLegit(_market) convertToAndFromCash onlyInGoodTimes returns (bool) {
        this.sellCompleteSets(msg.sender, _market, _amount);
        controller.getAugur().logCompleteSetsSold(_market.getUniverse(), _market, msg.sender, _amount);
        _market.assertBalances();
        return true;
    }

    function publicSellCompleteSetsWithCash(IMarket _market, uint256 _amount) external marketIsLegit(_market) onlyInGoodTimes returns (bool) {
        this.sellCompleteSets(msg.sender, _market, _amount);
        controller.getAugur().logCompleteSetsSold(_market.getUniverse(), _market, msg.sender, _amount);
        _market.assertBalances();
        return true;
    }

    function sellCompleteSets(address _sender, IMarket _market, uint256 _amount) external onlyWhitelistedCallers nonReentrant returns (uint256 _creatorFee, uint256 _reportingFee) {
        require(_sender != address(0));

        uint256 _numOutcomes = _market.getNumberOfOutcomes();
        ICash _denominationToken = _market.getDenominationToken();
        uint256 _payout = _amount.mul(_market.getNumTicks());
        if (!_market.isFinalized()) {
            _market.getUniverse().decrementOpenInterest(_payout);
        }
        _creatorFee = _market.deriveMarketCreatorFeeAmount(_payout);
        uint256 _reportingFeeDivisor = _market.getUniverse().getOrCacheReportingFeeDivisor();
        _reportingFee = _payout.div(_reportingFeeDivisor);
        _payout = _payout.sub(_creatorFee).sub(_reportingFee);

        // Takes shares away from participant and decreases the amount issued in the market since we're exchanging complete sets
        for (uint256 _outcome = 0; _outcome < _numOutcomes; ++_outcome) {
            _market.getShareToken(_outcome).destroyShares(_sender, _amount);
        }

        if (_creatorFee != 0) {
            require(_denominationToken.transferFrom(_market, _market.getMarketCreatorMailbox(), _creatorFee));
        }
        if (_reportingFee != 0) {
            IFeeWindow _feeWindow = _market.getUniverse().getOrCreateNextFeeWindow();
            require(_denominationToken.transferFrom(_market, _feeWindow, _reportingFee));
        }
        require(_denominationToken.transferFrom(_market, _sender, _payout));

        return (_creatorFee, _reportingFee);
    }
}

contract IOrders {
    function saveOrder(Order.Types _type, IMarket _market, uint256 _fxpAmount, uint256 _price, address _sender, uint256 _outcome, uint256 _moneyEscrowed, uint256 _sharesEscrowed, bytes32 _betterOrderId, bytes32 _worseOrderId, bytes32 _tradeGroupId) public returns (bytes32 _orderId);
    function removeOrder(bytes32 _orderId) public returns (bool);
    function getMarket(bytes32 _orderId) public view returns (IMarket);
    function getOrderType(bytes32 _orderId) public view returns (Order.Types);
    function getOutcome(bytes32 _orderId) public view returns (uint256);
    function getAmount(bytes32 _orderId) public view returns (uint256);
    function getPrice(bytes32 _orderId) public view returns (uint256);
    function getOrderCreator(bytes32 _orderId) public view returns (address);
    function getOrderSharesEscrowed(bytes32 _orderId) public view returns (uint256);
    function getOrderMoneyEscrowed(bytes32 _orderId) public view returns (uint256);
    function getBetterOrderId(bytes32 _orderId) public view returns (bytes32);
    function getWorseOrderId(bytes32 _orderId) public view returns (bytes32);
    function getBestOrderId(Order.Types _type, IMarket _market, uint256 _outcome) public view returns (bytes32);
    function getWorstOrderId(Order.Types _type, IMarket _market, uint256 _outcome) public view returns (bytes32);
    function getLastOutcomePrice(IMarket _market, uint256 _outcome) public view returns (uint256);
    function getOrderId(Order.Types _type, IMarket _market, uint256 _fxpAmount, uint256 _price, address _sender, uint256 _blockNumber, uint256 _outcome, uint256 _moneyEscrowed, uint256 _sharesEscrowed) public pure returns (bytes32);
    function getTotalEscrowed(IMarket _market) public view returns (uint256);
    function isBetterPrice(Order.Types _type, uint256 _price, bytes32 _orderId) public view returns (bool);
    function isWorsePrice(Order.Types _type, uint256 _price, bytes32 _orderId) public view returns (bool);
    function assertIsNotBetterPrice(Order.Types _type, uint256 _price, bytes32 _betterOrderId) public view returns (bool);
    function assertIsNotWorsePrice(Order.Types _type, uint256 _price, bytes32 _worseOrderId) public returns (bool);
    function recordFillOrder(bytes32 _orderId, uint256 _sharesFilled, uint256 _tokensFilled) public returns (bool);
    function setPrice(IMarket _market, uint256 _outcome, uint256 _price) external returns (bool);
    function incrementTotalEscrowed(IMarket _market, uint256 _amount) external returns (bool);
    function decrementTotalEscrowed(IMarket _market, uint256 _amount) external returns (bool);
}

contract IShareToken is ITyped, ERC20 {
    function initialize(IMarket _market, uint256 _outcome) external returns (bool);
    function createShares(address _owner, uint256 _amount) external returns (bool);
    function destroyShares(address, uint256 balance) external returns (bool);
    function getMarket() external view returns (IMarket);
    function getOutcome() external view returns (uint256);
    function trustedOrderTransfer(address _source, address _destination, uint256 _attotokens) public returns (bool);
    function trustedFillOrderTransfer(address _source, address _destination, uint256 _attotokens) public returns (bool);
    function trustedCancelOrderTransfer(address _source, address _destination, uint256 _attotokens) public returns (bool);
}

library Order {
    using SafeMathUint256 for uint256;

    enum Types {
        Bid, Ask
    }

    enum TradeDirections {
        Long, Short
    }

    struct Data {
        // Contracts
        IOrders orders;
        IMarket market;
        IAugur augur;

        // Order
        bytes32 id;
        address creator;
        uint256 outcome;
        Order.Types orderType;
        uint256 amount;
        uint256 price;
        uint256 sharesEscrowed;
        uint256 moneyEscrowed;
        bytes32 betterOrderId;
        bytes32 worseOrderId;
    }

    //
    // Constructor
    //

    // No validation is needed here as it is simply a librarty function for organizing data
    function create(IController _controller, address _creator, uint256 _outcome, Order.Types _type, uint256 _attoshares, uint256 _price, IMarket _market, bytes32 _betterOrderId, bytes32 _worseOrderId) internal view returns (Data) {
        require(_outcome < _market.getNumberOfOutcomes());
        require(_price < _market.getNumTicks());

        IOrders _orders = IOrders(_controller.lookup("Orders"));
        IAugur _augur = _controller.getAugur();

        return Data({
            orders: _orders,
            market: _market,
            augur: _augur,
            id: 0,
            creator: _creator,
            outcome: _outcome,
            orderType: _type,
            amount: _attoshares,
            price: _price,
            sharesEscrowed: 0,
            moneyEscrowed: 0,
            betterOrderId: _betterOrderId,
            worseOrderId: _worseOrderId
        });
    }

    //
    // "public" functions
    //

    function getOrderId(Order.Data _orderData) internal view returns (bytes32) {
        if (_orderData.id == bytes32(0)) {
            bytes32 _orderId = _orderData.orders.getOrderId(_orderData.orderType, _orderData.market, _orderData.amount, _orderData.price, _orderData.creator, block.number, _orderData.outcome, _orderData.moneyEscrowed, _orderData.sharesEscrowed);
            require(_orderData.orders.getAmount(_orderId) == 0);
            _orderData.id = _orderId;
        }
        return _orderData.id;
    }

    function getOrderTradingTypeFromMakerDirection(Order.TradeDirections _creatorDirection) internal pure returns (Order.Types) {
        return (_creatorDirection == Order.TradeDirections.Long) ? Order.Types.Bid : Order.Types.Ask;
    }

    function getOrderTradingTypeFromFillerDirection(Order.TradeDirections _fillerDirection) internal pure returns (Order.Types) {
        return (_fillerDirection == Order.TradeDirections.Long) ? Order.Types.Ask : Order.Types.Bid;
    }

    function escrowFunds(Order.Data _orderData) internal returns (bool) {
        if (_orderData.orderType == Order.Types.Ask) {
            return escrowFundsForAsk(_orderData);
        } else if (_orderData.orderType == Order.Types.Bid) {
            return escrowFundsForBid(_orderData);
        }
    }

    function saveOrder(Order.Data _orderData, bytes32 _tradeGroupId) internal returns (bytes32) {
        return _orderData.orders.saveOrder(_orderData.orderType, _orderData.market, _orderData.amount, _orderData.price, _orderData.creator, _orderData.outcome, _orderData.moneyEscrowed, _orderData.sharesEscrowed, _orderData.betterOrderId, _orderData.worseOrderId, _tradeGroupId);
    }

    //
    // Private functions
    //

    function escrowFundsForBid(Order.Data _orderData) private returns (bool) {
        require(_orderData.moneyEscrowed == 0);
        require(_orderData.sharesEscrowed == 0);
        uint256 _attosharesToCover = _orderData.amount;
        uint256 _numberOfOutcomes = _orderData.market.getNumberOfOutcomes();

        // Figure out how many almost-complete-sets (just missing `outcome` share) the creator has
        uint256 _attosharesHeld = 2**254;
        for (uint256 _i = 0; _i < _numberOfOutcomes; _i++) {
            if (_i != _orderData.outcome) {
                uint256 _creatorShareTokenBalance = _orderData.market.getShareToken(_i).balanceOf(_orderData.creator);
                _attosharesHeld = SafeMathUint256.min(_creatorShareTokenBalance, _attosharesHeld);
            }
        }

        // Take shares into escrow if they have any almost-complete-sets
        if (_attosharesHeld > 0) {
            _orderData.sharesEscrowed = SafeMathUint256.min(_attosharesHeld, _attosharesToCover);
            _attosharesToCover -= _orderData.sharesEscrowed;
            for (_i = 0; _i < _numberOfOutcomes; _i++) {
                if (_i != _orderData.outcome) {
                    _orderData.market.getShareToken(_i).trustedOrderTransfer(_orderData.creator, _orderData.market, _orderData.sharesEscrowed);
                }
            }
        }
        // If not able to cover entire order with shares alone, then cover remaining with tokens
        if (_attosharesToCover > 0) {
            _orderData.moneyEscrowed = _attosharesToCover.mul(_orderData.price);
            require(_orderData.augur.trustedTransfer(_orderData.market.getDenominationToken(), _orderData.creator, _orderData.market, _orderData.moneyEscrowed));
        }

        return true;
    }

    function escrowFundsForAsk(Order.Data _orderData) private returns (bool) {
        require(_orderData.moneyEscrowed == 0);
        require(_orderData.sharesEscrowed == 0);
        IShareToken _shareToken = _orderData.market.getShareToken(_orderData.outcome);
        uint256 _attosharesToCover = _orderData.amount;

        // Figure out how many shares of the outcome the creator has
        uint256 _attosharesHeld = _shareToken.balanceOf(_orderData.creator);

        // Take shares in escrow if user has shares
        if (_attosharesHeld > 0) {
            _orderData.sharesEscrowed = SafeMathUint256.min(_attosharesHeld, _attosharesToCover);
            _attosharesToCover -= _orderData.sharesEscrowed;
            _shareToken.trustedOrderTransfer(_orderData.creator, _orderData.market, _orderData.sharesEscrowed);
        }

        // If not able to cover entire order with shares alone, then cover remaining with tokens
        if (_attosharesToCover > 0) {
            _orderData.moneyEscrowed = _orderData.market.getNumTicks().sub(_orderData.price).mul(_attosharesToCover);
            require(_orderData.augur.trustedTransfer(_orderData.market.getDenominationToken(), _orderData.creator, _orderData.market, _orderData.moneyEscrowed));
        }

        return true;
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_market","type":"address"},{"name":"_amount","type":"uint256"}],"name":"publicBuyCompleteSetsWithCash","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_market","type":"address"},{"name":"_amount","type":"uint256"}],"name":"sellCompleteSets","outputs":[{"name":"_creatorFee","type":"uint256"},{"name":"_reportingFee","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getController","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_market","type":"address"},{"name":"_amount","type":"uint256"}],"name":"publicSellCompleteSetsWithCash","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_controller","type":"address"}],"name":"setController","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_market","type":"address"},{"name":"_amount","type":"uint256"}],"name":"buyCompleteSets","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_market","type":"address"},{"name":"_amount","type":"uint256"}],"name":"publicBuyCompleteSets","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_market","type":"address"},{"name":"_amount","type":"uint256"}],"name":"publicSellCompleteSets","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]

606060405260008054600160a060020a033316600160a860020a031990911617905561247f806100306000396000f3006060604052600436106100745763ffffffff60e060020a6000350416632054279e81146100795780632bb66c48146100af5780633018205f146100ef5780637d8ec2cf1461011e57806392eefe9b14610140578063aa48db201461015f578063abb60c8014610187578063ad16158e1461019e575b600080fd5b341561008457600080fd5b61009b600160a060020a03600435166024356101c0565b604051901515815260200160405180910390f35b34156100ba57600080fd5b6100d7600160a060020a0360043581169060243516604435610636565b60405191825260208201526040908101905180910390f35b34156100fa57600080fd5b610102610f06565b604051600160a060020a03909116815260200160405180910390f35b341561012957600080fd5b61009b600160a060020a0360043516602435610f15565b341561014b57600080fd5b61009b600160a060020a036004351661128e565b341561016a57600080fd5b61009b600160a060020a03600435811690602435166044356112dc565b61009b600160a060020a0360043516602435611861565b34156101a957600080fd5b61009b600160a060020a0360043516602435611cea565b600082600081600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b505050604051805160008054919350600160a060020a039091169150634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561027357600080fd5b6102c65a03f1151561028457600080fd5b50505060405180519050600160a060020a0316638cfb8f218260006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156102e457600080fd5b6102c65a03f115156102f557600080fd5b50505060405180519050151561030a57600080fd5b80600160a060020a0316639f7e1bf68360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561036157600080fd5b6102c65a03f1151561037257600080fd5b50505060405180519050151561038757600080fd5b60008054600160a060020a0316906322763ae190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156103d057600080fd5b6102c65a03f115156103e157600080fd5b5050506040518051905015156103f657600080fd5b30600160a060020a031663aa48db2033878760006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561046057600080fd5b6102c65a03f1151561047157600080fd5b5050506040518051505060008054600160a060020a031690634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156104c457600080fd5b6102c65a03f115156104d557600080fd5b50505060405180519050600160a060020a031663c509d0b286600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561053357600080fd5b6102c65a03f1151561054457600080fd5b5050506040518051905087338860006040516020015260405160e060020a63ffffffff8716028152600160a060020a0394851660048201529284166024840152921660448201526064810191909152608401602060405180830381600087803b15156105af57600080fd5b6102c65a03f115156105c057600080fd5b50505060405180515050600160a060020a03851663a0695f246000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561061057600080fd5b6102c65a03f1151561062157600080fd5b50505060405180515060019695505050505050565b600080548190819081908190819081908190600160a060020a0316633f08882f33836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561069d57600080fd5b6102c65a03f115156106ae57600080fd5b5050506040518051905015156106c357600080fd5b60005474010000000000000000000000000000000000000000900460ff16156106eb57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055600160a060020a038b16151561073557600080fd5b89600160a060020a03166327ce5b8c6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561077b57600080fd5b6102c65a03f1151561078c57600080fd5b5050506040518051965050600160a060020a038a1663df2a29da6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156107dd57600080fd5b6102c65a03f115156107ee57600080fd5b50505060405180519050945061086a8a600160a060020a031663bad84c9e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561084357600080fd5b6102c65a03f1151561085457600080fd5b50505060405180518b915063ffffffff61206c16565b935089600160a060020a0316638d4e40836000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156108b257600080fd5b6102c65a03f115156108c357600080fd5b50505060405180519050151561099e5789600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561091957600080fd5b6102c65a03f1151561092a57600080fd5b50505060405180519050600160a060020a031663b62418a18560006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561098257600080fd5b6102c65a03f1151561099357600080fd5b505050604051805150505b89600160a060020a031663f8c521258560006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156109ed57600080fd5b6102c65a03f115156109fe57600080fd5b5050506040518051985050600160a060020a038a1663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a4f57600080fd5b6102c65a03f11515610a6057600080fd5b50505060405180519050600160a060020a0316638f93bffe6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610aaf57600080fd5b6102c65a03f11515610ac057600080fd5b50505060405180519350610adc9050848463ffffffff61209a16565b9650610afe87610af2868b63ffffffff6120b116565b9063ffffffff6120b116565b9350600091505b85821015610bf95789600160a060020a03166365957bf58360006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610b5c57600080fd5b6102c65a03f11515610b6d57600080fd5b50505060405180519050600160a060020a031663d333d7cf8c8b60006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610bd357600080fd5b6102c65a03f11515610be457600080fd5b50505060405180515050600190910190610b05565b8715610cef5784600160a060020a03166323b872dd8b8c600160a060020a031663ed23378b6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c5557600080fd5b6102c65a03f11515610c6657600080fd5b505050604051805190508b60006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610cc957600080fd5b6102c65a03f11515610cda57600080fd5b505050604051805190501515610cef57600080fd5b8615610e475789600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610d3b57600080fd5b6102c65a03f11515610d4c57600080fd5b50505060405180519050600160a060020a0316630cc8c9af6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610d9b57600080fd5b6102c65a03f11515610dac57600080fd5b5050506040518051915050600160a060020a0385166323b872dd8b838a60006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610e2157600080fd5b6102c65a03f11515610e3257600080fd5b505050604051805190501515610e4757600080fd5b84600160a060020a03166323b872dd8b8d8760006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610eb157600080fd5b6102c65a03f11515610ec257600080fd5b505050604051805190501515610ed757600080fd5b50506000805474ff00000000000000000000000000000000000000001916905550939792965091945050505050565b600054600160a060020a031690565b600082600081600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610f6057600080fd5b6102c65a03f11515610f7157600080fd5b505050604051805160008054919350600160a060020a039091169150634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610fc857600080fd5b6102c65a03f11515610fd957600080fd5b50505060405180519050600160a060020a0316638cfb8f218260006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561103957600080fd5b6102c65a03f1151561104a57600080fd5b50505060405180519050151561105f57600080fd5b80600160a060020a0316639f7e1bf68360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156110b657600080fd5b6102c65a03f115156110c757600080fd5b5050506040518051905015156110dc57600080fd5b60008054600160a060020a0316906322763ae190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561112557600080fd5b6102c65a03f1151561113657600080fd5b50505060405180519050151561114b57600080fd5b30600160a060020a0316632bb66c4833878760006040516040015260405160e060020a63ffffffff8616028152600160a060020a03938416600482015291909216602482015260448101919091526064016040805180830381600087803b15156111b457600080fd5b6102c65a03f115156111c557600080fd5b5050506040518051906020018051505060008054600160a060020a03169150634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561121f57600080fd5b6102c65a03f1151561123057600080fd5b50505060405180519050600160a060020a031663ed654fd786600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561053357600080fd5b6000805433600160a060020a039081169116146112aa57600080fd5b5060008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000805481908190819081908190600160a060020a0316633f08882f33836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561133f57600080fd5b6102c65a03f1151561135057600080fd5b50505060405180519050151561136557600080fd5b60005474010000000000000000000000000000000000000000900460ff161561138d57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055600160a060020a03891615156113d757600080fd5b87600160a060020a03166327ce5b8c6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561141d57600080fd5b6102c65a03f1151561142e57600080fd5b5050506040518051955050600160a060020a03881663df2a29da6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561147f57600080fd5b6102c65a03f1151561149057600080fd5b505050604051805160008054919650600160a060020a039091169150634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156114e757600080fd5b6102c65a03f115156114f857600080fd5b50505060405180519050925061157488600160a060020a031663bad84c9e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561154d57600080fd5b6102c65a03f1151561155e57600080fd5b505050604051805189915063ffffffff61206c16565b915082600160a060020a031663ec238994858b8b8660006040516020015260405160e060020a63ffffffff8716028152600160a060020a0394851660048201529284166024840152921660448201526064810191909152608401602060405180830381600087803b15156115e757600080fd5b6102c65a03f115156115f857600080fd5b50505060405180519050151561160d57600080fd5b5060005b848110156117025787600160a060020a03166365957bf58260006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561166857600080fd5b6102c65a03f1151561167957600080fd5b50505060405180519050600160a060020a0316630f9e5bbd8a8960006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156116df57600080fd5b6102c65a03f115156116f057600080fd5b50505060405180515050600101611611565b87600160a060020a0316638d4e40836000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561174857600080fd5b6102c65a03f1151561175957600080fd5b5050506040518051905015156118345787600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156117af57600080fd5b6102c65a03f115156117c057600080fd5b50505060405180519050600160a060020a031663ce483e888360006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561181857600080fd5b6102c65a03f1151561182957600080fd5b505050604051805150505b50506000805474ff0000000000000000000000000000000000000000191690555060019695505050505050565b600082600081600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156118ac57600080fd5b6102c65a03f115156118bd57600080fd5b505050604051805160008054919350600160a060020a039091169150634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561191457600080fd5b6102c65a03f1151561192557600080fd5b50505060405180519050600160a060020a0316638cfb8f218260006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561198557600080fd5b6102c65a03f1151561199657600080fd5b5050506040518051905015156119ab57600080fd5b80600160a060020a0316639f7e1bf68360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611a0257600080fd5b6102c65a03f11515611a1357600080fd5b505050604051805190501515611a2857600080fd5b611a306120c6565b5060008054600160a060020a0316906322763ae190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611a7a57600080fd5b6102c65a03f11515611a8b57600080fd5b505050604051805190501515611aa057600080fd5b30600160a060020a031663aa48db2033878760006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515611b0a57600080fd5b6102c65a03f11515611b1b57600080fd5b5050506040518051505060008054600160a060020a031690634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611b6e57600080fd5b6102c65a03f11515611b7f57600080fd5b50505060405180519050600160a060020a031663c509d0b286600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611bdd57600080fd5b6102c65a03f11515611bee57600080fd5b5050506040518051905087338860006040516020015260405160e060020a63ffffffff8716028152600160a060020a0394851660048201529284166024840152921660448201526064810191909152608401602060405180830381600087803b1515611c5957600080fd5b6102c65a03f11515611c6a57600080fd5b50505060405180515050600160a060020a03851663a0695f246000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611cba57600080fd5b6102c65a03f11515611ccb57600080fd5b5050506040518051506001935050611ce16121d3565b50505092915050565b600082600081600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611d3557600080fd5b6102c65a03f11515611d4657600080fd5b505050604051805160008054919350600160a060020a039091169150634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611d9d57600080fd5b6102c65a03f11515611dae57600080fd5b50505060405180519050600160a060020a0316638cfb8f218260006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611e0e57600080fd5b6102c65a03f11515611e1f57600080fd5b505050604051805190501515611e3457600080fd5b80600160a060020a0316639f7e1bf68360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611e8b57600080fd5b6102c65a03f11515611e9c57600080fd5b505050604051805190501515611eb157600080fd5b611eb96120c6565b5060008054600160a060020a0316906322763ae190604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611f0357600080fd5b6102c65a03f11515611f1457600080fd5b505050604051805190501515611f2957600080fd5b30600160a060020a0316632bb66c4833878760006040516040015260405160e060020a63ffffffff8616028152600160a060020a03938416600482015291909216602482015260448101919091526064016040805180830381600087803b1515611f9257600080fd5b6102c65a03f11515611fa357600080fd5b5050506040518051906020018051505060008054600160a060020a03169150634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611ffd57600080fd5b6102c65a03f1151561200e57600080fd5b50505060405180519050600160a060020a031663ed654fd786600160a060020a031663870c426d6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611bdd57600080fd5b6000828202831580612088575082848281151561208557fe5b04145b151561209357600080fd5b9392505050565b60008082848115156120a857fe5b04949350505050565b6000828211156120c057600080fd5b50900390565b6000803411156121cd5760008054600160a060020a03169063f39ec1f7906040516020015260405160e060020a63ffffffff83160281527f43617368000000000000000000000000000000000000000000000000000000006004820152602401602060405180830381600087803b151561213f57600080fd5b6102c65a03f1151561215057600080fd5b50505060405180519050600160a060020a0316634faa8a26343360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390911660048201526024016020604051808303818588803b15156121b057600080fd5b6125ee5a03f115156121c157600080fd5b50505050604051805150505b50600190565b60008054819081908190600160a060020a031663f39ec1f7826040516020015260405160e060020a63ffffffff83160281527f43617368000000000000000000000000000000000000000000000000000000006004820152602401602060405180830381600087803b151561224757600080fd5b6102c65a03f1151561225857600080fd5b5050506040518051935050600160a060020a0383166370a082313360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156122ba57600080fd5b6102c65a03f115156122cb57600080fd5b505050604051805192505060008211156124495760008054600160a060020a031690634e94c82990604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561232857600080fd5b6102c65a03f1151561233957600080fd5b5050506040518051915050600160a060020a03811663ec2389948433308660006040516020015260405160e060020a63ffffffff8716028152600160a060020a0394851660048201529284166024840152921660448201526064810191909152608401602060405180830381600087803b15156123b557600080fd5b6102c65a03f115156123c657600080fd5b50505060405180515050600160a060020a038316631baffe38338460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561242d57600080fd5b6102c65a03f1151561243e57600080fd5b505050604051805150505b60019350505050905600a165627a7a72305820886fb80446e49a97f5d30bbed018b7373dfff7f6f785292c564d04c7640c95f10029

Swarm Source

bzzr://886fb80446e49a97f5d30bbed018b7373dfff7f6f785292c564d04c7640c95f1
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.