Contract Overview |  LocalEthereum_1
Balance: 59.795473259218144 Ether
Ether Value: $5,418.07 (@ $90.61/ETH)
Transactions: 85205 txns
 Latest 25 transactions from a total of 85205 transactions

TxHash Age From To Value [TxFee]
0x244a40aee7e27fe4350b5a71b36814bcd51e380c3fde45cde76e5018be3aa1fe54 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.000440888616
0x77ec0e81d082750d59f910011c812a049b5318f9d897b0891f793c258c8950d71 hr ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00034806996
0x5ec87c55a69917804cff9654b667a379c495ed658034ba3c69572ccbcce7004a1 hr 5 mins ago0x1c16338cb22fe8b0bc23e9ac0af8133a9c0d8dca  IN   LocalEthereum_10.85196 Ether0.00030587256
0x105b182dcdb5c43dc64aff10ec9d2ac8d0e30df0c6a130ed9a691785b9ac66261 hr 5 mins ago0xc9132ed5c3b2c52262c8f56fc5af9d85669a1925  IN   LocalEthereum_12.84698 Ether0.00030555
0xd7fee578a5dc3110dc24f986a6d8208389964184a7cf89c0a07fee3d5819fe881 hr 40 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.000290304
0xefb19c9f321cb8725f8af73880b1fef4fa1e46dd96848c71f89c3325d375f98e1 hr 46 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00033840135
0xdcce9284c65fa27840f5298d41210c1875379de08a9cdd525aba8389c7d8c3121 hr 49 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00043472457
0xb5e46c34cc5c513bfe56445737a93eb0e69ba076cf064b59918dfb14412ed73c1 hr 49 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00043436169
0x86a051bff4e096267fd43d1517b601706563baf5f3f823af42f7b4f231270c3a1 hr 51 mins ago0x144bd18ca93c1265939ad924c803d4af9be67e88  IN   LocalEthereum_10.59876 Ether0.0002548938
0xbea951b6e5c0170a746572d99b6d3c534d2d2bcf0b6136f589df95402a8076ca1 hr 57 mins ago0xbc36b0bd0d0fdfae09ed2e69ed908f9db0d84abc  IN   LocalEthereum_10.05505 Ether0.0003479875
0x12de8e8f50614fb3c9a0f9c5ad322cb46b5b131bdbbcb3884245f628b9cc335f1 hr 57 mins ago0x1974ab884c79f08127aff83945c5cf91de75e122  IN   LocalEthereum_18.9 Ether0.0004328625
0x315d3039612e8282b4a5e4dcc78c9111713efcbe1e14d8d35f6f04f10fe7df923 hrs 20 mins ago0xe4a343fc24e13dd1985f9e6c574c4f48dbdbc0d5  IN   LocalEthereum_11.90478 Ether0.00033136194
0x974184e39b1e89a2c7b955098540b3622ee345e0d5ad7364551e341782620ccb3 hrs 28 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.000175784742
0xfcd8a3fa83f389ecf62c3b71b7425cc83e59891d9c238dffda3f315508afd1073 hrs 33 mins ago0x55fe32e3a03285743162ef6ce08ca3b7c965a8be  IN   LocalEthereum_11.5 Ether0.000424375
0x9b1ce4b17a577eaff92ccd5bbcad0290bdbaffdef3ab080df49bba631be5c4273 hrs 37 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.000251174196
0x2b900263db9c3c54e2093bd6dedbab6c54cc06ca2f8677831bfd93bcb94ba4ff3 hrs 47 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00016296525
0xd47f17a7f07500f9144e340b083e7e35ab15c61a05ace42d978c197ae0c7e2723 hrs 52 mins ago0xf1bee35c07d9fb47972571e65d1a2977184f7211  IN   LocalEthereum_10.24502 Ether0.0002124115
0x7011fd1292cbbb720704beb638488b9179e3beb4c437eff71e3f85e31a4f4dbe3 hrs 58 mins ago0xce9c5f010df641199302c3fbd52bb6bdc928dc47  IN   LocalEthereum_11.70868 Ether0.0002800875
0x02a9cb5fcb172de71e13f88a328136db4f2a9da90c4bdbf791d2d835d058d1204 hrs 15 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00024131205
0x53534649c4272eb7e9bed3a5ae21810cfd59c873334c4a8c2e0a65403732671e4 hrs 24 mins ago0x5d6614d2441d76b87997f31d54d3641bb1802c74  IN   LocalEthereum_11.55832 Ether0.00027584375
0x1d5a5625219cb99a72a5d64a46fcada0445f3034b4ef11b199f067a344c0dc245 hrs 1 min ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00030939552
0xc86a0260617de4b93ff33e2e92a7a010bb42ecd441cc2a31d4c94b542caeff525 hrs 5 mins ago0x4ca3cd774a18fa88c61eb9eb3429bc58d44cc4cf  IN   LocalEthereum_10.427 Ether0.000329237825
0x3f2744b578f53817c381d23674710fbbb32885281176dd351041ce1018a543f85 hrs 11 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.000299476926
0x43fe898d426bfd948cc37c1c03922601e2af9d7db96e2247179099e58cc79b375 hrs 16 mins ago0xf008e2c7a7f16ac706c2e0ebd3f015d442016420  IN   LocalEthereum_10 Ether0.00028957446
0xa0301d4e17317b9aa93847cb6eb77bf7119fa6bd80666e15c3c203b85d7431a95 hrs 18 mins ago0x8e5974948cf3282b27e91b59c676e120bd59dbf9  IN   LocalEthereum_14.62854 Ether0.00027979182
[ 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
0x244a40aee7e27fe4350b5a71b36814bcd51e380c3fde45cde76e5018be3aa1fe686538454 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x0b8303304c5490b29d370b99e19fd5c399a622620.8430089743872 Ether
0x77ec0e81d082750d59f910011c812a049b5318f9d897b0891f793c258c8950d768653681 hr ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x890a076a4c345bf6eeadf49f9b3a8ee238a818202.818169600832 Ether
0xd7fee578a5dc3110dc24f986a6d8208389964184a7cf89c0a07fee3d5819fe8868651921 hr 40 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x04d71bdc4aa5df6d9e567aef646e947f36bd15230.0684053093 Ether
0xefb19c9f321cb8725f8af73880b1fef4fa1e46dd96848c71f89c3325d375f98e68651661 hr 46 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xa5ba91e218e361b9dc783bc6ad83179ddecb2a510.59244126192 Ether
0xdcce9284c65fa27840f5298d41210c1875379de08a9cdd525aba8389c7d8c31268651501 hr 49 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xc1041735716028b1c374f14e44eaac8aae5bd0930.05407375104 Ether
0xb5e46c34cc5c513bfe56445737a93eb0e69ba076cf064b59918dfb14412ed73c68651501 hr 49 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xce8401f2d336de77535928fce53a4dd850a1412d8.81057425104 Ether
0x974184e39b1e89a2c7b955098540b3622ee345e0d5ad7364551e341782620ccb68647633 hrs 28 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x998bc753487f393bc5a5ee8cc5d09ac86bef2af91.484744550624 Ether
0x9b1ce4b17a577eaff92ccd5bbcad0290bdbaffdef3ab080df49bba631be5c42768647253 hrs 37 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x21453278c0faae527efc1c7c06fc96a315bbe4dc1.691347211712 Ether
0x2b900263db9c3c54e2093bd6dedbab6c54cc06ca2f8677831bfd93bcb94ba4ff68646813 hrs 47 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x998bc753487f393bc5a5ee8cc5d09ac86bef2af90.2423332728 Ether
0x02a9cb5fcb172de71e13f88a328136db4f2a9da90c4bdbf791d2d835d058d12068645784 hrs 15 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xbd885f8dbddc27137d43a96919b18aa2c105adf81.5425002728 Ether
0x1d5a5625219cb99a72a5d64a46fcada0445f3034b4ef11b199f067a344c0dc2468643745 hrs 1 min ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x635f764360273c9f23c9d274a19fcc0e659545d00.422427245184 Ether
0x3f2744b578f53817c381d23674710fbbb32885281176dd351041ce1018a543f868643345 hrs 11 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x17f313d4f0d2943ebfdd57c4ef8bdde5a34bafaa4.949706706272 Ether
0x43fe898d426bfd948cc37c1c03922601e2af9d7db96e2247179099e58cc79b3768643175 hrs 16 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x373a9c89bf5cf49c3332dda400288bf36932bb974.58197076736 Ether
0xde67f6402d8ce86324aebd7707050c725574c4529eee84a4a23826760b02e4f668642185 hrs 37 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xe98e3c396c63cca93a64dbfe384b38a4c9b1ed2e0.22026836736 Ether
0x4661c8b91c8e023fdad02e3b3c99c34bc560ab42af77b4d350b417e33dcd515c68641405 hrs 55 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x1e9d4ea69dd7bab1a34fff940e499bd3977a23d42.091510478656 Ether
0x2166ffa6dfb0bcf9ef2612e575e43d9ff74e9de3492b2115fc5b5920a68ed74968641335 hrs 56 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xe500dbf696a46c137260c8719c5f8c772c5dfbc60.03542985648 Ether
0xe00a8557aa38526ce179ca4f082feb83468b329adf53081ba8b7e8e308c909cc68640816 hrs 10 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x57e1d01844b1ea1d89021205400f2928a0d8dfec0.3743813942208 Ether
0x3cfb64760ec11c907e854dce9a518207cf410c334b6dbefb1cad1ed3268dbc9a68640216 hrs 24 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xf58506e96817d47600b329143e154fc1c335d9425.892435214308 Ether
0xfc8af4e2100569148bf67cbbbc0d0434c05759c5764c9f5afc6b02ae1b3d9ea368640066 hrs 28 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x57721289f24cb42e5d6f11f888ede222bd3deceb0.38543006736 Ether
0x8ac0406e3de20e4117415785b57b71a056bc10d578ff004ebec371d920d83f4468639826 hrs 33 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060xc3a4304aa39b1d7d55feedc6b620a4537f15073f1.142889406272 Ether
0x2503d94d8a601122036d5cad414c48ec1958cb1be2230eac8228d546f4a6cbe368639746 hrs 35 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x3665b41877229555004cd09bb1a16515abeb15ad23.9027158541376 Ether
0x4961a7c9ca76a75ee6eb92238c593f9e0d15a7ba9a89519d45a5653b5cf1a8b868639746 hrs 35 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x2f9e439903f05b9e1d04e44053f26df33258b0440.6510808541376 Ether
0xde3d0a75d338a512b5029466016fb969d5b2e1e8f3ceb2e609e79b965aea0da268639536 hrs 39 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x8ec704308c6a5df24324b7e6b35d77dcf0b72f500.186887697948 Ether
0x3d424ec3b9bc0bb4a2da357c5214296de5c3165233a6c2e545bc4a6107d634c068639196 hrs 49 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x60c88a6d6d5a13a25af3778cb58b32c0f405a0ba0.017427943548 Ether
0xf39948adb3dfdb463fc3a00cefa215064a37138065730965dd5da77b523cfbd668638357 hrs 10 mins ago0x867ffb5a3871b500f65bdfafe0136f9667deae060x31199bacc52b18ad3f21522ff78d84e3e0478dfc0.2997030607488 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: LocalEthereumEscrows
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

contract Token {
    function transfer(address _to, uint _value) public returns (bool success);
    function transferFrom(address _from, address _to, uint _value) public returns (bool success);
    function approve(address _spender, uint _value) public returns (bool success);
}

/// @title localethereum.com
/// @author localethereum.com
contract LocalEthereumEscrows {
    /***********************
    +   Global settings   +
    ***********************/

    // Address of the arbitrator (currently always localethereum staff)
    address public arbitrator;
    // Address of the owner (who can withdraw collected fees)
    address public owner;
    // Address of the relayer (who is allowed to forward signed instructions from parties)
    address public relayer;
    uint32 public requestCancellationMinimumTime;
    // Cumulative balance of collected fees
    uint256 public feesAvailableForWithdraw;

    /***********************
    +  Instruction types  +
    ***********************/

    // Called when the buyer marks payment as sent. Locks funds in escrow
    uint8 constant INSTRUCTION_SELLER_CANNOT_CANCEL = 0x01;
    // Buyer cancelling
    uint8 constant INSTRUCTION_BUYER_CANCEL = 0x02;
    // Seller cancelling
    uint8 constant INSTRUCTION_SELLER_CANCEL = 0x03;
    // Seller requesting to cancel. Begins a window for buyer to object
    uint8 constant INSTRUCTION_SELLER_REQUEST_CANCEL = 0x04;
    // Seller releasing funds to the buyer
    uint8 constant INSTRUCTION_RELEASE = 0x05;
    // Either party permitting the arbitrator to resolve a dispute
    uint8 constant INSTRUCTION_RESOLVE = 0x06;

    /***********************
    +       Events        +
    ***********************/

    event Created(bytes32 indexed _tradeHash);
    event SellerCancelDisabled(bytes32 indexed _tradeHash);
    event SellerRequestedCancel(bytes32 indexed _tradeHash);
    event CancelledBySeller(bytes32 indexed _tradeHash);
    event CancelledByBuyer(bytes32 indexed _tradeHash);
    event Released(bytes32 indexed _tradeHash);
    event DisputeResolved(bytes32 indexed _tradeHash);

    struct Escrow {
        // So we know the escrow exists
        bool exists;
        // This is the timestamp in whic hthe seller can cancel the escrow after.
        // It has two special values:
        // 0 : Permanently locked by the buyer (i.e. marked as paid; the seller can never cancel)
        // 1 : The seller can only request to cancel, which will change this value to a timestamp.
        //     This option is avaialble for complex trade terms such as cash-in-person where a
        //     payment window is inappropriate
        uint32 sellerCanCancelAfter;
        // Cumulative cost of gas incurred by the relayer. This amount will be refunded to the owner
        // in the way of fees once the escrow has completed
        uint128 totalGasFeesSpentByRelayer;
    }

    // Mapping of active trades. The key here is a hash of the trade proprties
    mapping (bytes32 => Escrow) public escrows;

    modifier onlyOwner() {
        require(msg.sender == owner, "Must be owner");
        _;
    }

    modifier onlyArbitrator() {
        require(msg.sender == arbitrator, "Must be arbitrator");
        _;
    }

    /// @notice Initialize the contract.
    constructor() public {
        owner = msg.sender;
        arbitrator = msg.sender;
        relayer = msg.sender;
        requestCancellationMinimumTime = 2 hours;
    }

    /// @notice Create and fund a new escrow.
    /// @param _tradeID The unique ID of the trade, generated by localethereum.com
    /// @param _seller The selling party
    /// @param _buyer The buying party
    /// @param _value The amount of the escrow, exclusive of the fee
    /// @param _fee Localethereum's commission in 1/10000ths
    /// @param _paymentWindowInSeconds The time in seconds from escrow creation that the seller can cancel after
    /// @param _expiry This transaction must be created before this time
    /// @param _v Signature "v" component
    /// @param _r Signature "r" component
    /// @param _s Signature "s" component
    function createEscrow(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint32 _paymentWindowInSeconds,
        uint32 _expiry,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) payable external {
        // The trade hash is created by tightly-concatenating and hashing properties of the trade.
        // This hash becomes the identifier of the escrow, and hence all these variables must be
        // supplied on future contract calls
        bytes32 _tradeHash = keccak256(abi.encodePacked(_tradeID, _seller, _buyer, _value, _fee));
        // Require that trade does not already exist
        require(!escrows[_tradeHash].exists, "Trade already exists");
        // A signature (v, r and s) must come from localethereum to open an escrow
        bytes32 _invitationHash = keccak256(abi.encodePacked(
            _tradeHash,
            _paymentWindowInSeconds,
            _expiry
        ));
        require(recoverAddress(_invitationHash, _v, _r, _s) == relayer, "Must be relayer");
        // These signatures come with an expiry stamp
        require(block.timestamp < _expiry, "Signature has expired");
        // Check transaction value against signed _value and make sure is not 0
        require(msg.value == _value && msg.value > 0, "Incorrect ether sent");
        uint32 _sellerCanCancelAfter = _paymentWindowInSeconds == 0
            ? 1
            : uint32(block.timestamp) + _paymentWindowInSeconds;
        // Add the escrow to the public mapping
        escrows[_tradeHash] = Escrow(true, _sellerCanCancelAfter, 0);
        emit Created(_tradeHash);
    }

    uint16 constant GAS_doResolveDispute = 36100;
    /// @notice Called by the arbitrator to resolve a dispute. Requires a signature from either party.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @param _v Signature "v" component
    /// @param _r Signature "r" component
    /// @param _s Signature "s" component
    /// @param _buyerPercent What % should be distributed to the buyer (this is usually 0 or 100)
    function resolveDispute(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint8 _v,
        bytes32 _r,
        bytes32 _s,
        uint8 _buyerPercent
    ) external onlyArbitrator {
        address _signature = recoverAddress(keccak256(abi.encodePacked(
            _tradeID,
            INSTRUCTION_RESOLVE
        )), _v, _r, _s);
        require(_signature == _buyer || _signature == _seller, "Must be buyer or seller");

        Escrow memory _escrow;
        bytes32 _tradeHash;
        (_escrow, _tradeHash) = getEscrowAndHash(_tradeID, _seller, _buyer, _value, _fee);
        require(_escrow.exists, "Escrow does not exist");
        require(_buyerPercent <= 100, "_buyerPercent must be 100 or lower");

        uint256 _totalFees = _escrow.totalGasFeesSpentByRelayer + (GAS_doResolveDispute * uint128(tx.gasprice));
        require(_value - _totalFees <= _value, "Overflow error"); // Prevent underflow
        feesAvailableForWithdraw += _totalFees; // Add the the pot for localethereum to withdraw

        delete escrows[_tradeHash];
        emit DisputeResolved(_tradeHash);
        if (_buyerPercent > 0)
          _buyer.transfer((_value - _totalFees) * _buyerPercent / 100);
        if (_buyerPercent < 100)
          _seller.transfer((_value - _totalFees) * (100 - _buyerPercent) / 100);
    }

    /// @notice Release ether in escrow to the buyer. Direct call option.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @return bool
    function release(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee
    ) external returns (bool){
        require(msg.sender == _seller, "Must be seller");
        return doRelease(_tradeID, _seller, _buyer, _value, _fee, 0);
    }

    /// @notice Disable the seller from cancelling (i.e. "mark as paid"). Direct call option.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @return bool
    function disableSellerCancel(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee
    ) external returns (bool) {
        require(msg.sender == _buyer, "Must be buyer");
        return doDisableSellerCancel(_tradeID, _seller, _buyer, _value, _fee, 0);
    }

    /// @notice Cancel the escrow as a buyer. Direct call option.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @return bool
    function buyerCancel(
      bytes16 _tradeID,
      address _seller,
      address _buyer,
      uint256 _value,
      uint16 _fee
    ) external returns (bool) {
        require(msg.sender == _buyer, "Must be buyer");
        return doBuyerCancel(_tradeID, _seller, _buyer, _value, _fee, 0);
    }

    /// @notice Cancel the escrow as a seller. Direct call option.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @return bool
    function sellerCancel(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee
    ) external returns (bool) {
        require(msg.sender == _seller, "Must be seller");
        return doSellerCancel(_tradeID, _seller, _buyer, _value, _fee, 0);
    }

    /// @notice Request to cancel as a seller. Direct call option.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @return bool
    function sellerRequestCancel(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee
    ) external returns (bool) {
        require(msg.sender == _seller, "Must be seller");
        return doSellerRequestCancel(_tradeID, _seller, _buyer, _value, _fee, 0);
    }

    /// @notice Relay multiple signed instructions from parties of escrows.
    /// @param _tradeID List of _tradeID values
    /// @param _seller List of _seller values
    /// @param _buyer List of _buyer values
    /// @param _value List of _value values
    /// @param _fee List of _fee values
    /// @param _maximumGasPrice List of _maximumGasPrice values
    /// @param _v List of signature "v" components
    /// @param _r List of signature "r" components
    /// @param _s List of signature "s" components
    /// @param _instructionByte List of _instructionByte values
    /// @return bool List of results
    uint16 constant GAS_batchRelayBaseCost = 28500;
    function batchRelay(
        bytes16[] _tradeID,
        address[] _seller,
        address[] _buyer,
        uint256[] _value,
        uint16[] _fee,
        uint128[] _maximumGasPrice,
        uint8[] _v,
        bytes32[] _r,
        bytes32[] _s,
        uint8[] _instructionByte
    ) public returns (bool[]) {
        bool[] memory _results = new bool[](_tradeID.length);
        uint128 _additionalGas = uint128(msg.sender == relayer ? GAS_batchRelayBaseCost / _tradeID.length : 0);
        for (uint8 i=0; i<_tradeID.length; i++) {
            _results[i] = relay(
                _tradeID[i],
                _seller[i],
                _buyer[i],
                _value[i],
                _fee[i],
                _maximumGasPrice[i],
                _v[i],
                _r[i],
                _s[i],
                _instructionByte[i],
                _additionalGas
            );
        }
        return _results;
    }

    /// @notice Withdraw fees collected by the contract. Only the owner can call this.
    /// @param _to Address to withdraw fees in to
    /// @param _amount Amount to withdraw
    function withdrawFees(address _to, uint256 _amount) onlyOwner external {
        // This check also prevents underflow
        require(_amount <= feesAvailableForWithdraw, "Amount is higher than amount available");
        feesAvailableForWithdraw -= _amount;
        _to.transfer(_amount);
    }

    /// @notice Set the arbitrator to a new address. Only the owner can call this.
    /// @param _newArbitrator Address of the replacement arbitrator
    function setArbitrator(address _newArbitrator) onlyOwner external {
        arbitrator = _newArbitrator;
    }

    /// @notice Change the owner to a new address. Only the owner can call this.
    /// @param _newOwner Address of the replacement owner
    function setOwner(address _newOwner) onlyOwner external {
        owner = _newOwner;
    }

    /// @notice Change the relayer to a new address. Only the owner can call this.
    /// @param _newRelayer Address of the replacement relayer
    function setRelayer(address _newRelayer) onlyOwner external {
        relayer = _newRelayer;
    }

    /// @notice Change the requestCancellationMinimumTime. Only the owner can call this.
    /// @param _newRequestCancellationMinimumTime Replacement
    function setRequestCancellationMinimumTime(
        uint32 _newRequestCancellationMinimumTime
    ) onlyOwner external {
        requestCancellationMinimumTime = _newRequestCancellationMinimumTime;
    }

    /// @notice Send ERC20 tokens away. This function allows the owner to withdraw stuck ERC20 tokens.
    /// @param _tokenContract Token contract
    /// @param _transferTo Recipient
    /// @param _value Value
    function transferToken(
        Token _tokenContract,
        address _transferTo,
        uint256 _value
    ) onlyOwner external {
        _tokenContract.transfer(_transferTo, _value);
    }

    /// @notice Send ERC20 tokens away. This function allows the owner to withdraw stuck ERC20 tokens.
    /// @param _tokenContract Token contract
    /// @param _transferTo Recipient
    /// @param _transferFrom Sender
    /// @param _value Value
    function transferTokenFrom(
        Token _tokenContract,
        address _transferTo,
        address _transferFrom,
        uint256 _value
    ) onlyOwner external {
        _tokenContract.transferFrom(_transferTo, _transferFrom, _value);
    }

    /// @notice Send ERC20 tokens away. This function allows the owner to withdraw stuck ERC20 tokens.
    /// @param _tokenContract Token contract
    /// @param _spender Spender address
    /// @param _value Value
    function approveToken(
        Token _tokenContract,
        address _spender,
        uint256 _value
    ) onlyOwner external {
        _tokenContract.approve(_spender, _value);
    }

    /// @notice Relay a signed instruction from a party of an escrow.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @param _maximumGasPrice Maximum gas price permitted for the relayer (set by the instructor)
    /// @param _v Signature "v" component
    /// @param _r Signature "r" component
    /// @param _s Signature "s" component
    /// @param _additionalGas Additional gas to be deducted after this operation
    /// @return bool
    function relay(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint128 _maximumGasPrice,
        uint8 _v,
        bytes32 _r,
        bytes32 _s,
        uint8 _instructionByte,
        uint128 _additionalGas
    ) private returns (bool) {
        address _relayedSender = getRelayedSender(
            _tradeID,
            _instructionByte,
            _maximumGasPrice,
            _v,
            _r,
            _s
        );
        if (_relayedSender == _buyer) {
            // Buyer's instructions:
            if (_instructionByte == INSTRUCTION_SELLER_CANNOT_CANCEL) {
                // Disable seller from cancelling
                return doDisableSellerCancel(_tradeID, _seller, _buyer, _value, _fee, _additionalGas);
            } else if (_instructionByte == INSTRUCTION_BUYER_CANCEL) {
                // Cancel
                return doBuyerCancel(_tradeID, _seller, _buyer, _value, _fee, _additionalGas);
            }
        } else if (_relayedSender == _seller) {
            // Seller's instructions:
            if (_instructionByte == INSTRUCTION_RELEASE) {
                // Release
                return doRelease(_tradeID, _seller, _buyer, _value, _fee, _additionalGas);
            } else if (_instructionByte == INSTRUCTION_SELLER_CANCEL) {
                // Cancel
                return doSellerCancel(_tradeID, _seller, _buyer, _value, _fee, _additionalGas);
            } else if (_instructionByte == INSTRUCTION_SELLER_REQUEST_CANCEL){
                // Request to cancel
                return doSellerRequestCancel(_tradeID, _seller, _buyer, _value, _fee, _additionalGas);
            }
        } else {
            require(msg.sender == _seller, "Unrecognised party");
            return false;
        }
    }

    /// @notice Increase the amount of gas to be charged later on completion of an escrow
    /// @param _tradeHash Trade hash
    /// @param _gas Gas cost
    function increaseGasSpent(bytes32 _tradeHash, uint128 _gas) private {
        escrows[_tradeHash].totalGasFeesSpentByRelayer += _gas * uint128(tx.gasprice);
    }

    /// @notice Transfer the value of an escrow, minus the fees, minus the gas costs incurred by relay
    /// @param _to Recipient address
    /// @param _value Value of the transfer
    /// @param _totalGasFeesSpentByRelayer Total gas fees spent by the relayer
    /// @param _fee Commission in 1/10000ths
    function transferMinusFees(
        address _to,
        uint256 _value,
        uint128 _totalGasFeesSpentByRelayer,
        uint16 _fee
    ) private {
        uint256 _totalFees = (_value * _fee / 10000) + _totalGasFeesSpentByRelayer;
        // Prevent underflow
        if(_value - _totalFees > _value) {
            return;
        }
        // Add fees to the pot for localethereum to withdraw
        feesAvailableForWithdraw += _totalFees;
        _to.transfer(_value - _totalFees);
    }

    uint16 constant GAS_doRelease = 46588;
    /// @notice Release escrow to the buyer. This completes it and removes it from the mapping.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @param _additionalGas Additional gas to be deducted after this operation
    /// @return bool
    function doRelease(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint128 _additionalGas
    ) private returns (bool) {
        Escrow memory _escrow;
        bytes32 _tradeHash;
        (_escrow, _tradeHash) = getEscrowAndHash(_tradeID, _seller, _buyer, _value, _fee);
        if (!_escrow.exists) return false;
        uint128 _gasFees = _escrow.totalGasFeesSpentByRelayer
            + (msg.sender == relayer
                ? (GAS_doRelease + _additionalGas ) * uint128(tx.gasprice)
                : 0
            );
        delete escrows[_tradeHash];
        emit Released(_tradeHash);
        transferMinusFees(_buyer, _value, _gasFees, _fee);
        return true;
    }

    uint16 constant GAS_doDisableSellerCancel = 28944;
    /// @notice Prevents the seller from cancelling an escrow. Used to "mark as paid" by the buyer.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @param _additionalGas Additional gas to be deducted after this operation
    /// @return bool
    function doDisableSellerCancel(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint128 _additionalGas
    ) private returns (bool) {
        Escrow memory _escrow;
        bytes32 _tradeHash;
        (_escrow, _tradeHash) = getEscrowAndHash(_tradeID, _seller, _buyer, _value, _fee);
        if (!_escrow.exists) return false;
        if(_escrow.sellerCanCancelAfter == 0) return false;
        escrows[_tradeHash].sellerCanCancelAfter = 0;
        emit SellerCancelDisabled(_tradeHash);
        if (msg.sender == relayer) {
          increaseGasSpent(_tradeHash, GAS_doDisableSellerCancel + _additionalGas);
        }
        return true;
    }

    uint16 constant GAS_doBuyerCancel = 46255;
    /// @notice Cancels the trade and returns the ether to the seller. Can only be called the buyer.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @param _additionalGas Additional gas to be deducted after this operation
    /// @return bool
    function doBuyerCancel(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint128 _additionalGas
    ) private returns (bool) {
        Escrow memory _escrow;
        bytes32 _tradeHash;
        (_escrow, _tradeHash) = getEscrowAndHash(_tradeID, _seller, _buyer, _value, _fee);
        if (!_escrow.exists) {
            return false;
        }
        uint128 _gasFees = _escrow.totalGasFeesSpentByRelayer
            + (msg.sender == relayer
                ? (GAS_doBuyerCancel + _additionalGas ) * uint128(tx.gasprice)
                : 0
            );
        delete escrows[_tradeHash];
        emit CancelledByBuyer(_tradeHash);
        transferMinusFees(_seller, _value, _gasFees, 0);
        return true;
    }

    uint16 constant GAS_doSellerCancel = 46815;
    /// @notice Returns the ether in escrow to the seller. Called by the seller. Sometimes unavailable.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @param _additionalGas Additional gas to be deducted after this operation
    /// @return bool
    function doSellerCancel(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint128 _additionalGas
    ) private returns (bool) {
        Escrow memory _escrow;
        bytes32 _tradeHash;
        (_escrow, _tradeHash) = getEscrowAndHash(_tradeID, _seller, _buyer, _value, _fee);
        if (!_escrow.exists) {
            return false;
        }
        if(_escrow.sellerCanCancelAfter <= 1 || _escrow.sellerCanCancelAfter > block.timestamp) {
            return false;
        }
        uint128 _gasFees = _escrow.totalGasFeesSpentByRelayer
            + (msg.sender == relayer
                ? (GAS_doSellerCancel + _additionalGas ) * uint128(tx.gasprice)
                : 0
            );
        delete escrows[_tradeHash];
        emit CancelledBySeller(_tradeHash);
        transferMinusFees(_seller, _value, _gasFees, 0);
        return true;
    }

    uint16 constant GAS_doSellerRequestCancel = 29507;
    /// @notice Request to cancel. Used if the buyer is unresponsive. Begins a countdown timer.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @param _additionalGas Additional gas to be deducted after this operation
    /// @return bool
    function doSellerRequestCancel(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee,
        uint128 _additionalGas
    ) private returns (bool) {
        // Called on unlimited payment window trades where the buyer is not responding
        Escrow memory _escrow;
        bytes32 _tradeHash;
        (_escrow, _tradeHash) = getEscrowAndHash(_tradeID, _seller, _buyer, _value, _fee);
        if (!_escrow.exists) {
            return false;
        }
        if(_escrow.sellerCanCancelAfter != 1) {
            return false;
        }
        escrows[_tradeHash].sellerCanCancelAfter = uint32(block.timestamp)
            + requestCancellationMinimumTime;
        emit SellerRequestedCancel(_tradeHash);
        if (msg.sender == relayer) {
          increaseGasSpent(_tradeHash, GAS_doSellerRequestCancel + _additionalGas);
        }
        return true;
    }

    /// @notice Get the sender of the signed instruction.
    /// @param _tradeID Identifier of the trade
    /// @param _instructionByte Identifier of the instruction
    /// @param _maximumGasPrice Maximum gas price permitted by the sender
    /// @param _v Signature "v" component
    /// @param _r Signature "r" component
    /// @param _s Signature "s" component
    /// @return address
    function getRelayedSender(
      bytes16 _tradeID,
      uint8 _instructionByte,
      uint128 _maximumGasPrice,
      uint8 _v,
      bytes32 _r,
      bytes32 _s
    ) view private returns (address) {
        bytes32 _hash = keccak256(abi.encodePacked(
            _tradeID,
            _instructionByte,
            _maximumGasPrice
        ));
        if(tx.gasprice > _maximumGasPrice) {
            return;
        }
        return recoverAddress(_hash, _v, _r, _s);
    }

    /// @notice Hashes the values and returns the matching escrow object and trade hash.
    /// @dev Returns an empty escrow struct and 0 _tradeHash if not found.
    /// @param _tradeID Escrow "tradeID" parameter
    /// @param _seller Escrow "seller" parameter
    /// @param _buyer Escrow "buyer" parameter
    /// @param _value Escrow "value" parameter
    /// @param _fee Escrow "fee parameter
    /// @return Escrow
    function getEscrowAndHash(
        bytes16 _tradeID,
        address _seller,
        address _buyer,
        uint256 _value,
        uint16 _fee
    ) view private returns (Escrow, bytes32) {
        bytes32 _tradeHash = keccak256(abi.encodePacked(
            _tradeID,
            _seller,
            _buyer,
            _value,
            _fee
        ));
        return (escrows[_tradeHash], _tradeHash);
    }

    /// @notice Returns an empty escrow struct and 0 _tradeHash if not found.
    /// @param _h Data to be hashed
    /// @param _v Signature "v" component
    /// @param _r Signature "r" component
    /// @param _s Signature "s" component
    /// @return address
    function recoverAddress(
        bytes32 _h,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) private pure returns (address) {
        bytes memory _prefix = "\x19Ethereum Signed Message:\n32";
        bytes32 _prefixedHash = keccak256(abi.encodePacked(_prefix, _h));
        return ecrecover(_prefixedHash, _v, _r, _s);
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_newRequestCancellationMinimumTime","type":"uint32"}],"name":"setRequestCancellationMinimumTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16"},{"name":"_seller","type":"address"},{"name":"_buyer","type":"address"},{"name":"_value","type":"uint256"},{"name":"_fee","type":"uint16"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_buyerPercent","type":"uint8"}],"name":"resolveDispute","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16"},{"name":"_seller","type":"address"},{"name":"_buyer","type":"address"},{"name":"_value","type":"uint256"},{"name":"_fee","type":"uint16"}],"name":"buyerCancel","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"escrows","outputs":[{"name":"exists","type":"bool"},{"name":"sellerCanCancelAfter","type":"uint32"},{"name":"totalGasFeesSpentByRelayer","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16"},{"name":"_seller","type":"address"},{"name":"_buyer","type":"address"},{"name":"_value","type":"uint256"},{"name":"_fee","type":"uint16"}],"name":"sellerCancel","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"requestCancellationMinimumTime","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16"},{"name":"_seller","type":"address"},{"name":"_buyer","type":"address"},{"name":"_value","type":"uint256"},{"name":"_fee","type":"uint16"}],"name":"disableSellerCancel","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newRelayer","type":"address"}],"name":"setRelayer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16"},{"name":"_seller","type":"address"},{"name":"_buyer","type":"address"},{"name":"_value","type":"uint256"},{"name":"_fee","type":"uint16"}],"name":"sellerRequestCancel","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"arbitrator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"relayer","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16[]"},{"name":"_seller","type":"address[]"},{"name":"_buyer","type":"address[]"},{"name":"_value","type":"uint256[]"},{"name":"_fee","type":"uint16[]"},{"name":"_maximumGasPrice","type":"uint128[]"},{"name":"_v","type":"uint8[]"},{"name":"_r","type":"bytes32[]"},{"name":"_s","type":"bytes32[]"},{"name":"_instructionByte","type":"uint8[]"}],"name":"batchRelay","outputs":[{"name":"","type":"bool[]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newArbitrator","type":"address"}],"name":"setArbitrator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenContract","type":"address"},{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feesAvailableForWithdraw","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenContract","type":"address"},{"name":"_transferTo","type":"address"},{"name":"_transferFrom","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferTokenFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16"},{"name":"_seller","type":"address"},{"name":"_buyer","type":"address"},{"name":"_value","type":"uint256"},{"name":"_fee","type":"uint16"}],"name":"release","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradeID","type":"bytes16"},{"name":"_seller","type":"address"},{"name":"_buyer","type":"address"},{"name":"_value","type":"uint256"},{"name":"_fee","type":"uint16"},{"name":"_paymentWindowInSeconds","type":"uint32"},{"name":"_expiry","type":"uint32"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"name":"createEscrow","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenContract","type":"address"},{"name":"_transferTo","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tradeHash","type":"bytes32"}],"name":"Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tradeHash","type":"bytes32"}],"name":"SellerCancelDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tradeHash","type":"bytes32"}],"name":"SellerRequestedCancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tradeHash","type":"bytes32"}],"name":"CancelledBySeller","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tradeHash","type":"bytes32"}],"name":"CancelledByBuyer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tradeHash","type":"bytes32"}],"name":"Released","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_tradeHash","type":"bytes32"}],"name":"DisputeResolved","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b506001805433600160a060020a03199182168117909255600080548216831781556002805490921690921760a060020a63ffffffff021916751c20000000000000000000000000000000000000000017905561243090819061007290396000f30060806040526004361061010e5763ffffffff60e060020a60003504166305b64993811461011357806313af40351461013357806324943c7d146101545780632cc9636c146101a75780632d83549c146101f957806335adc0c51461023f57806357938b2a1461027d5780635c810f09146102ab5780636548e9bc146102e95780636b4078371461030a5780636cc6cde1146103485780638406c079146103795780638da5cb5b1461038e5780638eb4e0ad146103a3578063ad3b1b4714610649578063b0eefabe1461066d578063da3e33971461068e578063de5785d5146106b8578063e5994905146106df578063e9600f121461070f578063f1e03d671461074d578063f5537ede1461079b575b600080fd5b34801561011f57600080fd5b5061013163ffffffff600435166107c5565b005b34801561013f57600080fd5b50610131600160a060020a036004351661085d565b34801561016057600080fd5b506101316001608060020a031960043516600160a060020a036024358116906044351660643561ffff6084351660ff60a43581169060c4359060e4359061010435166108dc565b3480156101b357600080fd5b506101e56001608060020a031960043516600160a060020a036024358116906044351660643561ffff60843516610ce9565b604080519115158252519081900360200190f35b34801561020557600080fd5b50610211600435610d64565b60408051931515845263ffffffff90921660208401526001608060020a031682820152519081900360600190f35b34801561024b57600080fd5b506101e56001608060020a031960043516600160a060020a036024358116906044351660643561ffff60843516610d99565b34801561028957600080fd5b50610292610e0a565b6040805163ffffffff9092168252519081900360200190f35b3480156102b757600080fd5b506101e56001608060020a031960043516600160a060020a036024358116906044351660643561ffff60843516610e2e565b3480156102f557600080fd5b50610131600160a060020a0360043516610e9f565b34801561031657600080fd5b506101e56001608060020a031960043516600160a060020a036024358116906044351660643561ffff60843516610f1e565b34801561035457600080fd5b5061035d610f8f565b60408051600160a060020a039092168252519081900360200190f35b34801561038557600080fd5b5061035d610f9e565b34801561039a57600080fd5b5061035d610fad565b3480156103af57600080fd5b50604080516020600480358082013583810280860185019096528085526105f995369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610fbc9650505050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561063557818101518382015260200161061d565b505050509050019250505060405180910390f35b34801561065557600080fd5b50610131600160a060020a036004351660243561117e565b34801561067957600080fd5b50610131600160a060020a0360043516611292565b34801561069a57600080fd5b50610131600160a060020a0360043581169060243516604435611311565b3480156106c457600080fd5b506106cd6113f5565b60408051918252519081900360200190f35b3480156106eb57600080fd5b50610131600160a060020a03600435811690602435811690604435166064356113fb565b34801561071b57600080fd5b506101e56001608060020a031960043516600160a060020a036024358116906044351660643561ffff608435166114f1565b6101316001608060020a031960043516600160a060020a036024358116906044351660643561ffff6084351663ffffffff60a43581169060c4351660ff60e435166101043561012435611562565b3480156107a757600080fd5b50610131600160a060020a036004358116906024351660443561195c565b600154600160a060020a03163314610815576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b6002805463ffffffff909216740100000000000000000000000000000000000000000277ffffffff000000000000000000000000000000000000000019909216919091179055565b600154600160a060020a031633146108ad576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006108e66123c4565b600080548190600160a060020a0316331461094b576040805160e560020a62461bcd02815260206004820152601260248201527f4d7573742062652061726269747261746f720000000000000000000000000000604482015290519081900360640190fd5b604080516001608060020a03198f166020808301919091527f06000000000000000000000000000000000000000000000000000000000000006030830152825160118184030181526031909201928390528151610a0193918291908401908083835b602083106109cc5780518252601f1990920191602091820191016109ad565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020898989611a0f565b93508a600160a060020a031684600160a060020a03161480610a3457508b600160a060020a031684600160a060020a0316145b1515610a8a576040805160e560020a62461bcd02815260206004820152601760248201527f4d757374206265206275796572206f722073656c6c6572000000000000000000604482015290519081900360640190fd5b610a978d8d8d8d8d611b70565b815191945092501515610af4576040805160e560020a62461bcd02815260206004820152601560248201527f457363726f7720646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b606460ff86161115610b76576040805160e560020a62461bcd02815260206004820152602260248201527f5f627579657250657263656e74206d75737420626520313030206f72206c6f7760448201527f6572000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b5060408201513a618d0402016001608060020a0316808a038a1015610be5576040805160e560020a62461bcd02815260206004820152600e60248201527f4f766572666c6f77206572726f72000000000000000000000000000000000000604482015290519081900360640190fd5b6003805482019055600082815260046020526040808220805474ffffffffffffffffffffffffffffffffffffffffff191690555183917f65e0c7182ce84cd9087c1b07dc4b65875578877b885848e4be19ee312f2c3d3191a260008560ff161115610c8b57604051600160a060020a038c1690606460ff8816848e03020480156108fc02916000818181858888f19350505050158015610c89573d6000803e3d6000fd5b505b60648560ff161015610cda57604051600160a060020a038d1690606487810360ff16848e03020480156108fc02916000818181858888f19350505050158015610cd8573d6000803e3d6000fd5b505b50505050505050505050505050565b600033600160a060020a03851614610d4b576040805160e560020a62461bcd02815260206004820152600d60248201527f4d75737420626520627579657200000000000000000000000000000000000000604482015290519081900360640190fd5b610d5a86868686866000611cb4565b9695505050505050565b60046020526000908152604090205460ff811690610100810463ffffffff16906501000000000090046001608060020a031683565b600033600160a060020a03861614610dfb576040805160e560020a62461bcd02815260206004820152600e60248201527f4d7573742062652073656c6c6572000000000000000000000000000000000000604482015290519081900360640190fd5b610d5a86868686866000611d7f565b60025474010000000000000000000000000000000000000000900463ffffffff1681565b600033600160a060020a03851614610e90576040805160e560020a62461bcd02815260206004820152600d60248201527f4d75737420626520627579657200000000000000000000000000000000000000604482015290519081900360640190fd5b610d5a86868686866000611e69565b600154600160a060020a03163314610eef576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600033600160a060020a03861614610f80576040805160e560020a62461bcd02815260206004820152600e60248201527f4d7573742062652073656c6c6572000000000000000000000000000000000000604482015290519081900360640190fd5b610d5a86868686866000611f25565b600054600160a060020a031681565b600254600160a060020a031681565b600154600160a060020a031681565b6060806000808d51604051908082528060200260200182016040528015610fed578160200160208202803883390190505b50600254909350600160a060020a0316331461100a57600061101a565b8d51616f5481151561101857fe5b045b9150600090505b8d518160ff16101561116c576111448e8260ff1681518110151561104157fe5b906020019060200201518e8360ff1681518110151561105c57fe5b906020019060200201518e8460ff1681518110151561107757fe5b906020019060200201518e8560ff1681518110151561109257fe5b906020019060200201518e8660ff168151811015156110ad57fe5b906020019060200201518e8760ff168151811015156110c857fe5b906020019060200201518e8860ff168151811015156110e357fe5b906020019060200201518e8960ff168151811015156110fe57fe5b906020019060200201518e8a60ff1681518110151561111957fe5b906020019060200201518e8b60ff1681518110151561113457fe5b906020019060200201518c612007565b838260ff1681518110151561115557fe5b911515602092830290910190910152600101611021565b50909c9b505050505050505050505050565b600154600160a060020a031633146111ce576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b60035481111561124e576040805160e560020a62461bcd02815260206004820152602660248201527f416d6f756e7420697320686967686572207468616e20616d6f756e742061766160448201527f696c61626c650000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600380548290039055604051600160a060020a0383169082156108fc029083906000818181858888f1935050505015801561128d573d6000803e3d6000fd5b505050565b600154600160a060020a031633146112e2576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154600160a060020a03163314611361576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b82600160a060020a031663095ea7b383836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156113c457600080fd5b505af11580156113d8573d6000803e3d6000fd5b505050506040513d60208110156113ee57600080fd5b5050505050565b60035481565b600154600160a060020a0316331461144b576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301528481166024830152604482018490529151918616916323b872dd916064808201926020929091908290030181600087803b1580156114bf57600080fd5b505af11580156114d3573d6000803e3d6000fd5b505050506040513d60208110156114e957600080fd5b505050505050565b600033600160a060020a03861614611553576040805160e560020a62461bcd02815260206004820152600e60248201527f4d7573742062652073656c6c6572000000000000000000000000000000000000604482015290519081900360640190fd5b610d5a86868686866000612151565b604080516001608060020a03198c166020808301919091526c01000000000000000000000000600160a060020a03808e16820260308501528c16026044830152605882018a90527e0100000000000000000000000000000000000000000000000000000000000061ffff8a160260788301528251605a818403018152607a90920192839052815160009384938493909282918401908083835b6020831061161a5780518252601f1990920191602091820191016115fb565b51815160209384036101000a6000190180199092169116179052604080519290940182900390912060008181526004909252929020549196505060ff161591506116b09050576040805160e560020a62461bcd02815260206004820152601460248201527f547261646520616c726561647920657869737473000000000000000000000000604482015290519081900360640190fd5b60408051602080820186905260e060020a63ffffffff808d168202848601528b1602604483015282516028818403018152604890920192839052815191929182918401908083835b602083106117175780518252601f1990920191602091820191016116f8565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120600254909550600160a060020a031692506117619150849050888888611a0f565b600160a060020a0316146117bf576040805160e560020a62461bcd02815260206004820152600f60248201527f4d7573742062652072656c617965720000000000000000000000000000000000604482015290519081900360640190fd5b63ffffffff8716421061181c576040805160e560020a62461bcd02815260206004820152601560248201527f5369676e61747572652068617320657870697265640000000000000000000000604482015290519081900360640190fd5b893414801561182b5750600034115b1515611881576040805160e560020a62461bcd02815260206004820152601460248201527f496e636f72726563742065746865722073656e74000000000000000000000000604482015290519081900360640190fd5b63ffffffff88161561189557874201611898565b60015b604080516060810182526001815263ffffffff808416602080840191825260008486018181528a8252600490925285812094518554935192516001608060020a0316650100000000000274ffffffffffffffffffffffffffffffff000000000019939095166101000264ffffffff001991151560ff199095169490941716929092171691909117909155905191925084917f102d25c49d33fcdb8976a3f2744e0785c98d9e43b88364859e6aec4ae82eff5c9190a250505050505050505050505050565b600154600160a060020a031633146119ac576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206123e5833981519152604482015290519081900360640190fd5b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156113c457600080fd5b604080518082018252601c8082527f19457468657265756d205369676e6564204d6573736167653a0a33320000000060208084019182529351600094859385938b939092019182918083835b60208310611a7a5780518252601f199092019160209182019101611a5b565b51815160209384036101000a600019018019909216911617905292019384525060408051808503815293820190819052835193945092839250908401908083835b60208310611ada5780518252601f199092019160209182019101611abb565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600080845283830180875282905260ff8e1684870152606084018d9052608084018c905294519097506001965060a080840196509194601f19820194509281900390910191865af1158015611b5a573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b611b786123c4565b604080516001608060020a031988166020808301919091526c01000000000000000000000000600160a060020a03808a16820260308501528816026044830152605882018690527e0100000000000000000000000000000000000000000000000000000000000061ffff86160260788301528251605a818403018152607a909201928390528151600093849392909182918401908083835b60208310611c2f5780518252601f199092019160209182019101611c10565b518151602093840361010090810a6000190180199093169290911691909117909152604080519390950183900383206000818152600484528690206060850187525460ff81161515855291820463ffffffff16928401929092526501000000000090046001608060020a0316938201939093529c919b50909950505050505050505050565b6000611cbe6123c4565b600080611cce8a8a8a8a8a611b70565b815191945092501515611ce45760009350611d72565b600254600160a060020a03163314611cfd576000611d05565b61b4af85013a025b60408085015160008581526004602052828120805474ffffffffffffffffffffffffffffffffffffffffff1916905591519201925083917fd9b627ddaa414e8e6c82366cc9c179f6281d73968827cc17038a56852e28ac8b9190a2611d6d8988836000612205565b600193505b5050509695505050505050565b6000611d896123c4565b600080611d998a8a8a8a8a611b70565b815191945092501515611daf5760009350611d72565b6001836020015163ffffffff16111580611dd2575042836020015163ffffffff16115b15611de05760009350611d72565b600254600160a060020a03163314611df9576000611e01565b61b6df85013a025b60408085015160008581526004602052828120805474ffffffffffffffffffffffffffffffffffffffffff1916905591519201925083917f366d2b4e6cc37ecebb3d7d41df6d581634fd8137412710a1e086e4ca4656bb589190a2611d6d8988836000612205565b6000611e736123c4565b6000611e828989898989611b70565b815191935091501515611e985760009250611f19565b602082015163ffffffff161515611eb25760009250611f19565b600081815260046020526040808220805464ffffffff00191690555182917fe95fa7985c7585e90dab2dc46470726468662be06f67d79a31a5012e4bc0edeb91a2600254600160a060020a0316331415611f1457611f14816171108601612269565b600192505b50509695505050505050565b6000611f2f6123c4565b6000611f3e8989898989611b70565b815191935091501515611f545760009250611f19565b816020015163ffffffff166001141515611f715760009250611f19565b60025460008281526004602052604080822080544263ffffffff740100000000000000000000000000000000000000009096048616019094166101000264ffffffff001990941693909317909255905182917f43e76a2687c7b12792086e4c776772be26c4d6a7041115f446cbc22ccada08ab91a2600254600160a060020a0316331415611f1457611f14816173438601612269565b6000806120188d858a8a8a8a6122bb565b90508a600160a060020a031681600160a060020a031614156120745760ff8416600114156120555761204e8d8d8d8d8d88611e69565b9150612141565b60ff84166002141561206f5761204e8d8d8d8d8d88611cb4565b612141565b8b600160a060020a031681600160a060020a031614156120dc5760ff8416600514156120a85761204e8d8d8d8d8d88612151565b60ff8416600314156120c25761204e8d8d8d8d8d88611d7f565b60ff84166004141561206f5761204e8d8d8d8d8d88611f25565b33600160a060020a038d161461213c576040805160e560020a62461bcd02815260206004820152601260248201527f556e7265636f676e697365642070617274790000000000000000000000000000604482015290519081900360640190fd5b600091505b509b9a5050505050505050505050565b600061215b6123c4565b60008061216b8a8a8a8a8a611b70565b8151919450925015156121815760009350611d72565b600254600160a060020a0316331461219a5760006121a2565b61b5fc85013a025b60408085015160008581526004602052828120805474ffffffffffffffffffffffffffffffffffffffffff1916905591519201925083917f6eec2dd2382427616d4ea7ef183b16091feac4e2e63c8b55f25215f132df8d149190a2611d6d888883895b61271061ffff82168402046001608060020a0383160180840384101561222a576113ee565b6003805482019055604051600160a060020a0386169082860380156108fc02916000818181858888f193505050501580156114e9573d6000803e3d6000fd5b600091825260046020526040909120805474ffffffffffffffffffffffffffffffff00000000001981163a90930265010000000000918290046001608060020a03908116919091011602919091179055565b604080516001608060020a031988166020808301919091527f010000000000000000000000000000000000000000000000000000000000000060ff89160260308301527001000000000000000000000000000000006001608060020a038816026031830152825160218184030181526041909201928390528151600093849392909182918401908083835b602083106123655780518252601f199092019160209182019101612346565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050856001608060020a03163a11156123aa576123b9565b6123b681868686611a0f565b91505b509695505050505050565b60408051606081018252600080825260208201819052918101919091529056004d757374206265206f776e657200000000000000000000000000000000000000a165627a7a72305820654333d3912b8c3728a12e74d8df8495a94933ffd9a94d7e32ed95bc0ab7b6830029

   Swarm Source:
bzzr://654333d3912b8c3728a12e74d8df8495a94933ffd9a94d7e32ed95bc0ab7b683

 

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.