ETH Price: $3,310.86 (-0.13%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw70881012019-01-18 16:48:032199 days ago1547830083IN
0xe060EF9a...F77838134
0 ETH0.000174744
Withdraw70880982019-01-18 16:47:032199 days ago1547830023IN
0xe060EF9a...F77838134
0 ETH0.000174744
Withdraw Fee70880962019-01-18 16:46:412199 days ago1547830001IN
0xe060EF9a...F77838134
0 ETH0.000361634
Withdraw Fee70878762019-01-18 15:48:302199 days ago1547826510IN
0xe060EF9a...F77838134
0 ETH0.000618384
Withdraw70878752019-01-18 15:48:182199 days ago1547826498IN
0xe060EF9a...F77838134
0 ETH0.000423124
Withdraw70878752019-01-18 15:48:182199 days ago1547826498IN
0xe060EF9a...F77838134
0 ETH0.000423124
Confirm Swap70878552019-01-18 15:42:022199 days ago1547826122IN
0xe060EF9a...F77838134
0 ETH0.000089374
Confirm Swap70878542019-01-18 15:41:542199 days ago1547826114IN
0xe060EF9a...F77838134
0 ETH0.00031434
Confirm Swap70878472019-01-18 15:40:552199 days ago1547826055IN
0xe060EF9a...F77838134
0 ETH0.000505034
Confirm Parties70878062019-01-18 15:32:132199 days ago1547825533IN
0xe060EF9a...F77838134
0 ETH0.001098124
Add Lockup Perio...70877402019-01-18 15:13:292199 days ago1547824409IN
0xe060EF9a...F77838134
0 ETH0.000703714
Add Party70877302019-01-18 15:10:522199 days ago1547824252IN
0xe060EF9a...F77838134
0 ETH0.000857724
Add Lockup Perio...70877272019-01-18 15:10:082199 days ago1547824208IN
0xe060EF9a...F77838134
0 ETH0.000703714
Add Party70877082019-01-18 15:04:052199 days ago1547823845IN
0xe060EF9a...F77838134
0 ETH0.000917724

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenSwap

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-01-18
*/

pragma solidity ^0.4.24;

// File: Multiownable/contracts/Multiownable.sol

contract Multiownable {

    // VARIABLES

    uint256 public ownersGeneration;
    uint256 public howManyOwnersDecide;
    address[] public owners;
    bytes32[] public allOperations;
    address internal insideCallSender;
    uint256 internal insideCallCount;

    // Reverse lookup tables for owners and allOperations
    mapping(address => uint) public ownersIndices; // Starts from 1
    mapping(bytes32 => uint) public allOperationsIndicies;

    // Owners voting mask per operations
    mapping(bytes32 => uint256) public votesMaskByOperation;
    mapping(bytes32 => uint256) public votesCountByOperation;

    // EVENTS

    event OwnershipTransferred(address[] previousOwners, uint howManyOwnersDecide, address[] newOwners, uint newHowManyOwnersDecide);
    event OperationCreated(bytes32 operation, uint howMany, uint ownersCount, address proposer);
    event OperationUpvoted(bytes32 operation, uint votes, uint howMany, uint ownersCount, address upvoter);
    event OperationPerformed(bytes32 operation, uint howMany, uint ownersCount, address performer);
    event OperationDownvoted(bytes32 operation, uint votes, uint ownersCount,  address downvoter);
    event OperationCancelled(bytes32 operation, address lastCanceller);
    
    // ACCESSORS

    function isOwner(address wallet) public constant returns(bool) {
        return ownersIndices[wallet] > 0;
    }

    function ownersCount() public constant returns(uint) {
        return owners.length;
    }

    function allOperationsCount() public constant returns(uint) {
        return allOperations.length;
    }

    // MODIFIERS

    /**
    * @dev Allows to perform method by any of the owners
    */
    modifier onlyAnyOwner {
        if (checkHowManyOwners(1)) {
            bool update = (insideCallSender == address(0));
            if (update) {
                insideCallSender = msg.sender;
                insideCallCount = 1;
            }
            _;
            if (update) {
                insideCallSender = address(0);
                insideCallCount = 0;
            }
        }
    }

    /**
    * @dev Allows to perform method only after many owners call it with the same arguments
    */
    modifier onlyManyOwners {
        if (checkHowManyOwners(howManyOwnersDecide)) {
            bool update = (insideCallSender == address(0));
            if (update) {
                insideCallSender = msg.sender;
                insideCallCount = howManyOwnersDecide;
            }
            _;
            if (update) {
                insideCallSender = address(0);
                insideCallCount = 0;
            }
        }
    }

    /**
    * @dev Allows to perform method only after all owners call it with the same arguments
    */
    modifier onlyAllOwners {
        if (checkHowManyOwners(owners.length)) {
            bool update = (insideCallSender == address(0));
            if (update) {
                insideCallSender = msg.sender;
                insideCallCount = owners.length;
            }
            _;
            if (update) {
                insideCallSender = address(0);
                insideCallCount = 0;
            }
        }
    }

    /**
    * @dev Allows to perform method only after some owners call it with the same arguments
    */
    modifier onlySomeOwners(uint howMany) {
        require(howMany > 0, "onlySomeOwners: howMany argument is zero");
        require(howMany <= owners.length, "onlySomeOwners: howMany argument exceeds the number of owners");
        
        if (checkHowManyOwners(howMany)) {
            bool update = (insideCallSender == address(0));
            if (update) {
                insideCallSender = msg.sender;
                insideCallCount = howMany;
            }
            _;
            if (update) {
                insideCallSender = address(0);
                insideCallCount = 0;
            }
        }
    }

    // CONSTRUCTOR

    constructor() public {
        owners.push(msg.sender);
        ownersIndices[msg.sender] = 1;
        howManyOwnersDecide = 1;
    }

    // INTERNAL METHODS

    /**
     * @dev onlyManyOwners modifier helper
     */
    function checkHowManyOwners(uint howMany) internal returns(bool) {
        if (insideCallSender == msg.sender) {
            require(howMany <= insideCallCount, "checkHowManyOwners: nested owners modifier check require more owners");
            return true;
        }

        uint ownerIndex = ownersIndices[msg.sender] - 1;
        require(ownerIndex < owners.length, "checkHowManyOwners: msg.sender is not an owner");
        bytes32 operation = keccak256(msg.data, ownersGeneration);

        require((votesMaskByOperation[operation] & (2 ** ownerIndex)) == 0, "checkHowManyOwners: owner already voted for the operation");
        votesMaskByOperation[operation] |= (2 ** ownerIndex);
        uint operationVotesCount = votesCountByOperation[operation] + 1;
        votesCountByOperation[operation] = operationVotesCount;
        if (operationVotesCount == 1) {
            allOperationsIndicies[operation] = allOperations.length;
            allOperations.push(operation);
            emit OperationCreated(operation, howMany, owners.length, msg.sender);
        }
        emit OperationUpvoted(operation, operationVotesCount, howMany, owners.length, msg.sender);

        // If enough owners confirmed the same operation
        if (votesCountByOperation[operation] == howMany) {
            deleteOperation(operation);
            emit OperationPerformed(operation, howMany, owners.length, msg.sender);
            return true;
        }

        return false;
    }

    /**
    * @dev Used to delete cancelled or performed operation
    * @param operation defines which operation to delete
    */
    function deleteOperation(bytes32 operation) internal {
        uint index = allOperationsIndicies[operation];
        if (index < allOperations.length - 1) { // Not last
            allOperations[index] = allOperations[allOperations.length - 1];
            allOperationsIndicies[allOperations[index]] = index;
        }
        allOperations.length--;

        delete votesMaskByOperation[operation];
        delete votesCountByOperation[operation];
        delete allOperationsIndicies[operation];
    }

    // PUBLIC METHODS

    /**
    * @dev Allows owners to change their mind by cacnelling votesMaskByOperation operations
    * @param operation defines which operation to delete
    */
    function cancelPending(bytes32 operation) public onlyAnyOwner {
        uint ownerIndex = ownersIndices[msg.sender] - 1;
        require((votesMaskByOperation[operation] & (2 ** ownerIndex)) != 0, "cancelPending: operation not found for this user");
        votesMaskByOperation[operation] &= ~(2 ** ownerIndex);
        uint operationVotesCount = votesCountByOperation[operation] - 1;
        votesCountByOperation[operation] = operationVotesCount;
        emit OperationDownvoted(operation, operationVotesCount, owners.length, msg.sender);
        if (operationVotesCount == 0) {
            deleteOperation(operation);
            emit OperationCancelled(operation, msg.sender);
        }
    }

    /**
    * @dev Allows owners to change ownership
    * @param newOwners defines array of addresses of new owners
    */
    function transferOwnership(address[] newOwners) public {
        transferOwnershipWithHowMany(newOwners, newOwners.length);
    }

    /**
    * @dev Allows owners to change ownership
    * @param newOwners defines array of addresses of new owners
    * @param newHowManyOwnersDecide defines how many owners can decide
    */
    function transferOwnershipWithHowMany(address[] newOwners, uint256 newHowManyOwnersDecide) public onlyManyOwners {
        require(newOwners.length > 0, "transferOwnershipWithHowMany: owners array is empty");
        require(newOwners.length <= 256, "transferOwnershipWithHowMany: owners count is greater then 256");
        require(newHowManyOwnersDecide > 0, "transferOwnershipWithHowMany: newHowManyOwnersDecide equal to 0");
        require(newHowManyOwnersDecide <= newOwners.length, "transferOwnershipWithHowMany: newHowManyOwnersDecide exceeds the number of owners");

        // Reset owners reverse lookup table
        for (uint j = 0; j < owners.length; j++) {
            delete ownersIndices[owners[j]];
        }
        for (uint i = 0; i < newOwners.length; i++) {
            require(newOwners[i] != address(0), "transferOwnershipWithHowMany: owners array contains zero");
            require(ownersIndices[newOwners[i]] == 0, "transferOwnershipWithHowMany: owners array contains duplicates");
            ownersIndices[newOwners[i]] = i + 1;
        }
        
        emit OwnershipTransferred(owners, howManyOwnersDecide, newOwners, newHowManyOwnersDecide);
        owners = newOwners;
        howManyOwnersDecide = newHowManyOwnersDecide;
        allOperations.length = 0;
        ownersGeneration++;
    }

}

// File: zeppelin-solidity/contracts/math/SafeMath.sol

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  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 a / b;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
    c = a + b;
    assert(c >= a);
    return c;
  }
}

