Sponsored:   Ubex.com: Top ratings from all agencies. Big partnerships. 70% hard cap reached. Join us!
Contract Overview
Balance: 3,984.947662661819662814 Ether
Ether Value: $1,835,466.89 (@ $460.60/ETH)
Transactions: 1342 txns
Token Contract: Cash (CASH)
Misc
Address Watch: Add To Watch List
Contract Creator: 0xd82369aaec27c7a749afdb4eb71add9e64154cd6at txn 0xa0e19800907a0208af485f0ae566a0cde56f6534c026446feba2c05319f6d2b9
Token Balances:
 Latest 25 txns from a total Of 1342 transactions
(+20 PendingTxns)

TxHash Age From To Value [TxFee]
0xf2bda6178857eb88498dafb25ac4150e2469e4dfa308ce6f6d70d796443d937b(pending)0x8c925a07b3c59f20307251f36562040571c605ed  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x07621a543601ef29c1d2ecee4b39c6f1d7a8d09e6903147425e1dae4b1e2b1e8(pending)0x8c925a07b3c59f20307251f36562040571c605ed  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0xa3f13fefe50380bef80081fa9ea27f300b2d55d9c6be2b2c22bd0afaaa4a477c(pending)0x5d2498a8a80f4b6ec2e3cc3411b6896db116f08a  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x8fa2842ddd5719e76a93fc238d3a69b6f75ca9a764746c4278e1d31edf43fca0(pending)0x7e80f2826b6c99810786cec0c19e48bb893d3635  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x48ef8953d1d5b472f1e886cd7ea619f1298cf1cac3ae8558e033f3de9ac6b40a(pending)0x1ef2a5e67e16ff35d32102730b478cda4503a6cb  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x3e8f9b3cad9d382eee32c4326f72413c15e294a20901243b422e5a195a3a83ac(pending)0x1e17a75616cd74f5846b1b71622aa8e10ea26cc0  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x3727b6e1c1536730e92a5bd920fe68b5139ec6b5537301046cf41864d238e6ca(pending)0x1e17a75616cd74f5846b1b71622aa8e10ea26cc0  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x4050f367e849d45634fa2714030db940f30319765d37dc802fafd5412c9f7b09(pending)0x1e17a75616cd74f5846b1b71622aa8e10ea26cc0  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x66dfc23d1246d24825c55f7f5a0af682bb4f8befe7757405d208e750cc427052(pending)0x1e17a75616cd74f5846b1b71622aa8e10ea26cc0  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x244b4ada9fd9f479a3dab3d986fbb76b8ed64696483580f7cc91546499bfd699(pending)0x58068f118c90723da45388b43b5cd0503a001be8  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x7574305c32d0fd7d69e7792a9ff722b35061e2061b371ea2f50baaf292377648(pending)0x14ea212c473855bb235bc04225a9e029c7669962  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0xd0574775d44f9063d8d8d341507b6da275059c7db35fff041ba29ddfe16e0d7d(pending)0x3c662420558b0b123d8528d13d7998c154938eed  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x555a2bc774a82335f532a4d8c7d55303826dde647861770a27271ed75be801cc(pending)0x7c7ba418de6d86d4860b7c0917c2335806044ab5  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x5ee5368f7192fe646fc3e13781ee6ccf1603135306c81691b28404a09fcdf9bd(pending)0x7c7ba418de6d86d4860b7c0917c2335806044ab5  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x2b95e6ee796fe575a7efbe6eba281665d485451427bc461cc158ffe176c5f74c(pending)0x7c7ba418de6d86d4860b7c0917c2335806044ab5  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x588b96a862fc7310b959f378893b4c68784386f123aa6f4d39dcac0c02e2a241(pending)0x3c662420558b0b123d8528d13d7998c154938eed  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x589031842efef78b222fe984b003ccd39bf43b8f7840c55b7156a348a1783a1e(pending)0xe836f5b999dcf3ed6a1fc9c9ad5fda616cccfd23  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x050777a4435e18de8abfcd52814794780d4cb994dba5406498587f69b18da822(pending)0x5f97da7f5a4da66c1f381258e6f7d5232263a480  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0xb019aadde697b49dbc848cf990d05b34654f3e054ce0530feb32e4d24d0ad551(pending)0x14ea212c473855bb235bc04225a9e029c7669962  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x0e60e728cd8cc6ec6aab7a48b696afcb7fb88672141826d1ca92e73a0f39976b(pending)0xaa122e7b920ceaa198de211a610b0e4a2fe8df05  IN  0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether(pending)
0x71a7874fbe6cfbbef6af0cea9b32e0aeca4a144232e732d0c49065c2859f3a3e39 mins ago0x0d166b97100f4de924726177271844046db35ff4  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000154236
0xe5d398cb0c1e26438bee5cbe45c7b6ce8d096f782974527c5f4d9bdb41cc3f7c1 hr ago0x8beed7287bb27b91d013b727b89cb9f576e5c2dc  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000102824
0x385f585b319b177cd2f7fba5d45b729c60eefff84d486ab3ec6954d90b2734c62 hrs 17 mins ago0x25593a0ce5082e3625a945bf92367b1bf8f7003a  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000077118
0xbb307ec9ac9329687abb907544cee8bde3fc6308e1689d51008ce1dba3bf07b45 hrs 57 mins ago0x1321899fdb787053189bb5876c71da96a170835e  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000102824
0xa46e6bc666800c8f422647e4d6b972323032aaf29811a008e428a21f3ac668de6 hrs 30 mins ago0xc05fbce22edd39455ba77816de9bf536aadbb944  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000102824
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0x1474e639810c2b0369575271b87d7afcbeb07ffb2ede6d0599bb6d90e28b1220600804718 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x8a591e12b71a8ca156f79529c7e4a3c4997af9820.004 Ether
0xb077eb3518044871d336f9a882d375ad7e7abb73f782a4b7f76f64cbf00f16c1600799729 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.05 Ether
0x5109978d063d4a6520df66a45904b520a56fb46658546f91592e03997456e12b600798531 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.1 Ether
0x92ff2730703ab91aacb37311f5603b2eb52f4a46c228dfba8300e5eb6b48ac2b600797035 mins ago0x7f27b0598949dbf9e539bbd217f15bf3f5e979990xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.01 Ether
0x45aa4cbca62c8cc03a245a75745ed2aae910e4160a9144460d60e8f5590cc403600796337 mins ago0x7f27b0598949dbf9e539bbd217f15bf3f5e979990xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.01 Ether
0x430b21f4bab13a26397a32edf6d8ee4e22e82e5435a7a7d6154249739d40d585600795040 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.15 Ether
0x07b7b5ca1f34140815c53fbc5bb34e2b243d84136c5b21573a4bbd92167f7d61600792248 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x3f43fb0e8760d8f8ca46e08920636af1b902cbeb0.19498 Ether
0x7fbd58bb6acc3b441825848c8f90c20b01d18dc8350d64fa602b970eda3af4b3600791850 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.01 Ether
0xf84bb122402f9e804869500fa2a8dc22593dae3837051c07f98cca83eec3e9d960078731 hr ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x3f43fb0e8760d8f8ca46e08920636af1b902cbeb0.2 Ether
0x8aa6acc4c95e289333233c7763023f2e2ab34edf8e4735315f03ae21b527933160078691 hr 1 min ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.085 Ether
0x0f5b32a85a0dc0d222c453b198803a1d9f329addcea56af98ba1b9425dd89b6b60078661 hr 1 min ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.134 Ether
0x58a2c68b31544e3599701676710689e3f6c9b0e2cb6c08757b1e2e2236ccb68b60078641 hr 1 min ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.0002 Ether
0x7e0638c24ef4943be01c4965b28dd29c10960922afdb13e0f139767d319d34ab60078541 hr 4 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xc64e96319366da7d00ef4bc14b42e8b1f3a31f520.011 Ether
0x7e0638c24ef4943be01c4965b28dd29c10960922afdb13e0f139767d319d34ab60078541 hr 4 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.0089 Ether
0xd77563fd9ea29463219f24a525da2f495594b7f0f5ced618b456a506eb14319b60078421 hr 7 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x3f43fb0e8760d8f8ca46e08920636af1b902cbeb0.2 Ether
0x87d3103692560d2d7bb1504d9659d1063a815939b01e96a1f5f4616db187eb0560078301 hr 10 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.0105 Ether
0xb289529abfbfc6b16a85a0ba4d55226db0ef2925eef3a2e9b5711e02acb7a82260078271 hr 11 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x3f43fb0e8760d8f8ca46e08920636af1b902cbeb0.2 Ether
0x6a827e4020616e05de67ec950c733c5a36bf0842725c6a22a326737f6a047afe60078241 hr 11 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.04 Ether
0xe07d4a5ab8248702e0654e1940fa135a7a0a57144d203a04567ee274c36c199e60078221 hr 11 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.05 Ether
0x502b5f0c67e0d65a748bf3d7b6d733e1bd2016b3fb3a6bb8ceaade3ec03196b860077041 hr 40 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xb1a587ba36c49e37f58c081b7071f4217db3f3ed0.082 Ether
0xba9ccfdac600c995f26530e5ffaf7d46f901913e716e67b50949062b1668eba460076471 hr 55 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.645 Ether
0xcf599d74decd348b4c4f2431dd8a2443cfc531f51d6f0be648767167382dfd9960075762 hrs 11 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.082 Ether
0x794aa270c23e1c70ad3bdb159851d7b3cf7178feb741989775eff02baff4122660073822 hrs 52 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xc64e96319366da7d00ef4bc14b42e8b1f3a31f520.272 Ether
0x9165eee0a382de472fe7822c876ab02d31683380bf960cb851beeee3fdbc24db60073493 hrs ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.035 Ether
0xe36352c1f5a19d07642e4c19baee6fc5fe6c14cb6373f4a19bc324941671e07c60073363 hrs 3 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xdcd0964cf350c4c59ca329c735069f564ab657f78.18916 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Similar match)
Note: Displaying similar matching verified source code at contract 0x10b5589fc6922f5c27061ac79ad9a4af35e15806(excluding Constructor Arguments if any)
Contract Name: Delegator
Compiler Version: v0.4.20+commit.3155dd80
Optimization Enabled: Yes
Runs (Optimiser):  500



  Contract Source Code   Find Similiar Contracts

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 DelegationTarget is Controlled {
    bytes32 public controllerLookupName;
}

