Latest 25 transactions from a total of 3037 transactions

TxHash Age From To Value [TxFee]
0xd86921624b04c88b465a90431068b5b014eee621c572ae367cd657d8faa3f75f8 hrs 45 mins ago0xe47a48dbdb6b225539ff05f2b8a50849584b4f2f  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.00025706
0xe42aee79211aa6d0c8c835d8b4230a08719a5f35f2225ce02f688278a3c12ff814 hrs 41 mins ago0x362b6cb6454448c91f6d5607d8cdc63d401ce3dd  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.0000691828
0x66ee01b96ee58d80456cc4304d5c97e7e9e26a604bf9f4b5d6bd739656d6bab414 hrs 52 mins ago0x362b6cb6454448c91f6d5607d8cdc63d401ce3dd  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.0000976828
0x15c4d0ad52d9788319d4d64f73133662fc949e68cca81792bd30e5b925268b0415 hrs 19 mins ago0x71ae30f50f532c51cbcd4b6b8cf8477a24d39cfa  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.00025706
0xe81930a76d35706a1576a470b873a3d330eecd31ff62d2a474279fb70ee9884f15 hrs 22 mins ago0xeffa07c9f1109e6973dc5fc3aa7ab54e8f9bd900  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000308472
0xbe06e0cc51ade4053e10bb3e2eee5aeb4be4adc8fbbf738b8d935275181ea31321 hrs 1 min ago0xfd127b082d2702d570efb29c308698a77b013bc9  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000109236
0x99dc2667a35bc0053a5dac0d6b985c0595e823aba6364ba3729564d16e3700c121 hrs 3 mins ago0xfd127b082d2702d570efb29c308698a77b013bc9  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000154236
0xcaf036e03403df04e670438184c61d90eb7190142e64428c8fc206b317dc833d21 hrs 47 mins ago0xdda1839117919bb842f5f35ed026dc8613f1a223  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000102824
0x41e08556fa34458de3f2edcd37ac7197d1879acacd4e8f20dfb00a92a159d2ac21 hrs 50 mins ago0x363e86370fd257e9839de7273f19c108e3e3510e  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.00051412
0xa070c6c312a5adb00cd032478e39c89339089abebe47146480819d21b93ca1ef23 hrs 53 mins ago0xc4510660bad680db1a1c1ba66689be5af67d8c73  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.00025706
0x520ee7e66543fe78becbeb10782d43d13fc116b79dc941f0cdfb75f194ca23821 day 28 mins ago0x2702c4ba43243074e06d8abd7ea9535e0c66ac9d  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.0001131064
0xf662ec2e02658ec5822b6508ca308e6716ea376881dcdd738f570e7a46a676721 day 3 hrs ago0x997889b20ae2482377ce58e188a4430371fb75a4  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000411296
0x1a06fe6c57a346b37e9024dda2e35b78b88c1012a35b0ab7eb2f4c61cecba8671 day 14 hrs ago0x36e914f40228160c939ae5253625d86612e8a63b  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000359884
0xaaf998c8f1ff4143f7e88ba9e9388d84c9987b9ff60623e14d61ea4a39ceb8e61 day 16 hrs ago0x47f7a04e251f8e2d4ea41d451aa29bb71e446098  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000154236
0xfd5ca01c44925ca0425dc649c80c98d10222fd25a20063f4417328bcd70a176f1 day 20 hrs ago0x9de91512807a33d1df1d7ad07a99b220ed719269  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000154236
0x7b1191a57866a489f5b383401942d014ce59dfe8103cd7c2be72078cbd7c77fa1 day 23 hrs ago0xe96a1b303a1eb8d04fb973eb2b291b8d591c8f72  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.00051412
0x0f63374477be79f7b76fdab2d47322f9401a9c6f3d3fa35552ace96a0ce9f10c2 days 1 hr ago0x77bd77bb70d75703fcb2fc6ca731453e21e62926  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000072824
0x6b2827a047100d47f6814f72e8790a73e9b0d3e48b3363256d3cf612394851b42 days 1 hr ago0x77bd77bb70d75703fcb2fc6ca731453e21e62926  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000102824
0x12350422e72474ee95bbcd797a78e61e9f2c8559ecc2a321d65db295a781a1de2 days 6 hrs ago0x6588608d24189c6e088a6972b523dec47a8f077a  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.00025706
0xbbbab95f4c1b918643bdf2d447c9de623f4971c3a0628d5a9c54a3220e6bb0f22 days 14 hrs ago0xe8271db1f10cb069a1a3bd28121aeb9219547443  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000154236
0x5619c5cf839a6df555e36c948af4bc3c605d610d0d162da14d21d6b478ef40ff2 days 17 hrs ago0x09ee10f6a3e9d3d5ba1130e7864a63ffa1af1747  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.0000822592
0xeb172272a7439f8a02cb7ba31a93b765be6f8c4a40ebbb6eed009223ac1cc1ab2 days 22 hrs ago0xd471cc6a0df5ff4600ea22c5e811b77dcacbcd46  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000154236
0xe35a4524af01541d49612bd54105b766b60ec6a5d3e2a3ab6de849f36c205adf3 days 21 hrs ago0xef68d7aca7ac0791f601cda7bce80d4f3d5916cf  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000154236
0xfaa755ec29478c61e5ff0f23ae7def5ee7460c42d3aaf5d8a8a4494936df10ae4 days 4 hrs ago0xacc606131a1aca21b52c57aaaa82bf6d95a9420e  IN   0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0 Ether0.000102824
0xee11fbafe07ea8fda0fe53504a6ed8ab8ad105c3a36513a3509c94babb4962b04 days 15 hrs ago0xcdf285269996b12012c25a0b3071f1e1b2b5385b  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
0x30159e8a0ab0f99a361b69c944b5147bc846951423b2b70771fdea33ccfc092e708306513 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.05 Ether
0xda1a3b42dda4cb83eca868f44291e132c20e4b1c7bf4e3c1f96ac91e77694874708300628 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x0ff2af96e2a9fe9b4368a17e5c49ba589233017f0.00000151115260202 Ether
0x97d2f48800c5c8d26382bf0d56bf557c1624bc11e5b434c7470c25888bd8285a708297935 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xd1ce6dca191446f3f99b951ad24853074923b1010.085 Ether
0x97d2f48800c5c8d26382bf0d56bf557c1624bc11e5b434c7470c25888bd8285a708297935 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.085 Ether
0x68b1b386871372464b0125e3bd2ec2790fb99cba59a1c5fe45feb4e2487112b770827371 hr 33 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x395e5bdea62f312c018d64f0e14b71718ad12a400.00000151115260202 Ether
0x86bc6f614827b1b46ca11db09df1233a755bf62a736c6fa849f8f642c2a670f370827141 hr 37 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b2.4 Ether
0xf4927e90a33c4c2e18265e504553cd9252b1c531d1bf4c6d464909664329e10470827111 hr 38 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b2.2 Ether
0x97e5b75d3ea421cf83ed9e126426372e3be9e81ff987133d9228d459a55734f370827021 hr 41 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b2.855 Ether
0x6871f2647bf7aba591146c00b0d3ade5f3426a4e816e5b4155ba182a1b52f64570826891 hr 46 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b1.74 Ether
0x4735731221173387e099d71ee915aef5588461ae717b22c77a2944a07e1a57eb70826861 hr 46 mins ago0x24e2b1d415e6e0d04042eaa45dc2a08fc33ca6cd0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b1.75 Ether
0xd6989b9e503583727eb1ebb27a3bfa7452ed48bd05628c5d93b6afaa2d1ca0ff70826831 hr 47 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x2a544ee7dca6663841ac2956530bbd1bd482e6573 Ether
0xc2d1c91ffdcef1f68ec477013e9128f07b0953269060e9064488114b11653dae70825452 hrs 22 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.00000151115260202 Ether
0xeaf73c31a44e1094e656bd0d874d056fae5c992e0065316b1ff39cd2ed84c51e70825452 hrs 22 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.00000151115260202 Ether
0xeaf73c31a44e1094e656bd0d874d056fae5c992e0065316b1ff39cd2ed84c51e70825452 hrs 22 mins ago0x566fa257b3f886d5ada7bc7d58e0f839d9a274cf0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0.01 Ether
0x84460b5f6b148685056dabf59b64af3f4ee9bbdc8a680cb2dd18970b0559353970825432 hrs 23 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.00000151115260202 Ether
0x0e8b63252fa79777f7e201781d8226331dffa36ef10d47a6de265970fd4dd11470825102 hrs 30 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xceb7cd1c0d9c0a0a8c0bf17a2a60605a9ad856cb0.000129645683248622 Ether
0xbba1f16d0a736d5c8f569d2208d182ef43a9c49c1402b6f0741e1c6eb6483a8c70824822 hrs 40 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.00000151115260202 Ether
0x4f0272b95bfd8acd086657db0136ffe2573b7bfbd72a0a2d4e36e37826d5f9d770824812 hrs 40 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x713558113b03e1a110e45270af50e7b024b65d2e0.00000151115260202 Ether
0x8e06ad9709f636dd731cf5cab47609259cf735ad4278e1aa0dbb83dc73a37c2670824812 hrs 40 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xc6f776a903cfa54f702ea7daf15cdca45d64f17e0.00000151115260202 Ether
0x44fc628fcd325235e3ceaf1463d4c22c4edf4ea7fee73956caa34c6ff85d5d0d70824652 hrs 45 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xda46d200053ca2402b4b447cc975da61c744c23a0.001138989345036029 Ether
0x2d8a1795e9a5f728d2852eb060e4b39c961194858e67087fcf2529aa4b33fd7d70824342 hrs 54 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.000002561347897388 Ether
0x66cb02c41477323b1db80db27fcc00fd02d65a54897e2aaea515a94bcc8af9a170824332 hrs 54 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.00000151115260202 Ether
0x656e82b30ffbe2af4ce967de982d279534ca8b96b74e7279bebaf10aef4357fd70823373 hrs 16 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.00000151115260202 Ether
0x4f83aba12eb24a0df9c4b348b47d0c924b2e0221007ce2a2b0ac672873fdb5d070823343 hrs 17 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0x408bcc8c6d3e929f707b45fd2a3e4afe8c5c3bbf0.000003296422784161 Ether
0x576907e738db4c3928410118bb00c68925349f2d285626579f32b413158f2f4170823343 hrs 17 mins ago0xd5524179cb7ae012f5b642c1d6d700bbaa76b96b0xc6f776a903cfa54f702ea7daf15cdca45d64f17e0.00000151115260202 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Similar Match)
Note: Displaying Similar Match Verified Source Code At Contract 0x10b5589fc6922f5c27061ac79ad9a4af35e15806(Excluding Constructor Arguments if any)
Contract Name: Delegator
Compiler Text: 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 transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.