// File: zeppelin-solidity/contracts/ownership/Ownable.sol

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  event OwnershipRenounced(address indexed previousOwner);
  event OwnershipTransferred(
    address indexed previousOwner,
    address indexed newOwner
  );


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to relinquish control of the contract.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    owner = address(0);
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function transferOwnership(address _newOwner) public onlyOwner {
    _transferOwnership(_newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}

// File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

// File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  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);
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

// File: contracts/BadERC20Aware.sol

library BadERC20Aware {
    using SafeMath for uint;

    function isContract(address addr) internal view returns(bool result) {
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            result := gt(extcodesize(addr), 0)
        }
    }

    function handleReturnBool() internal pure returns(bool result) {
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            switch returndatasize()
            case 0 { // not a std erc20
                result := 1
            }
            case 32 { // std erc20
                returndatacopy(0, 0, 32)
                result := mload(0)
            }
            default { // anything else, should revert for safety
                revert(0, 0)
            }
        }
    }

    function asmTransfer(ERC20 _token, address _to, uint256 _value) internal returns(bool) {
        require(isContract(_token));
        // solium-disable-next-line security/no-low-level-calls
        require(address(_token).call(bytes4(keccak256("transfer(address,uint256)")), _to, _value));
        return handleReturnBool();
    }

    function safeTransfer(ERC20 _token, address _to, uint256 _value) internal {
        require(asmTransfer(_token, _to, _value));
    }
}

// File: contracts/TokenSwap.sol

/**
 * @title TokenSwap
 * This product is protected under license.  Any unauthorized copy, modification, or use without
 * express written consent from the creators is prohibited.
 */