contract Delegator is DelegationTarget {
    function Delegator(IController _controller, bytes32 _controllerLookupName) public {
        controller = _controller;
        controllerLookupName = _controllerLookupName;
    }

    function() external payable {
        // Do nothing if we haven't properly set up the delegator to delegate calls
        if (controllerLookupName == 0) {
            return;
        }

        // Get the delegation target contract
        address _target = controller.lookup(controllerLookupName);

        assembly {
            //0x40 is the address where the next free memory slot is stored in Solidity
            let _calldataMemoryOffset := mload(0x40)
            // new "memory end" including padding. The bitwise operations here ensure we get rounded up to the nearest 32 byte boundary
            let _size := and(add(calldatasize, 0x1f), not(0x1f))
            // Update the pointer at 0x40 to point at new free memory location so any theoretical allocation doesn't stomp our memory in this call
            mstore(0x40, add(_calldataMemoryOffset, _size))
            // Copy method signature and parameters of this call into memory
            calldatacopy(_calldataMemoryOffset, 0x0, calldatasize)
            // Call the actual method via delegation
            let _retval := delegatecall(gas, _target, _calldataMemoryOffset, calldatasize, 0, 0)
            switch _retval
            case 0 {
                // 0 == it threw, so we revert
                revert(0,0)
            } default {
                // If the call succeeded return the return data from the delegate call
                let _returndataMemoryOffset := mload(0x40)
                // Update the pointer at 0x40 again to point at new free memory location so any theoretical allocation doesn't stomp our memory in this call
                mstore(0x40, add(_returndataMemoryOffset, returndatasize))
                returndatacopy(_returndataMemoryOffset, 0x0, returndatasize)
                return(_returndataMemoryOffset, returndatasize)
            }
        }
    }
}

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;
    }
}

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 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 ABI  
[{"constant":true,"inputs":[],"name":"getController","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_controller","type":"address"}],"name":"setController","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"controllerLookupName","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_controller","type":"address"},{"name":"_controllerLookupName","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b6040516040806102fd833981016040528080519190602001805160008054600160a060020a039586163396909616600160a060020a03199182161716949094179093555050600155610297806100666000396000f3006060604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633018205f811461014057806392eefe9b1461017c578063bef72fa2146101bc575b60015460009015156100675761013d565b6000805460015473ffffffffffffffffffffffffffffffffffffffff9091169163f39ec1f79190604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281526004810191909152602401602060405180830381600087803b15156100e457600080fd5b6102c65a03f115156100f557600080fd5b505050604051805190509050604051601f19601f36011680820160405236600083376000803684865af4808015610138576040513d81016040523d6000823e3d81f35b600080fd5b50005b341561014b57600080fd5b6101536101e1565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b341561018757600080fd5b6101a873ffffffffffffffffffffffffffffffffffffffff600435166101fd565b604051901515815260200160405180910390f35b34156101c757600080fd5b6101cf610265565b60405190815260200160405180910390f35b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600080543373ffffffffffffffffffffffffffffffffffffffff90811691161461022657600080fd5b506000805473ffffffffffffffffffffffffffffffffffffffff831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600154815600a165627a7a7230582084796531768a1d75b70a76b8cd7c7db53c078e5abbed437bd74b1419316ec5990029000000000000000000000000b3337164e91b9f05c87c7662c7ac684e8e0ff3e754726164696e6745736361706548617463685461726765740000000000000000

   Swarm Source:
bzzr://84796531768a1d75b70a76b8cd7c7db53c078e5abbed437bd74b1419316ec599

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.