contract TokenSwap is Ownable, Multiownable {

    // LIBRARIES

    using BadERC20Aware for ERC20;
    using SafeMath for uint256;

    // TYPES

    enum Status {AddParties, WaitingDeposits, SwapConfirmed, SwapCanceled}

    struct SwapOffer {
        address participant;
        ERC20 token;

        uint256 tokensForSwap;
        uint256 withdrawnTokensForSwap;

        uint256 tokensFee;
        uint256 withdrawnFee;

        uint256 tokensTotal;
        uint256 withdrawnTokensTotal;
    }

    struct LockupStage {
        uint256 secondsSinceLockupStart;
        uint8 unlockedTokensPercentage;
    }

    // VARIABLES
    Status public status = Status.AddParties;

    uint256 internal startLockupAt;
    mapping(address => LockupStage[]) internal lockupStagesByToken;

    address[] internal participants;
    mapping(address => bool) internal isParticipant;
    mapping(address => address) internal tokenByParticipant;
    mapping(address => SwapOffer) internal offerByToken;

    // EVENTS
    event StatusUpdate(Status oldStatus, Status newStatus);
    event AddParty(
        address participant,
        ERC20 token,
        uint256 tokensForSwap,
        uint256 tokensFee,
        uint256 tokensTotal
    );
    event AddLockupStage(
        ERC20 token,
        uint256 secondsSinceLockupStart,
        uint8 unlockedTokensPercentage
    );
    event ConfirmParties();
    event CancelSwap();
    event ConfirmSwap();
    event StartLockup(uint256 startLockupAt);
    event Withdraw(address participant, ERC20 token, uint256 amount);
    event WithdrawFee(ERC20 token, uint256 amount);
    event Reclaim(address participant, ERC20 token, uint256 amount);

    // MODIFIERS
    modifier onlyParticipant {
        require(
            isParticipant[msg.sender] == true,
            "Only swap participants allowed to call the method"
        );
        _;
    }

    modifier canTransferOwnership {
        require(status == Status.AddParties, "Unable to transfer ownership in the current status");
        _;
    }

    modifier canAddParty {
        require(status == Status.AddParties, "Unable to add new parties in the current status");
        _;
    }

    modifier canAddLockupPeriod {
        require(status == Status.AddParties, "Unable to add lockup period in the current status");
        _;
    }

    modifier canConfirmParties {
        require(
            status == Status.AddParties,
            "Unable to confirm parties in the current status"
        );
        require(participants.length > 1, "Need at least two participants");
        require(_doesEveryTokenHaveLockupPeriod(), "Each token must have lockup period");
        _;
    }

    modifier canCancelSwap {
        require(
            status == Status.WaitingDeposits,
            "Unable to cancel swap in the current status"
        );
        _;
    }

    modifier canConfirmSwap {
        require(status == Status.WaitingDeposits, "Unable to confirm in the current status");
        require(
            _haveEveryoneDeposited(),
            "Unable to confirm swap before all parties have deposited tokens"
        );
        _;
    }

    modifier canWithdraw {
        require(status == Status.SwapConfirmed, "Unable to withdraw tokens in the current status");
        require(startLockupAt != 0, "Lockup has not been started");
        _;
    }

    modifier canWithdrawFee {
        require(status == Status.SwapConfirmed, "Unable to withdraw fee in the current status");
        require(startLockupAt != 0, "Lockup has not been started");
        _;
    }

    modifier canReclaim {
        require(
            status == Status.SwapConfirmed || status == Status.SwapCanceled,
            "Unable to reclaim in the current status"
        );
        _;
    }

    // EXTERNAL METHODS
    /**
     * @dev Add new party to the swap.
     * @param _participant Address of the participant.
     * @param _token An ERC20-compliant token which participant is offering to swap.
     * @param _tokensForSwap How much tokens the participant wants to swap.
     * @param _tokensFee How much tokens will be payed as a fee.
     * @param _tokensTotal How much tokens the participant is offering (i.e. _tokensForSwap + _tokensFee).
     */
    function addParty(
        address _participant,
        ERC20 _token,
        uint256 _tokensForSwap,
        uint256 _tokensFee,
        uint256 _tokensTotal
    )
        external
        onlyOwner
        canAddParty
    {
        require(_participant != address(0), "_participant is invalid address");
        require(_token != address(0), "_token is invalid address");
        require(_tokensForSwap > 0, "_tokensForSwap must be positive");
        require(_tokensFee > 0, "_tokensFee must be positive");
        require(_tokensTotal == _tokensForSwap.add(_tokensFee), "token amounts inconsistency");
        require(
            isParticipant[_participant] == false,
            "Unable to add the same party multiple times"
        );

        isParticipant[_participant] = true;
        SwapOffer memory offer = SwapOffer({
            participant: _participant,
            token: _token,
            tokensForSwap: _tokensForSwap,
            withdrawnTokensForSwap: 0,
            tokensFee: _tokensFee,
            withdrawnFee: 0,
            tokensTotal: _tokensTotal,
            withdrawnTokensTotal: 0
        });
        participants.push(offer.participant);
        offerByToken[offer.token] = offer;
        tokenByParticipant[offer.participant] = offer.token;

        emit AddParty(
            offer.participant,
            offer.token,
            offer.tokensForSwap,
            offer.tokensFee,
            offer.tokensTotal
        );
    }

    /**
     * @dev Add lockup period stages for one of the tokens.
     * @param _token A token previously added via addParty.
     * @param _secondsSinceLockupStart Array of starts of the stages of the lockup period.
     * @param _unlockedTokensPercentages Array of percentages of the unlocked tokens.
     */
    function addLockupPeriod(
        ERC20 _token,
        uint256[] _secondsSinceLockupStart,
        uint8[] _unlockedTokensPercentages
    )
        external
        onlyOwner
        canAddLockupPeriod
    {
        require(_token != address(0), "Invalid token");
        require(
            _secondsSinceLockupStart.length == _unlockedTokensPercentages.length,
            "Invalid lockup period"
        );
        require(
            lockupStagesByToken[_token].length == 0,
            "Lockup period for this token has been added already"
        );
        require(
            offerByToken[_token].token != address(0),
            "There is no swap offer with this token"
        );

        for (uint256 i = 0; i < _secondsSinceLockupStart.length; i++) {
            _addLockupStage(
                _token,
                LockupStage(_secondsSinceLockupStart[i], _unlockedTokensPercentages[i])
            );
        }

        _validateLockupStages(_token);
    }

    /**
     * @dev Confirm swap parties
     */
    function confirmParties() external onlyOwner canConfirmParties {
        address[] memory newOwners = new address[](participants.length + 1);

        for (uint256 i = 0; i < participants.length; i++) {
            newOwners[i] = participants[i];
        }

        newOwners[newOwners.length - 1] = owner;
        transferOwnershipWithHowMany(newOwners, newOwners.length - 1);
        _changeStatus(Status.WaitingDeposits);
        emit ConfirmParties();
    }

    /**
     * @dev Confirm swap.
     */
    function confirmSwap() external canConfirmSwap onlyManyOwners {
        emit ConfirmSwap();
        _changeStatus(Status.SwapConfirmed);
        _startLockup();
    }

    /**
     * @dev Cancel swap.
     */
    function cancelSwap() external canCancelSwap onlyManyOwners {
        emit CancelSwap();
        _changeStatus(Status.SwapCanceled);
    }

    /**
     * @dev Withdraw tokens
     */
    function withdraw() external onlyParticipant canWithdraw {
        for (uint i = 0; i < participants.length; i++) {
            address token = tokenByParticipant[participants[i]];
            SwapOffer storage offer = offerByToken[token];

            if (offer.participant == msg.sender) {
                continue;
            }

            uint256 tokenReceivers = participants.length - 1;
            uint256 tokensAmount = _withdrawableAmount(offer).div(tokenReceivers);

            if (tokensAmount > 0) {
                offer.withdrawnTokensForSwap = offer.withdrawnTokensForSwap.add(tokensAmount);
                offer.withdrawnTokensTotal = offer.withdrawnTokensTotal.add(tokensAmount);
                offer.token.safeTransfer(msg.sender, tokensAmount);
                emit Withdraw(msg.sender, offer.token, tokensAmount);
            }
        }
    }

    /**
     * @dev Withdraw swap fee
     */
    function withdrawFee() external onlyOwner canWithdrawFee {
        for (uint i = 0; i < participants.length; i++) {
            address token = tokenByParticipant[participants[i]];
            SwapOffer storage offer = offerByToken[token];

            uint256 tokensAmount = _withdrawableFee(offer);

            if (tokensAmount > 0) {
                offer.withdrawnFee = offer.withdrawnFee.add(tokensAmount);
                offer.withdrawnTokensTotal = offer.withdrawnTokensTotal.add(tokensAmount);
                offer.token.safeTransfer(msg.sender, tokensAmount);
                emit WithdrawFee(offer.token, tokensAmount);
            }
        }
    }

    /**
     * @dev Reclaim tokens if a participant has deposited too much or if the swap has been canceled.
     */
    function reclaim() external onlyParticipant canReclaim {
        address token = tokenByParticipant[msg.sender];

        SwapOffer storage offer = offerByToken[token];
        uint256 currentBalance = offer.token.balanceOf(address(this));
        uint256 availableForReclaim = currentBalance;

        if (status != Status.SwapCanceled) {
            uint256 lockedTokens = offer.tokensTotal.sub(offer.withdrawnTokensTotal);
            availableForReclaim = currentBalance.sub(lockedTokens);
        }

        if (availableForReclaim > 0) {
            offer.token.safeTransfer(offer.participant, availableForReclaim);
        }

        emit Reclaim(offer.participant, offer.token, availableForReclaim);
    }

    // PUBLIC METHODS
    /**
     * @dev Standard ERC223 function that will handle incoming token transfers.
     *
     * @param _from  Token sender address.
     * @param _value Amount of tokens.
     * @param _data  Transaction metadata.
     */
    function tokenFallback(address _from, uint256 _value, bytes _data) public {

    }

    /**
     * @dev Transfer ownership.
     * @param _newOwner Address of the new owner.
     */
    function transferOwnership(address _newOwner) public onlyOwner canTransferOwnership {
        require(_newOwner != address(0), "_newOwner is invalid address");
        require(owners.length == 1, "Unable to transfer ownership in presence of multiowners");
        require(owners[0] == owner, "Unexpected multiowners state");

        address[] memory newOwners = new address[](1);
        newOwners[0] = _newOwner;

        Ownable.transferOwnership(_newOwner);
        Multiownable.transferOwnership(newOwners);
    }

    // INTERNAL METHODS
    /**
     * @dev Add lockup period stage
     */
    function _addLockupStage(ERC20 _token, LockupStage _stage) internal {
        emit AddLockupStage(
            _token, _stage.secondsSinceLockupStart, _stage.unlockedTokensPercentage
        );
        lockupStagesByToken[_token].push(_stage);
    }

    /**
     * @dev Validate lock-up period configuration.
     */
    function _validateLockupStages(ERC20 _token) internal view {
        LockupStage[] storage lockupStages = lockupStagesByToken[_token];

        for (uint i = 0; i < lockupStages.length; i++) {
            LockupStage memory stage = lockupStages[i];

            require(
                stage.unlockedTokensPercentage >= 0,
                "LockupStage.unlockedTokensPercentage must not be negative"
            );
            require(
                stage.unlockedTokensPercentage <= 100,
                "LockupStage.unlockedTokensPercentage must not be greater than 100"
            );

            if (i == 0) {
                continue;
            }

            LockupStage memory previousStage = lockupStages[i - 1];
            require(
                stage.secondsSinceLockupStart > previousStage.secondsSinceLockupStart,
                "LockupStage.secondsSinceLockupStart must increase monotonically"
            );
            require(
                stage.unlockedTokensPercentage > previousStage.unlockedTokensPercentage,
                "LockupStage.unlockedTokensPercentage must increase monotonically"
            );
        }

        require(
            lockupStages[lockupStages.length - 1].unlockedTokensPercentage == 100,
            "The last lockup stage must unlock 100% of tokens"
        );
    }

    /**
     * @dev Change swap status.
     */
    function _changeStatus(Status _newStatus) internal {
        emit StatusUpdate(status, _newStatus);
        status = _newStatus;
    }

    /**
     * @dev Check if every token has lockup period.
     */
    function _doesEveryTokenHaveLockupPeriod() internal view returns(bool) {
        for (uint256 i = 0; i < participants.length; i++) {
            address token = tokenByParticipant[participants[i]];

            if (lockupStagesByToken[token].length == 0) {
                return false;
            }
        }

        return true;
    }

    /**
     * @dev Check whether every participant has deposited enough tokens for the swap to be confirmed.
     */
    function _haveEveryoneDeposited() internal view returns(bool) {
        for (uint i = 0; i < participants.length; i++) {
            address token = tokenByParticipant[participants[i]];
            SwapOffer memory offer = offerByToken[token];

            if (offer.token.balanceOf(address(this)) < offer.tokensTotal) {
                return false;
            }
        }

        return true;
    }

    /**
     * @dev Start lockup period
     */
    function _startLockup() internal {
        startLockupAt = now;
        emit StartLockup(startLockupAt);
    }

    /**
     * @dev Find amount of tokens ready to be withdrawn by a swap party.
     */
    function _withdrawableAmount(SwapOffer _offer) internal view returns(uint256) {
        return _unlockedAmount(
            _offer.token,
            _offer.tokensForSwap
        ).sub(
            _offer.withdrawnTokensForSwap
        );
    }

    /**
     * @dev Find amount of tokens ready to be withdrawn as the swap fee.
     */
    function _withdrawableFee(SwapOffer _offer) internal view returns(uint256) {
        return _unlockedAmount(
            _offer.token,
            _offer.tokensFee
        ).sub(
            _offer.withdrawnFee
        );
    }

    /**
     * @dev Find amount of unlocked tokens, including withdrawn tokens.
     */
    function _unlockedAmount(ERC20 _token, uint256 _totalAmount) internal view returns(uint256) {
        return _totalAmount.mul(_getUnlockedTokensPercentage(_token)).div(100);
    }

    /**
     * @dev Get percent of unlocked tokens
     */
    function _getUnlockedTokensPercentage(ERC20 _token) internal view returns(uint256) {
        for (uint256 i = lockupStagesByToken[_token].length; i > 0; i--) {
            LockupStage storage stage = lockupStagesByToken[_token][i - 1];
            uint256 stageBecomesActiveAt = startLockupAt.add(stage.secondsSinceLockupStart);

            if (now < stageBecomesActiveAt) {
                continue;
            }

            return stage.unlockedTokensPercentage;
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"owners","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwners","type":"address[]"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"status","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allOperationsCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"howManyOwnersDecide","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"wallet","type":"address"}],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_secondsSinceLockupStart","type":"uint256[]"},{"name":"_unlockedTokensPercentages","type":"uint8[]"}],"name":"addLockupPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"allOperations","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"votesMaskByOperation","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"confirmParties","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"reclaim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"operation","type":"bytes32"}],"name":"cancelPending","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"votesCountByOperation","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"cancelSwap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ownersGeneration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ownersCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"confirmSwap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ownersIndices","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_participant","type":"address"},{"name":"_token","type":"address"},{"name":"_tokensForSwap","type":"uint256"},{"name":"_tokensFee","type":"uint256"},{"name":"_tokensTotal","type":"uint256"}],"name":"addParty","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwners","type":"address[]"},{"name":"newHowManyOwnersDecide","type":"uint256"}],"name":"transferOwnershipWithHowMany","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"allOperationsIndicies","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldStatus","type":"uint8"},{"indexed":false,"name":"newStatus","type":"uint8"}],"name":"StatusUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"participant","type":"address"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"tokensForSwap","type":"uint256"},{"indexed":false,"name":"tokensFee","type":"uint256"},{"indexed":false,"name":"tokensTotal","type":"uint256"}],"name":"AddParty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"secondsSinceLockupStart","type":"uint256"},{"indexed":false,"name":"unlockedTokensPercentage","type":"uint8"}],"name":"AddLockupStage","type":"event"},{"anonymous":false,"inputs":[],"name":"ConfirmParties","type":"event"},{"anonymous":false,"inputs":[],"name":"CancelSwap","type":"event"},{"anonymous":false,"inputs":[],"name":"ConfirmSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"startLockupAt","type":"uint256"}],"name":"StartLockup","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"participant","type":"address"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"WithdrawFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"participant","type":"address"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Reclaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousOwners","type":"address[]"},{"indexed":false,"name":"howManyOwnersDecide","type":"uint256"},{"indexed":false,"name":"newOwners","type":"address[]"},{"indexed":false,"name":"newHowManyOwnersDecide","type":"uint256"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"howMany","type":"uint256"},{"indexed":false,"name":"ownersCount","type":"uint256"},{"indexed":false,"name":"proposer","type":"address"}],"name":"OperationCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"votes","type":"uint256"},{"indexed":false,"name":"howMany","type":"uint256"},{"indexed":false,"name":"ownersCount","type":"uint256"},{"indexed":false,"name":"upvoter","type":"address"}],"name":"OperationUpvoted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"howMany","type":"uint256"},{"indexed":false,"name":"ownersCount","type":"uint256"},{"indexed":false,"name":"performer","type":"address"}],"name":"OperationPerformed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"votes","type":"uint256"},{"indexed":false,"name":"ownersCount","type":"uint256"},{"indexed":false,"name":"downvoter","type":"address"}],"name":"OperationDownvoted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"lastCanceller","type":"address"}],"name":"OperationCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

60806040908152600b805460ff191690556000805433600160a060020a0319918216811783556003805460018181019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805490931682179092558252600760205291812082905560029190915561365590819061008090396000f3006080604052600436106101455763ffffffff60e060020a600035041663025e7c27811461014a57806318bcd3d01461017e578063200d2ed2146101d557806322f2f89a1461020e5780632f4a81df146102355780632f54bf6e1461024a5780632fe65b511461027f5780633ccfd60b146102b8578063431ab233146102cd578063568b5915146102e55780636b5c8fba146102fd578063715018a61461031257806380e9071b14610327578063893372ca1461033c5780638da5cb5b1461035457806390a53085146103695780639e0fdb2614610381578063b25bb3a714610396578063b9488546146103ab578063c0ee0b8a146103c0578063cb9854a214610429578063cc047a041461043e578063d9cd87451461045f578063e85183411461048f578063e941fa78146104e6578063ea1a2644146104fb578063f2fde38b14610513575b600080fd5b34801561015657600080fd5b50610162600435610534565b60408051600160a060020a039092168252519081900360200190f35b34801561018a57600080fd5b50604080516020600480358082013583810280860185019096528085526101d39536959394602494938501929182918501908490808284375094975061055c9650505050505050565b005b3480156101e157600080fd5b506101ea61056a565b604051808260038111156101fa57fe5b60ff16815260200191505060405180910390f35b34801561021a57600080fd5b50610223610573565b60408051918252519081900360200190f35b34801561024157600080fd5b5061022361057a565b34801561025657600080fd5b5061026b600160a060020a0360043516610580565b604080519115158252519081900360200190f35b34801561028b57600080fd5b506101d360048035600160a060020a0316906024803580820192908101359160443590810191013561059c565b3480156102c457600080fd5b506101d3610898565b3480156102d957600080fd5b50610223600435610bcd565b3480156102f157600080fd5b50610223600435610bec565b34801561030957600080fd5b506101d3610bfe565b34801561031e57600080fd5b506101d3610e9d565b34801561033357600080fd5b506101d3610efc565b34801561034857600080fd5b506101d36004356111c9565b34801561036057600080fd5b50610162611395565b34801561037557600080fd5b506102236004356113a4565b34801561038d57600080fd5b506101d36113b6565b3480156103a257600080fd5b506102236114d4565b3480156103b757600080fd5b506102236114da565b3480156103cc57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101d3948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506114e09650505050505050565b34801561043557600080fd5b506101d36114e5565b34801561044a57600080fd5b50610223600160a060020a0360043516611671565b34801561046b57600080fd5b506101d3600160a060020a0360043581169060243516604435606435608435611683565b34801561049b57600080fd5b50604080516020600480358082013583810280860185019096528085526101d3953695939460249493850192918291850190849080828437509497505093359450611c299350505050565b3480156104f257600080fd5b506101d3612160565b34801561050757600080fd5b506102236004356123da565b34801561051f57600080fd5b506101d3600160a060020a03600435166123ec565b600380548290811061054257fe5b600091825260209091200154600160a060020a0316905081565b610567818251611c29565b50565b600b5460ff1681565b6004545b90565b60025481565b600160a060020a03166000908152600760205260408120541190565b60008054600160a060020a031633146105b457600080fd5b6000600b5460ff1660038111156105c757fe5b14610642576040805160e560020a62461bcd02815260206004820152603160248201527f556e61626c6520746f20616464206c6f636b757020706572696f6420696e207460448201527f68652063757272656e7420737461747573000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03861615156106a2576040805160e560020a62461bcd02815260206004820152600d60248201527f496e76616c696420746f6b656e00000000000000000000000000000000000000604482015290519081900360640190fd5b8382146106f9576040805160e560020a62461bcd02815260206004820152601560248201527f496e76616c6964206c6f636b757020706572696f640000000000000000000000604482015290519081900360640190fd5b600160a060020a0386166000908152600d60205260409020541561078d576040805160e560020a62461bcd02815260206004820152603360248201527f4c6f636b757020706572696f6420666f72207468697320746f6b656e2068617360448201527f206265656e20616464656420616c726561647900000000000000000000000000606482015290519081900360840190fd5b600160a060020a03868116600090815260116020526040902060010154161515610827576040805160e560020a62461bcd02815260206004820152602660248201527f5468657265206973206e6f2073776170206f666665722077697468207468697360448201527f20746f6b656e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b5060005b838110156108875761087f866040805190810160405280888886818110151561085057fe5b905060200201358152602001868686818110151561086a57fe5b9050602002013560ff1660ff16815250612659565b60010161082b565b610890866126fa565b505050505050565b336000908152600f6020526040812054819081908190819060ff161515600114610932576040805160e560020a62461bcd02815260206004820152603160248201527f4f6e6c792073776170207061727469636970616e747320616c6c6f776564207460448201527f6f2063616c6c20746865206d6574686f64000000000000000000000000000000606482015290519081900360840190fd5b6002600b5460ff16600381111561094557fe5b146109c0576040805160e560020a62461bcd02815260206004820152602f60248201527f556e61626c6520746f20776974686472617720746f6b656e7320696e2074686560448201527f2063757272656e74207374617475730000000000000000000000000000000000606482015290519081900360840190fd5b600c541515610a19576040805160e560020a62461bcd02815260206004820152601b60248201527f4c6f636b757020686173206e6f74206265656e20737461727465640000000000604482015290519081900360640190fd5b600094505b600e54851015610bc65760106000600e87815481101515610a3b57fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822054841680835260119091529190208054919650945016331415610a8657610bbb565b600e5460408051610100810182528554600160a060020a03908116825260018701541660208201526002860154918101919091526003850154606082015260048501546080820152600585015460a0820152600685015460c0820152600785015460e08201526000199091019250610b0f908390610b0390612aa4565b9063ffffffff612ad216565b90506000811115610bbb576003830154610b2f908263ffffffff612ae716565b60038401556007830154610b49908263ffffffff612ae716565b60078401556001830154610b6d90600160a060020a0316338363ffffffff612af416565b600183015460408051338152600160a060020a039092166020830152818101839052517f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9181900360600190a15b600190940193610a1e565b5050505050565b6004805482908110610bdb57fe5b600091825260209091200154905081565b60096020526000908152604090205481565b6000805460609190600160a060020a03163314610c1a57600080fd5b6000600b5460ff166003811115610c2d57fe5b14610ca8576040805160e560020a62461bcd02815260206004820152602f60248201527f556e61626c6520746f20636f6e6669726d207061727469657320696e2074686560448201527f2063757272656e74207374617475730000000000000000000000000000000000606482015290519081900360840190fd5b600e54600110610d02576040805160e560020a62461bcd02815260206004820152601e60248201527f4e656564206174206c656173742074776f207061727469636970616e74730000604482015290519081900360640190fd5b610d0a612b0a565b1515610d86576040805160e560020a62461bcd02815260206004820152602260248201527f4561636820746f6b656e206d7573742068617665206c6f636b7570207065726960448201527f6f64000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600e80549050600101604051908082528060200260200182016040528015610db8578160200160208202803883390190505b509150600090505b600e54811015610e1d57600e805482908110610dd857fe5b6000918252602090912001548251600160a060020a0390911690839083908110610dfe57fe5b600160a060020a03909216602092830290910190910152600101610dc0565b6000548251600160a060020a039091169083906000198101908110610e3e57fe5b600160a060020a039092166020928302909101909101528151610e6690839060001901611c29565b610e706001612b8a565b6040517f26c525803d694de741a70bec028464c92dcd50f658c7c92a2227a0253772684890600090a15050565b600054600160a060020a03163314610eb457600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a260008054600160a060020a0319169055565b336000908152600f6020526040812054819081908190819060ff161515600114610f96576040805160e560020a62461bcd02815260206004820152603160248201527f4f6e6c792073776170207061727469636970616e747320616c6c6f776564207460448201527f6f2063616c6c20746865206d6574686f64000000000000000000000000000000606482015290519081900360840190fd5b6002600b5460ff166003811115610fa957fe5b1480610fc557506003600b5460ff166003811115610fc357fe5b145b1515611041576040805160e560020a62461bcd02815260206004820152602760248201527f556e61626c6520746f207265636c61696d20696e207468652063757272656e7460448201527f2073746174757300000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b33600090815260106020908152604080832054600160a060020a0390811680855260118452828520600181015484517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529451929b50909950909116936370a0823193602480850194919392918390030190829087803b1580156110cb57600080fd5b505af11580156110df573d6000803e3d6000fd5b505050506040513d60208110156110f557600080fd5b505192508291506003600b5460ff16600381111561110f57fe5b14611142576007840154600685015461112d9163ffffffff612c0e16565b905061113f838263ffffffff612c0e16565b91505b600082111561116f578354600185015461116f91600160a060020a0391821691168463ffffffff612af416565b8354600185015460408051600160a060020a03938416815291909216602082015280820184905290517f1944597efffa5395bb42ab0e1da7a3d8027507d9502fd1b9936ab33a7519813a9181900360600190a15050505050565b60008060006111d86001612c20565b1561138f5750600554600160a060020a03161580156112095760058054600160a060020a0319163317905560016006555b336000908152600760209081526040808320548784526009909252909120546000199091019350600284900a1615156112b2576040805160e560020a62461bcd02815260206004820152603060248201527f63616e63656c50656e64696e673a206f7065726174696f6e206e6f7420666f7560448201527f6e6420666f722074686973207573657200000000000000000000000000000000606482015290519081900360840190fd5b60008481526009602090815260408083208054600288900a19169055600a8252918290208054600019019081905560035483518881529283018290528284015233606083015291519193507f3e0a7036018b5a2a3c5d0afa14e51998ef3cf98c38e4289a8897222b3acf75a7919081900360800190a18115156113735761133884612fd0565b6040805185815233602082015281517f55e0dd61c29aac6fc36807628300ad3e3ec68655ae76ae4002f7fb101496fa9f929181900390910190a15b801561138f5760058054600160a060020a031916905560006006555b50505050565b600054600160a060020a031681565b600a6020526000908152604090205481565b6001600b5460ff1660038111156113c957fe5b14611444576040805160e560020a62461bcd02815260206004820152602b60248201527f556e61626c6520746f2063616e63656c207377617020696e207468652063757260448201527f72656e7420737461747573000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000611451600254612c20565b156105675750600554600160a060020a03161580156114835760058054600160a060020a031916331790556002546006555b6040517fd14f3a9f535050c03faa54fd09ef49df9a9cb2272f4fee04f8f8ea5fdaa1096590600090a16114b66003612b8a565b80156105675760058054600160a060020a0319169055600060065550565b60015481565b60035490565b505050565b6001600b5460ff1660038111156114f857fe5b14611573576040805160e560020a62461bcd02815260206004820152602760248201527f556e61626c6520746f20636f6e6669726d20696e207468652063757272656e7460448201527f2073746174757300000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61157b613099565b15156115f7576040805160e560020a62461bcd02815260206004820152603f60248201527f556e61626c6520746f20636f6e6669726d2073776170206265666f726520616c60448201527f6c20706172746965732068617665206465706f736974656420746f6b656e7300606482015290519081900360840190fd5b6000611604600254612c20565b156105675750600554600160a060020a03161580156116365760058054600160a060020a031916331790556002546006555b6040517fa9e7939eb597f24e4e67d7ab0e9a9b28a4a79ae9ef2aea7d04856341cfa585a690600090a16116696002612b8a565b6114b6613206565b60076020526000908152604090205481565b61168b6134d7565b600054600160a060020a031633146116a257600080fd5b6000600b5460ff1660038111156116b557fe5b14611730576040805160e560020a62461bcd02815260206004820152602f60248201527f556e61626c6520746f20616464206e6577207061727469657320696e2074686560448201527f2063757272656e74207374617475730000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0386161515611790576040805160e560020a62461bcd02815260206004820152601f60248201527f5f7061727469636970616e7420697320696e76616c6964206164647265737300604482015290519081900360640190fd5b600160a060020a03851615156117f0576040805160e560020a62461bcd02815260206004820152601960248201527f5f746f6b656e20697320696e76616c6964206164647265737300000000000000604482015290519081900360640190fd5b60008411611848576040805160e560020a62461bcd02815260206004820152601f60248201527f5f746f6b656e73466f7253776170206d75737420626520706f73697469766500604482015290519081900360640190fd5b600083116118a0576040805160e560020a62461bcd02815260206004820152601b60248201527f5f746f6b656e73466565206d75737420626520706f7369746976650000000000604482015290519081900360640190fd5b6118b0848463ffffffff612ae716565b8214611906576040805160e560020a62461bcd02815260206004820152601b60248201527f746f6b656e20616d6f756e747320696e636f6e73697374656e63790000000000604482015290519081900360640190fd5b600160a060020a0386166000908152600f602052604090205460ff161561199d576040805160e560020a62461bcd02815260206004820152602b60248201527f556e61626c6520746f20616464207468652073616d65207061727479206d756c60448201527f7469706c652074696d6573000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001600f600088600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506101006040519081016040528087600160a060020a0316815260200186600160a060020a03168152602001858152602001600081526020018481526020016000815260200183815260200160008152509050600e816000015190806001815401808255809150509060018203906000526020600020016000909192909190916101000a815481600160a060020a030219169083600160a060020a031602179055505080601160008360200151600160a060020a0316600160a060020a0316815260200190815260200160002060008201518160000160006101000a815481600160a060020a030219169083600160a060020a0316021790555060208201518160010160006101000a815481600160a060020a030219169083600160a060020a0316021790555060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701559050508060200151601060008360000151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a815481600160a060020a030219169083600160a060020a031602179055507f47aac1343ab33956045a152daa25205affe7452210b05cdf4b8f9d313a58a96381600001518260200151836040015184608001518560c001516040518086600160a060020a0316600160a060020a0316815260200185600160a060020a0316600160a060020a031681526020018481526020018381526020018281526020019550505050505060405180910390a1505050505050565b6000806000611c39600254612c20565b15610bc65750600554600160a060020a0316158015611c6b5760058054600160a060020a031916331790556002546006555b8451600010611cd8576040805160e560020a62461bcd028152602060048201526033602482015260008051602061360a83398151915260448201527f6e65727320617272617920697320656d70747900000000000000000000000000606482015290519081900360840190fd5b84516101001015611d47576040805160e560020a62461bcd02815260206004820152603e602482015260008051602061360a83398151915260448201527f6e65727320636f756e742069732067726561746572207468656e203235360000606482015290519081900360840190fd5b60008411611dc5576040805160e560020a62461bcd02815260206004820152603f60248201527f7472616e736665724f776e65727368697057697468486f774d616e793a206e6560448201527f77486f774d616e794f776e65727344656369646520657175616c20746f203000606482015290519081900360840190fd5b8451841115611e6a576040805160e560020a62461bcd02815260206004820152605160248201527f7472616e736665724f776e65727368697057697468486f774d616e793a206e6560448201527f77486f774d616e794f776e65727344656369646520657863656564732074686560648201527f206e756d626572206f66206f776e657273000000000000000000000000000000608482015290519081900360a40190fd5b600092505b600354831015611ebd5760076000600385815481101515611e8c57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400181205560019290920191611e6f565b600091505b845182101561203b578451600090869084908110611edc57fe5b60209081029091010151600160a060020a03161415611f59576040805160e560020a62461bcd028152602060048201526038602482015260008051602061360a83398151915260448201527f6e65727320617272617920636f6e7461696e73207a65726f0000000000000000606482015290519081900360840190fd5b600760008684815181101515611f6b57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205415611ff7576040805160e560020a62461bcd02815260206004820152603e602482015260008051602061360a83398151915260448201527f6e65727320617272617920636f6e7461696e73206475706c6963617465730000606482015290519081900360840190fd5b8160010160076000878581518110151561200d57fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055600190910190611ec2565b7fd167b96814cd24898418cc293e8d47d54afe6dcf0631283f0830e1eae621f6bd6003600254878760405180806020018581526020018060200184815260200183810383528781815481526020019150805480156120c257602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116120a4575b50508381038252855181528551602091820191808801910280838360005b838110156120f85781810151838201526020016120e0565b50505050905001965050505050505060405180910390a1845161212290600390602088019061352f565b5060028490556000612135600482613590565b5060018054810190558015610bc65760058054600160a060020a031916905560006006555050505050565b60008054819081908190600160a060020a0316331461217e57600080fd5b6002600b5460ff16600381111561219157fe5b1461220c576040805160e560020a62461bcd02815260206004820152602c60248201527f556e61626c6520746f2077697468647261772066656520696e2074686520637560448201527f7272656e74207374617475730000000000000000000000000000000000000000606482015290519081900360840190fd5b600c541515612265576040805160e560020a62461bcd02815260206004820152601b60248201527f4c6f636b757020686173206e6f74206265656e20737461727465640000000000604482015290519081900360640190fd5b600093505b600e5484101561138f5760106000600e8681548110151561228757fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822054841680835260118252918390208351610100810185528154861681526001820154909516918501919091526002810154928401929092526003820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e08401529450925061232790613240565b905060008111156123cf576005820154612347908263ffffffff612ae716565b60058301556007820154612361908263ffffffff612ae716565b6007830155600182015461238590600160a060020a0316338363ffffffff612af416565b600182015460408051600160a060020a0390921682526020820183905280517f66bf9186b00db666fc37aaffbb95a050c66e599e000c785c1dff0467d868f1b19281900390910190a15b60019093019261226a565b60086020526000908152604090205481565b600054606090600160a060020a0316331461240657600080fd5b6000600b5460ff16600381111561241957fe5b14612494576040805160e560020a62461bcd02815260206004820152603260248201527f556e61626c6520746f207472616e73666572206f776e65727368697020696e2060448201527f7468652063757272656e74207374617475730000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03821615156124f4576040805160e560020a62461bcd02815260206004820152601c60248201527f5f6e65774f776e657220697320696e76616c6964206164647265737300000000604482015290519081900360640190fd5b600354600114612574576040805160e560020a62461bcd02815260206004820152603760248201527f556e61626c6520746f207472616e73666572206f776e65727368697020696e2060448201527f70726573656e6365206f66206d756c74696f776e657273000000000000000000606482015290519081900360840190fd5b6000805460038054600160a060020a03909216929091811061259257fe5b600091825260209091200154600160a060020a0316146125fc576040805160e560020a62461bcd02815260206004820152601c60248201527f556e6578706563746564206d756c74696f776e65727320737461746500000000604482015290519081900360640190fd5b60408051600180825281830190925290602080830190803883390190505090508181600081518110151561262c57fe5b600160a060020a0390921660209283029091019091015261264c8261325c565b6126558161055c565b5050565b805160208083015160408051600160a060020a03871681529283019390935260ff168183015290517fe3f45213c2d953ffaf09f1b18dc1aaf8cc33901b3616582989b366c6a8d329389181900360600190a1600160a060020a03919091166000908152600d6020908152604082208054600180820183559184529282902084516002909402019283559201519101805460ff191660ff909216919091179055565b6000806127056135b4565b61270d6135b4565b600160a060020a0385166000908152600d60205260408120945092505b83548310156129fe57838381548110151561274157fe5b6000918252602080832060408051808201909152600290930201805483526001015460ff1690820181905290935010156127eb576040805160e560020a62461bcd02815260206004820152603960248201527f4c6f636b757053746167652e756e6c6f636b6564546f6b656e7350657263656e60448201527f74616765206d757374206e6f74206265206e6567617469766500000000000000606482015290519081900360840190fd5b6064826020015160ff1611151515612899576040805160e560020a62461bcd02815260206004820152604160248201527f4c6f636b757053746167652e756e6c6f636b6564546f6b656e7350657263656e60448201527f74616765206d757374206e6f742062652067726561746572207468616e20313060648201527f3000000000000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b8215156128a5576129f3565b83600184038154811015156128b657fe5b600091825260209182902060408051808201909152600290920201805480835260019091015460ff1692820192909252835190925011612966576040805160e560020a62461bcd02815260206004820152603f60248201527f4c6f636b757053746167652e7365636f6e647353696e63654c6f636b7570537460448201527f617274206d75737420696e637265617365206d6f6e6f746f6e6963616c6c7900606482015290519081900360840190fd5b806020015160ff16826020015160ff161115156129f3576040805160e560020a62461bcd02815260206004820152602481018290527f4c6f636b757053746167652e756e6c6f636b6564546f6b656e7350657263656e60448201527f74616765206d75737420696e637265617365206d6f6e6f746f6e6963616c6c79606482015290519081900360840190fd5b60019092019161272a565b835484906000198101908110612a1057fe5b600091825260209091206002909102016001015460ff16606414610bc6576040805160e560020a62461bcd02815260206004820152603060248201527f546865206c617374206c6f636b7570207374616765206d75737420756e6c6f6360448201527f6b2031303025206f6620746f6b656e7300000000000000000000000000000000606482015290519081900360840190fd5b6000612acc8260600151612ac08460200151856040015161327c565b9063ffffffff612c0e16565b92915050565b60008183811515612adf57fe5b049392505050565b81810182811015612acc57fe5b612aff8383836132a3565b15156114e057600080fd5b600080805b600e54821015612b805760106000600e84815481101515612b2c57fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822054909316808252600d90935220549091501515612b755760009250612b85565b600190910190612b0f565b600192505b505090565b600b546040517f0118cf41bb4b3c38ea0b9ebdfe726555fdefe08b9659f20c88336ae1b2c9b1af9160ff1690839080836003811115612bc557fe5b60ff168152602001826003811115612bd957fe5b60ff1681526020019250505060405180910390a1600b805482919060ff19166001836003811115612c0657fe5b021790555050565b600082821115612c1a57fe5b50900390565b600554600090819081908190600160a060020a0316331415612cec57600654851115612ce3576040805160e560020a62461bcd028152602060048201526044602482018190527f636865636b486f774d616e794f776e6572733a206e6573746564206f776e6572908201527f73206d6f64696669657220636865636b2072657175697265206d6f7265206f7760648201527f6e65727300000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b60019350612fc8565b3360009081526007602052604090205460035460001990910193508310612d83576040805160e560020a62461bcd02815260206004820152602e60248201527f636865636b486f774d616e794f776e6572733a206d73672e73656e646572206960448201527f73206e6f7420616e206f776e6572000000000000000000000000000000000000606482015290519081900360840190fd5b60003660015460405180848480828437919091019283525050604080516020928190038301902060008181526009909352912054909450600286900a16159150612e3f9050576040805160e560020a62461bcd02815260206004820152603960248201527f636865636b486f774d616e794f776e6572733a206f776e657220616c7265616460448201527f7920766f74656420666f7220746865206f7065726174696f6e00000000000000606482015290519081900360840190fd5b5060008181526009602090815260408083208054600287900a179055600a90915290208054600190810191829055811415612f0257600480546000848152600860209081526040808320849055600184018555939091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90910184905560035482518581529182018890528183015233606082015290517f6bab0114f9524353d2d33e64edd3ebbd16e21edd57de2226ba76c310a7ce22659181900360800190a15b60035460408051848152602081018490528082018890526060810192909252336080830152517f8dd9582c6577aea81973b5adeb6c135f6e18565d99578b7ba0c9377437ec02219181900360a00190a16000828152600a6020526040902054851415612fc357612f7182612fd0565b600354604080518481526020810188905280820192909252336060830152517f8a11c8ca99994c292318ce367f65bf6ff61d390bc814b3588496f6fbcc32807a9181900360800190a160019350612fc8565b600093505b505050919050565b6000818152600860205260409020546004546000190181101561305c57600480546000198101908110612fff57fe5b906000526020600020015460048281548110151561301957fe5b906000526020600020018160001916905550806008600060048481548110151561303f57fe5b600091825260208083209091015483528201929092526040019020555b600480549061306f906000198301613590565b50506000908152600960209081526040808320839055600a82528083208390556008909152812055565b60008060006130a66134d7565b600092505b600e548310156131fb5760106000600e858154811015156130c857fe5b6000918252602080832090910154600160a060020a0390811684528382019490945260409283018220548416808352601182528383208451610100810186528154871681526001820154909616868401819052600282015487870152600382015460608801526004808301546080890152600583015460a0890152600683015460c0890181905260079093015460e089015286517f70a082310000000000000000000000000000000000000000000000000000000081523091810191909152955192985095965094936370a082319360248083019493928390030190829087803b1580156131b557600080fd5b505af11580156131c9573d6000803e3d6000fd5b505050506040513d60208110156131df57600080fd5b505110156131f05760009350613200565b6001909201916130ab565b600193505b50505090565b42600c81905560408051918252517f6a9f15c2d65eab1e4a154679108dfc3304b4eca0f363ea0191e02294d544b9989181900360200190a1565b6000612acc8260a00151612ac08460200151856080015161327c565b600054600160a060020a0316331461327357600080fd5b61056781613367565b600061329c6064610b0361328f866133d7565b859063ffffffff61347716565b9392505050565b60006132ae846134a0565b15156132b957600080fd5b83600160a060020a031660405180807f7472616e7366657228616464726573732c75696e7432353629000000000000008152506019019050604051809103902060e060020a900484846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a03168152602001828152602001925050506000604051808303816000875af192505050151561335757600080fd5b61335f6134a8565b949350505050565b600160a060020a038116151561337c57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b600160a060020a0381166000908152600d602052604081205481805b6000831115612fc857600160a060020a0385166000908152600d602052604090208054600019850190811061342457fe5b9060005260206000209060020201915061344d8260000154600c54612ae790919063ffffffff16565b90508042101561345c5761346b565b600182015460ff169350612fc8565b600019909201916133f3565b600082151561348857506000612acc565b5081810281838281151561349857fe5b0414612acc57fe5b6000903b1190565b60003d80156134be57602081146134c757600080fd5b600191506134d3565b60206000803e60005191505b5090565b610100604051908101604052806000600160a060020a031681526020016000600160a060020a031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054828255906000526020600020908101928215613584579160200282015b828111156135845782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019061354f565b506134d39291506135cb565b8154818355818111156114e0576000838152602090206114e09181019083016135ef565b604080518082019091526000808252602082015290565b61057791905b808211156134d3578054600160a060020a03191681556001016135d1565b61057791905b808211156134d357600081556001016135f556007472616e736665724f776e65727368697057697468486f774d616e793a206f77a165627a7a72305820e79875faaea346603379e13fae168f3983ef0f9279b870ae25cce4a3369a33690029

Deployed Bytecode

0x6080604052600436106101455763ffffffff60e060020a600035041663025e7c27811461014a57806318bcd3d01461017e578063200d2ed2146101d557806322f2f89a1461020e5780632f4a81df146102355780632f54bf6e1461024a5780632fe65b511461027f5780633ccfd60b146102b8578063431ab233146102cd578063568b5915146102e55780636b5c8fba146102fd578063715018a61461031257806380e9071b14610327578063893372ca1461033c5780638da5cb5b1461035457806390a53085146103695780639e0fdb2614610381578063b25bb3a714610396578063b9488546146103ab578063c0ee0b8a146103c0578063cb9854a214610429578063cc047a041461043e578063d9cd87451461045f578063e85183411461048f578063e941fa78146104e6578063ea1a2644146104fb578063f2fde38b14610513575b600080fd5b34801561015657600080fd5b50610162600435610534565b60408051600160a060020a039092168252519081900360200190f35b34801561018a57600080fd5b50604080516020600480358082013583810280860185019096528085526101d39536959394602494938501929182918501908490808284375094975061055c9650505050505050565b005b3480156101e157600080fd5b506101ea61056a565b604051808260038111156101fa57fe5b60ff16815260200191505060405180910390f35b34801561021a57600080fd5b50610223610573565b60408051918252519081900360200190f35b34801561024157600080fd5b5061022361057a565b34801561025657600080fd5b5061026b600160a060020a0360043516610580565b604080519115158252519081900360200190f35b34801561028b57600080fd5b506101d360048035600160a060020a0316906024803580820192908101359160443590810191013561059c565b3480156102c457600080fd5b506101d3610898565b3480156102d957600080fd5b50610223600435610bcd565b3480156102f157600080fd5b50610223600435610bec565b34801561030957600080fd5b506101d3610bfe565b34801561031e57600080fd5b506101d3610e9d565b34801561033357600080fd5b506101d3610efc565b34801561034857600080fd5b506101d36004356111c9565b34801561036057600080fd5b50610162611395565b34801561037557600080fd5b506102236004356113a4565b34801561038d57600080fd5b506101d36113b6565b3480156103a257600080fd5b506102236114d4565b3480156103b757600080fd5b506102236114da565b3480156103cc57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101d3948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506114e09650505050505050565b34801561043557600080fd5b506101d36114e5565b34801561044a57600080fd5b50610223600160a060020a0360043516611671565b34801561046b57600080fd5b506101d3600160a060020a0360043581169060243516604435606435608435611683565b34801561049b57600080fd5b50604080516020600480358082013583810280860185019096528085526101d3953695939460249493850192918291850190849080828437509497505093359450611c299350505050565b3480156104f257600080fd5b506101d3612160565b34801561050757600080fd5b506102236004356123da565b34801561051f57600080fd5b506101d3600160a060020a03600435166123ec565b600380548290811061054257fe5b600091825260209091200154600160a060020a0316905081565b610567818251611c29565b50565b600b5460ff1681565b6004545b90565b60025481565b600160a060020a03166000908152600760205260408120541190565b60008054600160a060020a031633146105b457600080fd5b6000600b5460ff1660038111156105c757fe5b14610642576040805160e560020a62461bcd02815260206004820152603160248201527f556e61626c6520746f20616464206c6f636b757020706572696f6420696e207460448201527f68652063757272656e7420737461747573000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03861615156106a2576040805160e560020a62461bcd02815260206004820152600d60248201527f496e76616c696420746f6b656e00000000000000000000000000000000000000604482015290519081900360640190fd5b8382146106f9576040805160e560020a62461bcd02815260206004820152601560248201527f496e76616c6964206c6f636b757020706572696f640000000000000000000000604482015290519081900360640190fd5b600160a060020a0386166000908152600d60205260409020541561078d576040805160e560020a62461bcd02815260206004820152603360248201527f4c6f636b757020706572696f6420666f72207468697320746f6b656e2068617360448201527f206265656e20616464656420616c726561647900000000000000000000000000606482015290519081900360840190fd5b600160a060020a03868116600090815260116020526040902060010154161515610827576040805160e560020a62461bcd02815260206004820152602660248201527f5468657265206973206e6f2073776170206f666665722077697468207468697360448201527f20746f6b656e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b5060005b838110156108875761087f866040805190810160405280888886818110151561085057fe5b905060200201358152602001868686818110151561086a57fe5b9050602002013560ff1660ff16815250612659565b60010161082b565b610890866126fa565b505050505050565b336000908152600f6020526040812054819081908190819060ff161515600114610932576040805160e560020a62461bcd02815260206004820152603160248201527f4f6e6c792073776170207061727469636970616e747320616c6c6f776564207460448201527f6f2063616c6c20746865206d6574686f64000000000000000000000000000000606482015290519081900360840190fd5b6002600b5460ff16600381111561094557fe5b146109c0576040805160e560020a62461bcd02815260206004820152602f60248201527f556e61626c6520746f20776974686472617720746f6b656e7320696e2074686560448201527f2063757272656e74207374617475730000000000000000000000000000000000606482015290519081900360840190fd5b600c541515610a19576040805160e560020a62461bcd02815260206004820152601b60248201527f4c6f636b757020686173206e6f74206265656e20737461727465640000000000604482015290519081900360640190fd5b600094505b600e54851015610bc65760106000600e87815481101515610a3b57fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822054841680835260119091529190208054919650945016331415610a8657610bbb565b600e5460408051610100810182528554600160a060020a03908116825260018701541660208201526002860154918101919091526003850154606082015260048501546080820152600585015460a0820152600685015460c0820152600785015460e08201526000199091019250610b0f908390610b0390612aa4565b9063ffffffff612ad216565b90506000811115610bbb576003830154610b2f908263ffffffff612ae716565b60038401556007830154610b49908263ffffffff612ae716565b60078401556001830154610b6d90600160a060020a0316338363ffffffff612af416565b600183015460408051338152600160a060020a039092166020830152818101839052517f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9181900360600190a15b600190940193610a1e565b5050505050565b6004805482908110610bdb57fe5b600091825260209091200154905081565b60096020526000908152604090205481565b6000805460609190600160a060020a03163314610c1a57600080fd5b6000600b5460ff166003811115610c2d57fe5b14610ca8576040805160e560020a62461bcd02815260206004820152602f60248201527f556e61626c6520746f20636f6e6669726d207061727469657320696e2074686560448201527f2063757272656e74207374617475730000000000000000000000000000000000606482015290519081900360840190fd5b600e54600110610d02576040805160e560020a62461bcd02815260206004820152601e60248201527f4e656564206174206c656173742074776f207061727469636970616e74730000604482015290519081900360640190fd5b610d0a612b0a565b1515610d86576040805160e560020a62461bcd02815260206004820152602260248201527f4561636820746f6b656e206d7573742068617665206c6f636b7570207065726960448201527f6f64000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600e80549050600101604051908082528060200260200182016040528015610db8578160200160208202803883390190505b509150600090505b600e54811015610e1d57600e805482908110610dd857fe5b6000918252602090912001548251600160a060020a0390911690839083908110610dfe57fe5b600160a060020a03909216602092830290910190910152600101610dc0565b6000548251600160a060020a039091169083906000198101908110610e3e57fe5b600160a060020a039092166020928302909101909101528151610e6690839060001901611c29565b610e706001612b8a565b6040517f26c525803d694de741a70bec028464c92dcd50f658c7c92a2227a0253772684890600090a15050565b600054600160a060020a03163314610eb457600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a260008054600160a060020a0319169055565b336000908152600f6020526040812054819081908190819060ff161515600114610f96576040805160e560020a62461bcd02815260206004820152603160248201527f4f6e6c792073776170207061727469636970616e747320616c6c6f776564207460448201527f6f2063616c6c20746865206d6574686f64000000000000000000000000000000606482015290519081900360840190fd5b6002600b5460ff166003811115610fa957fe5b1480610fc557506003600b5460ff166003811115610fc357fe5b145b1515611041576040805160e560020a62461bcd02815260206004820152602760248201527f556e61626c6520746f207265636c61696d20696e207468652063757272656e7460448201527f2073746174757300000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b33600090815260106020908152604080832054600160a060020a0390811680855260118452828520600181015484517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529451929b50909950909116936370a0823193602480850194919392918390030190829087803b1580156110cb57600080fd5b505af11580156110df573d6000803e3d6000fd5b505050506040513d60208110156110f557600080fd5b505192508291506003600b5460ff16600381111561110f57fe5b14611142576007840154600685015461112d9163ffffffff612c0e16565b905061113f838263ffffffff612c0e16565b91505b600082111561116f578354600185015461116f91600160a060020a0391821691168463ffffffff612af416565b8354600185015460408051600160a060020a03938416815291909216602082015280820184905290517f1944597efffa5395bb42ab0e1da7a3d8027507d9502fd1b9936ab33a7519813a9181900360600190a15050505050565b60008060006111d86001612c20565b1561138f5750600554600160a060020a03161580156112095760058054600160a060020a0319163317905560016006555b336000908152600760209081526040808320548784526009909252909120546000199091019350600284900a1615156112b2576040805160e560020a62461bcd02815260206004820152603060248201527f63616e63656c50656e64696e673a206f7065726174696f6e206e6f7420666f7560448201527f6e6420666f722074686973207573657200000000000000000000000000000000606482015290519081900360840190fd5b60008481526009602090815260408083208054600288900a19169055600a8252918290208054600019019081905560035483518881529283018290528284015233606083015291519193507f3e0a7036018b5a2a3c5d0afa14e51998ef3cf98c38e4289a8897222b3acf75a7919081900360800190a18115156113735761133884612fd0565b6040805185815233602082015281517f55e0dd61c29aac6fc36807628300ad3e3ec68655ae76ae4002f7fb101496fa9f929181900390910190a15b801561138f5760058054600160a060020a031916905560006006555b50505050565b600054600160a060020a031681565b600a6020526000908152604090205481565b6001600b5460ff1660038111156113c957fe5b14611444576040805160e560020a62461bcd02815260206004820152602b60248201527f556e61626c6520746f2063616e63656c207377617020696e207468652063757260448201527f72656e7420737461747573000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000611451600254612c20565b156105675750600554600160a060020a03161580156114835760058054600160a060020a031916331790556002546006555b6040517fd14f3a9f535050c03faa54fd09ef49df9a9cb2272f4fee04f8f8ea5fdaa1096590600090a16114b66003612b8a565b80156105675760058054600160a060020a0319169055600060065550565b60015481565b60035490565b505050565b6001600b5460ff1660038111156114f857fe5b14611573576040805160e560020a62461bcd02815260206004820152602760248201527f556e61626c6520746f20636f6e6669726d20696e207468652063757272656e7460448201527f2073746174757300000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61157b613099565b15156115f7576040805160e560020a62461bcd02815260206004820152603f60248201527f556e61626c6520746f20636f6e6669726d2073776170206265666f726520616c60448201527f6c20706172746965732068617665206465706f736974656420746f6b656e7300606482015290519081900360840190fd5b6000611604600254612c20565b156105675750600554600160a060020a03161580156116365760058054600160a060020a031916331790556002546006555b6040517fa9e7939eb597f24e4e67d7ab0e9a9b28a4a79ae9ef2aea7d04856341cfa585a690600090a16116696002612b8a565b6114b6613206565b60076020526000908152604090205481565b61168b6134d7565b600054600160a060020a031633146116a257600080fd5b6000600b5460ff1660038111156116b557fe5b14611730576040805160e560020a62461bcd02815260206004820152602f60248201527f556e61626c6520746f20616464206e6577207061727469657320696e2074686560448201527f2063757272656e74207374617475730000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0386161515611790576040805160e560020a62461bcd02815260206004820152601f60248201527f5f7061727469636970616e7420697320696e76616c6964206164647265737300604482015290519081900360640190fd5b600160a060020a03851615156117f0576040805160e560020a62461bcd02815260206004820152601960248201527f5f746f6b656e20697320696e76616c6964206164647265737300000000000000604482015290519081900360640190fd5b60008411611848576040805160e560020a62461bcd02815260206004820152601f60248201527f5f746f6b656e73466f7253776170206d75737420626520706f73697469766500604482015290519081900360640190fd5b600083116118a0576040805160e560020a62461bcd02815260206004820152601b60248201527f5f746f6b656e73466565206d75737420626520706f7369746976650000000000604482015290519081900360640190fd5b6118b0848463ffffffff612ae716565b8214611906576040805160e560020a62461bcd02815260206004820152601b60248201527f746f6b656e20616d6f756e747320696e636f6e73697374656e63790000000000604482015290519081900360640190fd5b600160a060020a0386166000908152600f602052604090205460ff161561199d576040805160e560020a62461bcd02815260206004820152602b60248201527f556e61626c6520746f20616464207468652073616d65207061727479206d756c60448201527f7469706c652074696d6573000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001600f600088600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506101006040519081016040528087600160a060020a0316815260200186600160a060020a03168152602001858152602001600081526020018481526020016000815260200183815260200160008152509050600e816000015190806001815401808255809150509060018203906000526020600020016000909192909190916101000a815481600160a060020a030219169083600160a060020a031602179055505080601160008360200151600160a060020a0316600160a060020a0316815260200190815260200160002060008201518160000160006101000a815481600160a060020a030219169083600160a060020a0316021790555060208201518160010160006101000a815481600160a060020a030219169083600160a060020a0316021790555060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701559050508060200151601060008360000151600160a060020a0316600160a060020a0316815260200190815260200160002060006101000a815481600160a060020a030219169083600160a060020a031602179055507f47aac1343ab33956045a152daa25205affe7452210b05cdf4b8f9d313a58a96381600001518260200151836040015184608001518560c001516040518086600160a060020a0316600160a060020a0316815260200185600160a060020a0316600160a060020a031681526020018481526020018381526020018281526020019550505050505060405180910390a1505050505050565b6000806000611c39600254612c20565b15610bc65750600554600160a060020a0316158015611c6b5760058054600160a060020a031916331790556002546006555b8451600010611cd8576040805160e560020a62461bcd028152602060048201526033602482015260008051602061360a83398151915260448201527f6e65727320617272617920697320656d70747900000000000000000000000000606482015290519081900360840190fd5b84516101001015611d47576040805160e560020a62461bcd02815260206004820152603e602482015260008051602061360a83398151915260448201527f6e65727320636f756e742069732067726561746572207468656e203235360000606482015290519081900360840190fd5b60008411611dc5576040805160e560020a62461bcd02815260206004820152603f60248201527f7472616e736665724f776e65727368697057697468486f774d616e793a206e6560448201527f77486f774d616e794f776e65727344656369646520657175616c20746f203000606482015290519081900360840190fd5b8451841115611e6a576040805160e560020a62461bcd02815260206004820152605160248201527f7472616e736665724f776e65727368697057697468486f774d616e793a206e6560448201527f77486f774d616e794f776e65727344656369646520657863656564732074686560648201527f206e756d626572206f66206f776e657273000000000000000000000000000000608482015290519081900360a40190fd5b600092505b600354831015611ebd5760076000600385815481101515611e8c57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400181205560019290920191611e6f565b600091505b845182101561203b578451600090869084908110611edc57fe5b60209081029091010151600160a060020a03161415611f59576040805160e560020a62461bcd028152602060048201526038602482015260008051602061360a83398151915260448201527f6e65727320617272617920636f6e7461696e73207a65726f0000000000000000606482015290519081900360840190fd5b600760008684815181101515611f6b57fe5b6020908102909101810151600160a060020a031682528101919091526040016000205415611ff7576040805160e560020a62461bcd02815260206004820152603e602482015260008051602061360a83398151915260448201527f6e65727320617272617920636f6e7461696e73206475706c6963617465730000606482015290519081900360840190fd5b8160010160076000878581518110151561200d57fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055600190910190611ec2565b7fd167b96814cd24898418cc293e8d47d54afe6dcf0631283f0830e1eae621f6bd6003600254878760405180806020018581526020018060200184815260200183810383528781815481526020019150805480156120c257602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116120a4575b50508381038252855181528551602091820191808801910280838360005b838110156120f85781810151838201526020016120e0565b50505050905001965050505050505060405180910390a1845161212290600390602088019061352f565b5060028490556000612135600482613590565b5060018054810190558015610bc65760058054600160a060020a031916905560006006555050505050565b60008054819081908190600160a060020a0316331461217e57600080fd5b6002600b5460ff16600381111561219157fe5b1461220c576040805160e560020a62461bcd02815260206004820152602c60248201527f556e61626c6520746f2077697468647261772066656520696e2074686520637560448201527f7272656e74207374617475730000000000000000000000000000000000000000606482015290519081900360840190fd5b600c541515612265576040805160e560020a62461bcd02815260206004820152601b60248201527f4c6f636b757020686173206e6f74206265656e20737461727465640000000000604482015290519081900360640190fd5b600093505b600e5484101561138f5760106000600e8681548110151561228757fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822054841680835260118252918390208351610100810185528154861681526001820154909516918501919091526002810154928401929092526003820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e08401529450925061232790613240565b905060008111156123cf576005820154612347908263ffffffff612ae716565b60058301556007820154612361908263ffffffff612ae716565b6007830155600182015461238590600160a060020a0316338363ffffffff612af416565b600182015460408051600160a060020a0390921682526020820183905280517f66bf9186b00db666fc37aaffbb95a050c66e599e000c785c1dff0467d868f1b19281900390910190a15b60019093019261226a565b60086020526000908152604090205481565b600054606090600160a060020a0316331461240657600080fd5b6000600b5460ff16600381111561241957fe5b14612494576040805160e560020a62461bcd02815260206004820152603260248201527f556e61626c6520746f207472616e73666572206f776e65727368697020696e2060448201527f7468652063757272656e74207374617475730000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03821615156124f4576040805160e560020a62461bcd02815260206004820152601c60248201527f5f6e65774f776e657220697320696e76616c6964206164647265737300000000604482015290519081900360640190fd5b600354600114612574576040805160e560020a62461bcd02815260206004820152603760248201527f556e61626c6520746f207472616e73666572206f776e65727368697020696e2060448201527f70726573656e6365206f66206d756c74696f776e657273000000000000000000606482015290519081900360840190fd5b6000805460038054600160a060020a03909216929091811061259257fe5b600091825260209091200154600160a060020a0316146125fc576040805160e560020a62461bcd02815260206004820152601c60248201527f556e6578706563746564206d756c74696f776e65727320737461746500000000604482015290519081900360640190fd5b60408051600180825281830190925290602080830190803883390190505090508181600081518110151561262c57fe5b600160a060020a0390921660209283029091019091015261264c8261325c565b6126558161055c565b5050565b805160208083015160408051600160a060020a03871681529283019390935260ff168183015290517fe3f45213c2d953ffaf09f1b18dc1aaf8cc33901b3616582989b366c6a8d329389181900360600190a1600160a060020a03919091166000908152600d6020908152604082208054600180820183559184529282902084516002909402019283559201519101805460ff191660ff909216919091179055565b6000806127056135b4565b61270d6135b4565b600160a060020a0385166000908152600d60205260408120945092505b83548310156129fe57838381548110151561274157fe5b6000918252602080832060408051808201909152600290930201805483526001015460ff1690820181905290935010156127eb576040805160e560020a62461bcd02815260206004820152603960248201527f4c6f636b757053746167652e756e6c6f636b6564546f6b656e7350657263656e60448201527f74616765206d757374206e6f74206265206e6567617469766500000000000000606482015290519081900360840190fd5b6064826020015160ff1611151515612899576040805160e560020a62461bcd02815260206004820152604160248201527f4c6f636b757053746167652e756e6c6f636b6564546f6b656e7350657263656e60448201527f74616765206d757374206e6f742062652067726561746572207468616e20313060648201527f3000000000000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b8215156128a5576129f3565b83600184038154811015156128b657fe5b600091825260209182902060408051808201909152600290920201805480835260019091015460ff1692820192909252835190925011612966576040805160e560020a62461bcd02815260206004820152603f60248201527f4c6f636b757053746167652e7365636f6e647353696e63654c6f636b7570537460448201527f617274206d75737420696e637265617365206d6f6e6f746f6e6963616c6c7900606482015290519081900360840190fd5b806020015160ff16826020015160ff161115156129f3576040805160e560020a62461bcd02815260206004820152602481018290527f4c6f636b757053746167652e756e6c6f636b6564546f6b656e7350657263656e60448201527f74616765206d75737420696e637265617365206d6f6e6f746f6e6963616c6c79606482015290519081900360840190fd5b60019092019161272a565b835484906000198101908110612a1057fe5b600091825260209091206002909102016001015460ff16606414610bc6576040805160e560020a62461bcd02815260206004820152603060248201527f546865206c617374206c6f636b7570207374616765206d75737420756e6c6f6360448201527f6b2031303025206f6620746f6b656e7300000000000000000000000000000000606482015290519081900360840190fd5b6000612acc8260600151612ac08460200151856040015161327c565b9063ffffffff612c0e16565b92915050565b60008183811515612adf57fe5b049392505050565b81810182811015612acc57fe5b612aff8383836132a3565b15156114e057600080fd5b600080805b600e54821015612b805760106000600e84815481101515612b2c57fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822054909316808252600d90935220549091501515612b755760009250612b85565b600190910190612b0f565b600192505b505090565b600b546040517f0118cf41bb4b3c38ea0b9ebdfe726555fdefe08b9659f20c88336ae1b2c9b1af9160ff1690839080836003811115612bc557fe5b60ff168152602001826003811115612bd957fe5b60ff1681526020019250505060405180910390a1600b805482919060ff19166001836003811115612c0657fe5b021790555050565b600082821115612c1a57fe5b50900390565b600554600090819081908190600160a060020a0316331415612cec57600654851115612ce3576040805160e560020a62461bcd028152602060048201526044602482018190527f636865636b486f774d616e794f776e6572733a206e6573746564206f776e6572908201527f73206d6f64696669657220636865636b2072657175697265206d6f7265206f7760648201527f6e65727300000000000000000000000000000000000000000000000000000000608482015290519081900360a40190fd5b60019350612fc8565b3360009081526007602052604090205460035460001990910193508310612d83576040805160e560020a62461bcd02815260206004820152602e60248201527f636865636b486f774d616e794f776e6572733a206d73672e73656e646572206960448201527f73206e6f7420616e206f776e6572000000000000000000000000000000000000606482015290519081900360840190fd5b60003660015460405180848480828437919091019283525050604080516020928190038301902060008181526009909352912054909450600286900a16159150612e3f9050576040805160e560020a62461bcd02815260206004820152603960248201527f636865636b486f774d616e794f776e6572733a206f776e657220616c7265616460448201527f7920766f74656420666f7220746865206f7065726174696f6e00000000000000606482015290519081900360840190fd5b5060008181526009602090815260408083208054600287900a179055600a90915290208054600190810191829055811415612f0257600480546000848152600860209081526040808320849055600184018555939091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90910184905560035482518581529182018890528183015233606082015290517f6bab0114f9524353d2d33e64edd3ebbd16e21edd57de2226ba76c310a7ce22659181900360800190a15b60035460408051848152602081018490528082018890526060810192909252336080830152517f8dd9582c6577aea81973b5adeb6c135f6e18565d99578b7ba0c9377437ec02219181900360a00190a16000828152600a6020526040902054851415612fc357612f7182612fd0565b600354604080518481526020810188905280820192909252336060830152517f8a11c8ca99994c292318ce367f65bf6ff61d390bc814b3588496f6fbcc32807a9181900360800190a160019350612fc8565b600093505b505050919050565b6000818152600860205260409020546004546000190181101561305c57600480546000198101908110612fff57fe5b906000526020600020015460048281548110151561301957fe5b906000526020600020018160001916905550806008600060048481548110151561303f57fe5b600091825260208083209091015483528201929092526040019020555b600480549061306f906000198301613590565b50506000908152600960209081526040808320839055600a82528083208390556008909152812055565b60008060006130a66134d7565b600092505b600e548310156131fb5760106000600e858154811015156130c857fe5b6000918252602080832090910154600160a060020a0390811684528382019490945260409283018220548416808352601182528383208451610100810186528154871681526001820154909616868401819052600282015487870152600382015460608801526004808301546080890152600583015460a0890152600683015460c0890181905260079093015460e089015286517f70a082310000000000000000000000000000000000000000000000000000000081523091810191909152955192985095965094936370a082319360248083019493928390030190829087803b1580156131b557600080fd5b505af11580156131c9573d6000803e3d6000fd5b505050506040513d60208110156131df57600080fd5b505110156131f05760009350613200565b6001909201916130ab565b600193505b50505090565b42600c81905560408051918252517f6a9f15c2d65eab1e4a154679108dfc3304b4eca0f363ea0191e02294d544b9989181900360200190a1565b6000612acc8260a00151612ac08460200151856080015161327c565b600054600160a060020a0316331461327357600080fd5b61056781613367565b600061329c6064610b0361328f866133d7565b859063ffffffff61347716565b9392505050565b60006132ae846134a0565b15156132b957600080fd5b83600160a060020a031660405180807f7472616e7366657228616464726573732c75696e7432353629000000000000008152506019019050604051809103902060e060020a900484846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a03168152602001828152602001925050506000604051808303816000875af192505050151561335757600080fd5b61335f6134a8565b949350505050565b600160a060020a038116151561337c57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b600160a060020a0381166000908152600d602052604081205481805b6000831115612fc857600160a060020a0385166000908152600d602052604090208054600019850190811061342457fe5b9060005260206000209060020201915061344d8260000154600c54612ae790919063ffffffff16565b90508042101561345c5761346b565b600182015460ff169350612fc8565b600019909201916133f3565b600082151561348857506000612acc565b5081810281838281151561349857fe5b0414612acc57fe5b6000903b1190565b60003d80156134be57602081146134c757600080fd5b600191506134d3565b60206000803e60005191505b5090565b610100604051908101604052806000600160a060020a031681526020016000600160a060020a031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054828255906000526020600020908101928215613584579160200282015b828111156135845782518254600160a060020a031916600160a060020a0390911617825560209092019160019091019061354f565b506134d39291506135cb565b8154818355818111156114e0576000838152602090206114e09181019083016135ef565b604080518082019091526000808252602082015290565b61057791905b808211156134d3578054600160a060020a03191681556001016135d1565b61057791905b808211156134d357600081556001016135f556007472616e736665724f776e65727368697057697468486f774d616e793a206f77a165627a7a72305820e79875faaea346603379e13fae168f3983ef0f9279b870ae25cce4a3369a33690029

Swarm Source

bzzr://e79875faaea346603379e13fae168f3983ef0f9279b870ae25cce4a3369a3369

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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