ETH Price: $3,678.84 (+1.29%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Halt47657682017-12-20 13:33:382573 days ago1513776818IN
0x8254909A...B7595C944
0 ETH0.0010964440
Buy With KYC Dat...47654502017-12-20 12:08:092573 days ago1513771689IN
0x8254909A...B7595C944
1,690 ETH0.009161545
Buy With KYC Dat...47596342017-12-19 11:10:342574 days ago1513681834IN
0x8254909A...B7595C944
0.01 ETH0.0067450933.8
Set Early Parici...47596272017-12-19 11:09:062574 days ago1513681746IN
0x8254909A...B7595C944
0 ETH0.0015613533.8
Set Signer Addre...47596252017-12-19 11:08:472574 days ago1513681727IN
0x8254909A...B7595C944
0 ETH0.00151233.8
Set Finalize Age...47596252017-12-19 11:08:472574 days ago1513681727IN
0x8254909A...B7595C944
0 ETH0.0015377333.8

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
47654502017-12-20 12:08:092573 days ago1513771689
0x8254909A...B7595C944
1,690 ETH
47596342017-12-19 11:10:342574 days ago1513681834
0x8254909A...B7595C944
0.01 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KYCCrowdsale

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2017-12-19
*/

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */


/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */




/**
 * @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;


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() {
    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 transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner {
    require(newOwner != address(0));      
    owner = newOwner;
  }

}


/*
 * Haltable
 *
 * Abstract contract that allows children to implement an
 * emergency stop mechanism. Differs from Pausable by causing a throw when in halt mode.
 *
 *
 * Originally envisioned in FirstBlood ICO contract.
 */
contract Haltable is Ownable {
  bool public halted;

  modifier stopInEmergency {
    if (halted) throw;
    _;
  }

  modifier stopNonOwnersInEmergency {
    if (halted && msg.sender != owner) throw;
    _;
  }

  modifier onlyInEmergency {
    if (!halted) throw;
    _;
  }

  // called by the owner on emergency, triggers stopped state
  function halt() external onlyOwner {
    halted = true;
  }

  // called by the owner on end of emergency, returns to normal state
  function unhalt() external onlyOwner onlyInEmergency {
    halted = false;
  }

}

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */


/**
 * Safe unsigned safe math.
 *
 * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli
 *
 * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol
 *
 * Maintained here until merged to mainline zeppelin-solidity.
 *
 */
library SafeMathLib {

  function times(uint a, uint b) returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function minus(uint a, uint b) returns (uint) {
    assert(b <= a);
    return a - b;
  }

  function plus(uint a, uint b) returns (uint) {
    uint c = a + b;
    assert(c>=a);
    return c;
  }

}

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */






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



/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) constant returns (uint256);
  function transferFrom(address from, address to, uint256 value) returns (bool);
  function approve(address spender, uint256 value) returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}


/**
 * A token that defines fractional units as decimals.
 */
contract FractionalERC20 is ERC20 {

  uint public decimals;

}

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */


/**
 * Interface for defining crowdsale pricing.
 */
contract PricingStrategy {

  /** Interface declaration. */
  function isPricingStrategy() public constant returns (bool) {
    return true;
  }

  /** Self check if all references are correctly set.
   *
   * Checks that pricing strategy matches crowdsale parameters.
   */
  function isSane(address crowdsale) public constant returns (bool) {
    return true;
  }

  /**
   * @dev Pricing tells if this is a presale purchase or not.
     @param purchaser Address of the purchaser
     @return False by default, true if a presale purchaser
   */
  function isPresalePurchase(address purchaser) public constant returns (bool) {
    return false;
  }

  /**
   * When somebody tries to buy tokens for X eth, calculate how many tokens they get.
   *
   *
   * @param value - What is the value of the transaction send in as wei
   * @param tokensSold - how much tokens have been sold this far
   * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale
   * @param msgSender - who is the investor of this transaction
   * @param decimals - how many decimal units the token has
   * @return Amount of tokens the investor receives
   */
  function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);
}

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */


/**
 * Finalize agent defines what happens at the end of succeseful crowdsale.
 *
 * - Allocate tokens for founders, bounties and community
 * - Make tokens transferable
 * - etc.
 */
contract FinalizeAgent {

  function isFinalizeAgent() public constant returns(bool) {
    return true;
  }

  /** Return true if we can run finalizeCrowdsale() properly.
   *
   * This is a safety check function that doesn't allow crowdsale to begin
   * unless the finalizer has been set up properly.
   */
  function isSane() public constant returns (bool);

  /** Called once by crowdsale finalize() if the sale was success. */
  function finalizeCrowdsale();

}



/**
 * Crowdsale state machine without buy functionality.
 *
 * Implements basic state machine logic, but leaves out all buy functions,
 * so that subclasses can implement their own buying logic.
 *
 *
 * For the default buy() implementation see Crowdsale.sol.
 */
contract CrowdsaleBase is Haltable {

  /* Max investment count when we are still allowed to change the multisig address */
  uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;

  using SafeMathLib for uint;

  /* The token we are selling */
  FractionalERC20 public token;

  /* How we are going to price our offering */
  PricingStrategy public pricingStrategy;

  /* Post-success callback */
  FinalizeAgent public finalizeAgent;

  /* tokens will be transfered from this address */
  address public multisigWallet;

  /* if the funding goal is not reached, investors may withdraw their funds */
  uint public minimumFundingGoal;

  /* the UNIX timestamp start date of the crowdsale */
  uint public startsAt;

  /* the UNIX timestamp end date of the crowdsale */
  uint public endsAt;

  /* the number of tokens already sold through this contract*/
  uint public tokensSold = 0;

  /* How many wei of funding we have raised */
  uint public weiRaised = 0;

  /* Calculate incoming funds from presale contracts and addresses */
  uint public presaleWeiRaised = 0;

  /* How many distinct addresses have invested */
  uint public investorCount = 0;

  /* How much wei we have returned back to the contract after a failed crowdfund. */
  uint public loadedRefund = 0;

  /* How much wei we have given back to investors.*/
  uint public weiRefunded = 0;

  /* Has this crowdsale been finalized */
  bool public finalized;

  /** How much ETH each address has invested to this crowdsale */
  mapping (address => uint256) public investedAmountOf;

  /** How much tokens this crowdsale has credited for each investor address */
  mapping (address => uint256) public tokenAmountOf;

  /** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */
  mapping (address => bool) public earlyParticipantWhitelist;

  /** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */
  uint public ownerTestValue;

  /** State machine
   *
   * - Preparing: All contract initialization calls and variables have not been set yet
   * - Prefunding: We have not passed start time yet
   * - Funding: Active crowdsale
   * - Success: Minimum funding goal reached
   * - Failure: Minimum funding goal not reached before ending time
   * - Finalized: The finalized has been called and succesfully executed
   * - Refunding: Refunds are loaded on the contract for reclaim.
   */
  enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}

  // A new investment was made
  event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);

  // Refund was processed for a contributor
  event Refund(address investor, uint weiAmount);

  // The rules were changed what kind of investments we accept
  event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, address newSignerAddress);

  // Address early participation whitelist status changed
  event Whitelisted(address addr, bool status);

  // Crowdsale end time has been changed
  event EndsAtChanged(uint newEndsAt);

  State public testState;

  function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal) {

    owner = msg.sender;

    token = FractionalERC20(_token);

    setPricingStrategy(_pricingStrategy);

    multisigWallet = _multisigWallet;
    if(multisigWallet == 0) {
        throw;
    }

    if(_start == 0) {
        throw;
    }

    startsAt = _start;

    if(_end == 0) {
        throw;
    }

    endsAt = _end;

    // Don't mess the dates
    if(startsAt >= endsAt) {
        throw;
    }

    // Minimum funding goal can be zero
    minimumFundingGoal = _minimumFundingGoal;
  }

  /**
   * Don't expect to just send in money and get tokens.
   */
  function() payable {
    throw;
  }

  /**
   * Make an investment.
   *
   * Crowdsale must be running for one to invest.
   * We must have not pressed the emergency brake.
   *
   * @param receiver The Ethereum address who receives the tokens
   * @param customerId (optional) UUID v4 to track the successful payments on the server side'
   *
   * @return tokenAmount How mony tokens were bought
   */
  function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {

    // Determine if it's a good time to accept investment from this participant
    if(getState() == State.PreFunding) {
      // Are we whitelisted for early deposit
      if(!earlyParticipantWhitelist[receiver]) {
        throw;
      }
    } else if(getState() == State.Funding) {
      // Retail participants can only come in when the crowdsale is running
      // pass
    } else {
      // Unwanted state
      throw;
    }

    uint weiAmount = msg.value;

    // Account presale sales separately, so that they do not count against pricing tranches
    uint tokenAmount = pricingStrategy.calculatePrice(weiAmount, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals());

    // Dust transaction
    require(tokenAmount != 0);

    if(investedAmountOf[receiver] == 0) {
       // A new investor
       investorCount++;
    }

    // Update investor
    investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);
    tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);

    // Update totals
    weiRaised = weiRaised.plus(weiAmount);
    tokensSold = tokensSold.plus(tokenAmount);

    if(pricingStrategy.isPresalePurchase(receiver)) {
        presaleWeiRaised = presaleWeiRaised.plus(weiAmount);
    }

    // Check that we did not bust the cap
    require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));

    assignTokens(receiver, tokenAmount);

    // Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig
    if(!multisigWallet.send(weiAmount)) throw;

    // Tell us invest was success
    Invested(receiver, weiAmount, tokenAmount, customerId);

    return tokenAmount;
  }

  /**
   * Finalize a succcesful crowdsale.
   *
   * The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.
   */
  function finalize() public inState(State.Success) onlyOwner stopInEmergency {

    // Already finalized
    if(finalized) {
      throw;
    }

    // Finalizing is optional. We only call it if we are given a finalizing agent.
    if(address(finalizeAgent) != 0) {
      finalizeAgent.finalizeCrowdsale();
    }

    finalized = true;
  }

  /**
   * Allow to (re)set finalize agent.
   *
   * Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.
   */
  function setFinalizeAgent(FinalizeAgent addr) onlyOwner {
    finalizeAgent = addr;

    // Don't allow setting bad agent
    if(!finalizeAgent.isFinalizeAgent()) {
      throw;
    }
  }

  /**
   * Allow crowdsale owner to close early or extend the crowdsale.
   *
   * This is useful e.g. for a manual soft cap implementation:
   * - after X amount is reached determine manual closing
   *
   * This may put the crowdsale to an invalid state,
   * but we trust owners know what they are doing.
   *
   */
  function setEndsAt(uint time) onlyOwner {

    if(now > time) {
      throw; // Don't change past
    }

    if(startsAt > time) {
      throw; // Prevent human mistakes
    }

    endsAt = time;
    EndsAtChanged(endsAt);
  }

  /**
   * Allow to (re)set pricing strategy.
   *
   * Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.
   */
  function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {
    pricingStrategy = _pricingStrategy;

    // Don't allow setting bad agent
    if(!pricingStrategy.isPricingStrategy()) {
      throw;
    }
  }

  /**
   * Allow to change the team multisig address in the case of emergency.
   *
   * This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun
   * (we have done only few test transactions). After the crowdsale is going
   * then multisig address stays locked for the safety reasons.
   */
  function setMultisig(address addr) public onlyOwner {

    // Change
    if(investorCount > MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE) {
      throw;
    }

    multisigWallet = addr;
  }

  /**
   * Allow load refunds back on the contract for the refunding.
   *
   * The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
   */
  function loadRefund() public payable inState(State.Failure) {
    if(msg.value == 0) throw;
    loadedRefund = loadedRefund.plus(msg.value);
  }

  /**
   * Investors can claim refund.
   *
   * Note that any refunds from proxy buyers should be handled separately,
   * and not through this contract.
   */
  function refund() public inState(State.Refunding) {
    uint256 weiValue = investedAmountOf[msg.sender];
    if (weiValue == 0) throw;
    investedAmountOf[msg.sender] = 0;
    weiRefunded = weiRefunded.plus(weiValue);
    Refund(msg.sender, weiValue);
    if (!msg.sender.send(weiValue)) throw;
  }

  /**
   * @return true if the crowdsale has raised enough money to be a successful.
   */
  function isMinimumGoalReached() public constant returns (bool reached) {
    return weiRaised >= minimumFundingGoal;
  }

  /**
   * Check if the contract relationship looks good.
   */
  function isFinalizerSane() public constant returns (bool sane) {
    return finalizeAgent.isSane();
  }

  /**
   * Check if the contract relationship looks good.
   */
  function isPricingSane() public constant returns (bool sane) {
    return pricingStrategy.isSane(address(this));
  }

  /**
   * Crowdfund state machine management.
   *
   * We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.
   */
  function getState() public constant returns (State) {
    if(finalized) return State.Finalized;
    else if (address(finalizeAgent) == 0) return State.Preparing;
    else if (!finalizeAgent.isSane()) return State.Preparing;
    else if (!pricingStrategy.isSane(address(this))) return State.Preparing;
    else if (block.timestamp < startsAt) return State.PreFunding;
    else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;
    else if (isMinimumGoalReached()) return State.Success;
    else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;
    else return State.Failure;
  }

  /** This is for manual testing of multisig wallet interaction */
  function setOwnerTestValue(uint val) onlyOwner {
    ownerTestValue = val;
  }

  /**
   * Allow addresses to do early participation.
   *
   * TODO: Fix spelling error in the name
   */
  function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {
    earlyParticipantWhitelist[addr] = status;
    Whitelisted(addr, status);
  }


  /** Interface marker. */
  function isCrowdsale() public constant returns (bool) {
    return true;
  }

  //
  // Modifiers
  //

  /** Modified allowing execution only if the crowdsale is currently running.  */
  modifier inState(State state) {
    if(getState() != state) throw;
    _;
  }


  //
  // Abstract functions
  //

  /**
   * Check if the current invested breaks our cap rules.
   *
   *
   * The child contract must define their own cap setting rules.
   * We allow a lot of flexibility through different capping strategies (ETH, token count)
   * Called from invest().
   *
   * @param weiAmount The amount of wei the investor tries to invest in the current transaction
   * @param tokenAmount The amount of tokens we try to give to the investor in the current transaction
   * @param weiRaisedTotal What would be our total raised balance after this transaction
   * @param tokensSoldTotal What would be our total sold tokens count after this transaction
   *
   * @return true if taking this investment would break our cap rules
   */
  function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);

  /**
   * Check if the current crowdsale is full and we can no longer sell any tokens.
   */
  function isCrowdsaleFull() public constant returns (bool);

  /**
   * Create new tokens or transfer issued tokens to the investor depending on the cap model.
   */
  function assignTokens(address receiver, uint tokenAmount) internal;
}

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */




/**
 * A mixin that is selling tokens from a preallocated pool
 *
 * - Tokens have precreated supply "premined"
 *
 * - Token owner must transfer sellable tokens to the crowdsale contract using ERC20.approve()
 *
 * - The mixin does not implement buy entry point.
 *
 */
contract AllocatedCrowdsaleMixin is CrowdsaleBase {

  /* The party who holds the full token pool and has approve()'ed tokens for this crowdsale */
  address public beneficiary;

  /**
   * @param _beneficiary The account who has performed approve() to allocate tokens for the token sale.
   *
   */
  function AllocatedCrowdsaleMixin(address _beneficiary) {
    beneficiary = _beneficiary;
  }

  /**
   * Called from invest() to confirm if the curret investment does not break our cap rule.
   */
  function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken) {
    if(tokenAmount > getTokensLeft()) {
      return true;
    } else {
      return false;
    }
  }

  /**
   * We are sold out when our approve pool becomes empty.
   */
  function isCrowdsaleFull() public constant returns (bool) {
    return getTokensLeft() == 0;
  }

  /**
   * Get the amount of unsold tokens allocated to this contract;
   */
  function getTokensLeft() public constant returns (uint) {
    return token.allowance(owner, this);
  }

  /**
   * Transfer tokens from approve() pool to the buyer.
   *
   * Use approve() given to this crowdsale to distribute the tokens.
   */
  function assignTokens(address receiver, uint tokenAmount) internal {
    if(!token.transferFrom(beneficiary, receiver, tokenAmount)) throw;
  }
}

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */


/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */

/**
 * Deserialize bytes payloads.
 *
 * Values are in big-endian byte order.
 *
 */
library BytesDeserializer {

  /**
   * Extract 256-bit worth of data from the bytes stream.
   */
  function slice32(bytes b, uint offset) constant returns (bytes32) {
    bytes32 out;

    for (uint i = 0; i < 32; i++) {
      out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);
    }
    return out;
  }

  /**
   * Extract Ethereum address worth of data from the bytes stream.
   */
  function sliceAddress(bytes b, uint offset) constant returns (address) {
    bytes32 out;

    for (uint i = 0; i < 20; i++) {
      out |= bytes32(b[offset + i] & 0xFF) >> ((i+12) * 8);
    }
    return address(uint(out));
  }

  /**
   * Extract 128-bit worth of data from the bytes stream.
   */
  function slice16(bytes b, uint offset) constant returns (bytes16) {
    bytes16 out;

    for (uint i = 0; i < 16; i++) {
      out |= bytes16(b[offset + i] & 0xFF) >> (i * 8);
    }
    return out;
  }

  /**
   * Extract 32-bit worth of data from the bytes stream.
   */
  function slice4(bytes b, uint offset) constant returns (bytes4) {
    bytes4 out;

    for (uint i = 0; i < 4; i++) {
      out |= bytes4(b[offset + i] & 0xFF) >> (i * 8);
    }
    return out;
  }

  /**
   * Extract 16-bit worth of data from the bytes stream.
   */
  function slice2(bytes b, uint offset) constant returns (bytes2) {
    bytes2 out;

    for (uint i = 0; i < 2; i++) {
      out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);
    }
    return out;
  }



}


/**
 * A mix-in contract to decode different AML payloads.
 *
 * @notice This should be a library, but for the complexity and toolchain fragility risks involving of linking library inside library, we put this as a mix-in.
 */
contract KYCPayloadDeserializer {

  using BytesDeserializer for bytes;

  // The bytes payload set on the server side
  // total 56 bytes

  struct KYCPayload {

    /** Customer whitelisted address where the deposit can come from */
    address whitelistedAddress; // 20 bytes

    /** Customer id, UUID v4 */
    uint128 customerId; // 16 bytes

    /**
     * Min amount this customer needs to invest in ETH. Set zero if no minimum. Expressed as parts of 10000. 1 ETH = 10000.
     * @notice Decided to use 32-bit words to make the copy-pasted Data field for the ICO transaction less lenghty.
     */
    uint32 minETH; // 4 bytes

    /** Max amount this customer can to invest in ETH. Set zero if no maximum. Expressed as parts of 10000. 1 ETH = 10000. */
    uint32 maxETH; // 4 bytes
  }

  /**
   * Deconstruct server-side byte data to structured data.
   */

  function deserializeKYCPayload(bytes dataframe) internal constant returns(KYCPayload decodedPayload) {
    KYCPayload payload;
    payload.whitelistedAddress = dataframe.sliceAddress(0);
    payload.customerId = uint128(dataframe.slice16(20));
    payload.minETH = uint32(dataframe.slice4(36));
    payload.maxETH = uint32(dataframe.slice4(40));
    return payload;
  }

  /**
   * Helper function to allow us to return the decoded payload to an external caller for testing.
   *
   * TODO: Some sort of compiler issue (?) with memory keyword. Tested with solc 0.4.16 and solc 0.4.18.
   * If used, makes KYCCrowdsale to set itself to a bad state getState() returns 5 (Failure). Overrides some memory?
   */
  /*
  function broken_getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth) {
    KYCPayload memory payload = deserializeKYCPayload(dataframe);
    payload.whitelistedAddress = dataframe.sliceAddress(0);
    payload.customerId = uint128(dataframe.slice16(20));
    payload.minETH = uint32(dataframe.slice4(36));
    payload.maxETH = uint32(dataframe.slice4(40));
    return (payload.whitelistedAddress, payload.customerId, payload.minETH, payload.maxETH);
  }*/

  /**
   * Same as above, does not seem to cause any issue.
   */
  function getKYCPayload(bytes dataframe) public constant returns(address whitelistedAddress, uint128 customerId, uint32 minEth, uint32 maxEth) {
    address _whitelistedAddress = dataframe.sliceAddress(0);
    uint128 _customerId = uint128(dataframe.slice16(20));
    uint32 _minETH = uint32(dataframe.slice4(36));
    uint32 _maxETH = uint32(dataframe.slice4(40));
    return (_whitelistedAddress, _customerId, _minETH, _maxETH);
  }

}


/**
 * A crowdsale that allows only signed payload with server-side specified buy in limits.
 *
 *
 * The token distribution happens as in the allocated crowdsale.
 *
 */
contract KYCCrowdsale is AllocatedCrowdsaleMixin, KYCPayloadDeserializer {

  /* Server holds the private key to this address to decide if the AML payload is valid or not. */
  address public signerAddress;

  /* A new server-side signer key was set to be effective */
  event SignerChanged(address signer);

  /**
   * Constructor.
   */
  function KYCCrowdsale(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, address _beneficiary) CrowdsaleBase(_token, _pricingStrategy, _multisigWallet, _start, _end, _minimumFundingGoal) AllocatedCrowdsaleMixin(_beneficiary) {

  }

  /**
   * A token purchase with anti-money laundering
   *
   * ©return tokenAmount How many tokens where bought
   */
  function buyWithKYCData(bytes dataframe, uint8 v, bytes32 r, bytes32 s) public payable returns(uint tokenAmount) {

    uint _tokenAmount;
    uint multiplier = 10 ** 18;

    // Perform signature check for normal addresses
    // (not deployment accounts, etc.)
    if(earlyParticipantWhitelist[msg.sender]) {
      // For test purchases use this faux customer id
      _tokenAmount = investInternal(msg.sender, 0x1000);

    } else {

      bytes32 hash = sha256(dataframe);

      var (whitelistedAddress, customerId, minETH, maxETH) = getKYCPayload(dataframe);

      // Check that the KYC data is signed by our server
      require(ecrecover(hash, v, r, s) == signerAddress);

      // Only whitelisted address can participate the transaction
      require(whitelistedAddress == msg.sender);

      _tokenAmount = investInternal(msg.sender, customerId);

    }

    if(!earlyParticipantWhitelist[msg.sender]) {
      // We assume there is no serious min and max fluctuations for the customer, unless
      // especially set in the server side per customer manual override.
      // Otherwise the customer can reuse old data payload with different min or max value
      // to work around the per customer cap.
      require(investedAmountOf[msg.sender] >= minETH * multiplier / 10000);
      require(investedAmountOf[msg.sender] <= maxETH * multiplier / 10000);
    }

    return _tokenAmount;
  }

  /// @dev This function can set the server side address
  /// @param _signerAddress The address derived from server's private key
  function setSignerAddress(address _signerAddress) onlyOwner {
    signerAddress = _signerAddress;
    SignerChanged(signerAddress);
  }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"ownerTestValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_signerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isPricingSane","outputs":[{"name":"sane","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endsAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimumFundingGoal","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getState","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"setFinalizeAgent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"investedAmountOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalizeAgent","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isCrowdsale","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_pricingStrategy","type":"address"}],"name":"setPricingStrategy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokensSold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"testState","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"signerAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiRefunded","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"halt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"time","type":"uint256"}],"name":"setEndsAt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"dataframe","type":"bytes"}],"name":"getKYCPayload","outputs":[{"name":"whitelistedAddress","type":"address"},{"name":"customerId","type":"uint128"},{"name":"minEth","type":"uint32"},{"name":"maxEth","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pricingStrategy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loadedRefund","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isMinimumGoalReached","outputs":[{"name":"reached","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"loadRefund","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"val","type":"uint256"}],"name":"setOwnerTestValue","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":"multisigWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"tokenAmountOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"weiAmount","type":"uint256"},{"name":"tokenAmount","type":"uint256"},{"name":"weiRaisedTotal","type":"uint256"},{"name":"tokensSoldTotal","type":"uint256"}],"name":"isBreakingCap","outputs":[{"name":"limitBroken","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isFinalizerSane","outputs":[{"name":"sane","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"startsAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"finalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"halted","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"earlyParticipantWhitelist","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unhalt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isCrowdsaleFull","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"dataframe","type":"bytes"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"buyWithKYCData","outputs":[{"name":"tokenAmount","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"investorCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokensLeft","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"status","type":"bool"}],"name":"setEarlyParicipantWhitelist","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"setMultisig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"presaleWeiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_pricingStrategy","type":"address"},{"name":"_multisigWallet","type":"address"},{"name":"_start","type":"uint256"},{"name":"_end","type":"uint256"},{"name":"_minimumFundingGoal","type":"uint256"},{"name":"_beneficiary","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"signer","type":"address"}],"name":"SignerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"investor","type":"address"},{"indexed":false,"name":"weiAmount","type":"uint256"},{"indexed":false,"name":"tokenAmount","type":"uint256"},{"indexed":false,"name":"customerId","type":"uint128"}],"name":"Invested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"investor","type":"address"},{"indexed":false,"name":"weiAmount","type":"uint256"}],"name":"Refund","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newRequireCustomerId","type":"bool"},{"indexed":false,"name":"newRequiredSignedAddress","type":"bool"},{"indexed":false,"name":"newSignerAddress","type":"address"}],"name":"InvestmentPolicyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"},{"indexed":false,"name":"status","type":"bool"}],"name":"Whitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newEndsAt","type":"uint256"}],"name":"EndsAtChanged","type":"event"}]

6060604052600560015560006009556000600a556000600b556000600c556000600d556000600e5534156200003357600080fd5b60405160e080620021928339810160405280805191906020018051919060200180519190602001805191906020018051919060200180519190602001805160008054600160a060020a03338116600160a060020a0319928316811783161790925560028054928c16929091169190911790559150819050878787878787620000c98564010000000062000bea6200016882021704565b60058054600160a060020a031916600160a060020a038681169190911791829055161515620000f757600080fd5b8215156200010457600080fd5b60078390558115156200011657600080fd5b60088290556007548290106200012b57600080fd5b600655505060148054600160a060020a039095166101000261010060a860020a031990951694909417909355506200022798505050505050505050565b60005433600160a060020a039081169116146200018457600080fd5b60038054600160a060020a031916600160a060020a038381169190911791829055166304bbc2556000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515620001fc57600080fd5b6102c65a03f115156200020e57600080fd5b5050506040518051905015156200022457600080fd5b50565b611f5b80620002376000396000f3006060604052600436106102215763ffffffff60e060020a6000350416630226401d8114610226578063046dc1661461024b578063062b01ce1461026c5780630a09284a1461029357806313f4e977146102a65780631865c57d146102b957806319b667da146102f05780631aae34601461030f57806321d5c0f61461032e57806338af3eed1461035d5780634042b66f146103705780634551dd59146103835780634bb278f31461039657806350c67734146103a9578063518ab2a8146103c857806357950697146103db578063590e1ae3146103ee5780635b7633d0146104015780635da89ac0146104145780635ed7ca5b146104275780636203f09f1461043a5780636e50eb3f1461044d57806373752db41461046357806378b99c2414610502578063797d9437146105155780637c2e08a314610528578063876121021461053b5780638d51faec146105435780638da5cb5b146105595780639075becf1461056c57806397b150ca1461057f5780639d3c663f1461059e578063a7ba44c3146105bd578063af468682146105d0578063b3f05b97146105e3578063b9b8af0b146105f6578063cb16e6d014610609578063cb3e64fd14610628578063d5d090211461063b578063d7c7159c1461064e578063d7e64c00146106a4578063de5f9866146106b7578063eac24932146106ca578063f2fde38b146106ee578063f3283fba1461070d578063f7c00e2f1461072c578063fc0c546a1461073f575b600080fd5b341561023157600080fd5b610239610752565b60405190815260200160405180910390f35b341561025657600080fd5b61026a600160a060020a0360043516610758565b005b341561027757600080fd5b61027f6107e2565b604051901515815260200160405180910390f35b341561029e57600080fd5b61023961085d565b34156102b157600080fd5b610239610863565b34156102c457600080fd5b6102cc610869565b604051808260078111156102dc57fe5b60ff16815260200191505060405180910390f35b34156102fb57600080fd5b61026a600160a060020a0360043516610a13565b341561031a57600080fd5b610239600160a060020a0360043516610ac2565b341561033957600080fd5b610341610ad4565b604051600160a060020a03909116815260200160405180910390f35b341561036857600080fd5b610341610ae3565b341561037b57600080fd5b610239610af7565b341561038e57600080fd5b61027f610afd565b34156103a157600080fd5b61026a610b02565b34156103b457600080fd5b61026a600160a060020a0360043516610bea565b34156103d357600080fd5b610239610c70565b34156103e657600080fd5b6102cc610c76565b34156103f957600080fd5b61026a610c7f565b341561040c57600080fd5b610341610dda565b341561041f57600080fd5b610239610de9565b341561043257600080fd5b61026a610def565b341561044557600080fd5b610239610e41565b341561045857600080fd5b61026a600435610e47565b341561046e57600080fd5b6104b460046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610eb995505050505050565b604051600160a060020a0390941684526fffffffffffffffffffffffffffffffff909216602084015263ffffffff908116604080850191909152911660608301526080909101905180910390f35b341561050d57600080fd5b610341611278565b341561052057600080fd5b610239611287565b341561053357600080fd5b61027f61128d565b61026a611298565b341561054e57600080fd5b61026a600435611346565b341561056457600080fd5b610341611366565b341561057757600080fd5b610341611375565b341561058a57600080fd5b610239600160a060020a0360043516611384565b34156105a957600080fd5b61027f600435602435604435606435611396565b34156105c857600080fd5b61027f6113bb565b34156105db57600080fd5b610239611405565b34156105ee57600080fd5b61027f61140b565b341561060157600080fd5b61027f611414565b341561061457600080fd5b61027f600160a060020a0360043516611435565b341561063357600080fd5b61026a61144a565b341561064657600080fd5b61027f6114ae565b61023960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496505060ff85351694602081013594506040013592506114be915050565b34156106af57600080fd5b6102396116f3565b34156106c257600080fd5b6102396116f9565b34156106d557600080fd5b61026a600160a060020a03600435166024351515611763565b34156106f957600080fd5b61026a600160a060020a03600435166117ef565b341561071857600080fd5b61026a600160a060020a036004351661184e565b341561073757600080fd5b6102396118a9565b341561074a57600080fd5b6103416118af565b60135481565b60005433600160a060020a0390811691161461077357600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290557f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d9116604051600160a060020a03909116815260200160405180910390a150565b600354600090600160a060020a0316638e76828830836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561083d57600080fd5b6102c65a03f1151561084e57600080fd5b50505060405180519150505b90565b60085481565b60065481565b600f5460009060ff161561087f5750600661085a565b600454600160a060020a031615156108995750600161085a565b600454600160a060020a03166382771c8e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156108e157600080fd5b6102c65a03f115156108f257600080fd5b50505060405180519050151561090a5750600161085a565b600354600160a060020a0316638e7682883060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561096357600080fd5b6102c65a03f1151561097457600080fd5b50505060405180519050151561098c5750600161085a565b60075442101561099e5750600261085a565b60085442111580156109b557506109b36114ae565b155b156109c25750600361085a565b6109ca61128d565b156109d75750600461085a565b6109df61128d565b1580156109ee57506000600a54115b80156109fe5750600a54600d5410155b15610a0b5750600761085a565b50600561085a565b60005433600160a060020a03908116911614610a2e57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290551663614cb9046000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a9957600080fd5b6102c65a03f11515610aaa57600080fd5b505050604051805190501515610abf57600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b6014546101009004600160a060020a031681565b600a5481565b600190565b600480610b0d610869565b6007811115610b1857fe5b14610b2257600080fd5b60005433600160a060020a03908116911614610b3d57600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610b6557600080fd5b600f5460ff1615610b7557600080fd5b600454600160a060020a031615610bda57600454600160a060020a0316630bf318a36040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610bc557600080fd5b6102c65a03f11515610bd657600080fd5b5050505b50600f805460ff19166001179055565b60005433600160a060020a03908116911614610c0557600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055166304bbc2556000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a9957600080fd5b60095481565b60145460ff1681565b6000600780610c8c610869565b6007811115610c9757fe5b14610ca157600080fd5b600160a060020a0333166000908152601060205260409020549150811515610cc857600080fd5b600160a060020a033316600090815260106020526040808220829055600e5473959ac6cadd10be9c16fc2b05511c30870a3d5c23926366098d4f92869190516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515610d4457600080fd5b6102c65a03f41515610d5557600080fd5b5050506040518051600e55507fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d3383604051600160a060020a03909216825260208201526040908101905180910390a1600160a060020a03331682156108fc0283604051600060405180830381858888f193505050501515610dd657600080fd5b5050565b601554600160a060020a031681565b600e5481565b60005433600160a060020a03908116911614610e0a57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b60005433600160a060020a03908116911614610e6257600080fd5b80421115610e6f57600080fd5b806007541115610e7e57600080fd5b60088190557fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3108160405190815260200160405180910390a150565b600080808080808080738bce695330614f61346d37025da5f476f6fdbcb563b655e1388a8380604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610f3b578082015183820152602001610f23565b50505050905090810190601f168015610f685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1515610f8557600080fd5b6102c65a03f41515610f9657600080fd5b50505060405180519450738bce695330614f61346d37025da5f476f6fdbcb590506316419aa78a60146000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561101d578082015183820152602001611005565b50505050905090810190601f16801561104a5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b151561106757600080fd5b6102c65a03f4151561107857600080fd5b505050604051805170010000000000000000000000000000000090049350738bce695330614f61346d37025da5f476f6fdbcb5905063d54dd8f98a60246000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156111135780820151838201526020016110fb565b50505050905090810190601f1680156111405780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b151561115d57600080fd5b6102c65a03f4151561116e57600080fd5b505050604051805160e060020a90049250738bce695330614f61346d37025da5f476f6fdbcb5905063d54dd8f98a60286000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156111fc5780820151838201526020016111e4565b50505050905090810190601f1680156112295780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b151561124657600080fd5b6102c65a03f4151561125757600080fd5b5050506040518051949a9399509197505060e060020a909204945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806112a3610869565b60078111156112ae57fe5b146112b857600080fd5b3415156112c457600080fd5b600d5473959ac6cadd10be9c16fc2b05511c30870a3d5c236366098d4f90913460006040516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b151561132657600080fd5b6102c65a03f4151561133757600080fd5b5050506040518051600d555050565b60005433600160a060020a0390811691161461136157600080fd5b601355565b600054600160a060020a031681565b600554600160a060020a031681565b60116020526000908152604090205481565b60006113a06116f9565b8411156113af575060016113b3565b5060005b949350505050565b600454600090600160a060020a03166382771c8e82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561083d57600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b60005433600160a060020a0390811691161461146557600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561148e57600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b60006114b86116f9565b15905090565b600160a060020a0333166000908152601260205260408120548190670de0b6b3a7640000908290819081908190819060ff161561150857611501336110006118be565b965061165d565b60028c6000604051602001526040518082805190602001908083835b602083106115435780518252601f199092019160209182019101611524565b6001836020036101000a03801982511681845116808217855250505050505090500191505060206040518083038160008661646e5a03f1151561158557600080fd5b50506040518051905094506115998c610eb9565b60155493975091955093509150600160a060020a03166001868d8d8d6040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f1151561161457600080fd5b505060206040510351600160a060020a03161461163057600080fd5b33600160a060020a031684600160a060020a031614151561165057600080fd5b61165a33846118be565b96505b600160a060020a03331660009081526012602052604090205460ff1615156116e35733600160a060020a031660009081526010602052604090205461271063ffffffff84168802049010156116b157600080fd5b33600160a060020a031660009081526010602052604090205461271063ffffffff83168802049011156116e357600080fd5b50949a9950505050505050505050565b600c5481565b600254600080549091600160a060020a039081169163dd62ed3e911630846040516020015260405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561083d57600080fd5b60005433600160a060020a0390811691161461177e57600080fd5b600160a060020a03821660009081526012602052604090819020805460ff19168315151790557fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f26440908390839051600160a060020a039092168252151560208201526040908101905180910390a15050565b60005433600160a060020a0390811691161461180a57600080fd5b600160a060020a038116151561181f57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a0390811691161461186957600080fd5b600154600c54111561187a57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a031681565b600080548190819074010000000000000000000000000000000000000000900460ff16156118eb57600080fd5b60026118f5610869565b600781111561190057fe5b141561193257600160a060020a03851660009081526012602052604090205460ff16151561192d57600080fd5b61194e565b600361193c610869565b600781111561194757fe5b1415610221575b600354600b54600a54600954600254349650600160a060020a03948516946318a4155e94889403929133911663313ce5676000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156119b657600080fd5b6102c65a03f115156119c757600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8816028152600481019590955260248501939093526044840191909152600160a060020a03166064830152608482015260a401602060405180830381600087803b1515611a3357600080fd5b6102c65a03f11515611a4457600080fd5b5050506040518051915050801515611a5b57600080fd5b600160a060020a0385166000908152601060205260409020541515611a8457600c805460010190555b600160a060020a0385166000908152601060205260408082205473959ac6cadd10be9c16fc2b05511c30870a3d5c23926366098d4f92869190516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611afb57600080fd5b6102c65a03f41515611b0c57600080fd5b5050506040518051600160a060020a038716600090815260106020908152604080832093909355601190528181205473959ac6cadd10be9c16fc2b05511c30870a3d5c2393506366098d4f9290918591516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611b9a57600080fd5b6102c65a03f41515611bab57600080fd5b5050506040518051600160a060020a03871660009081526011602052604080822092909255600a5473959ac6cadd10be9c16fc2b05511c30870a3d5c2393506366098d4f9290918691516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611c3257600080fd5b6102c65a03f41515611c4357600080fd5b5050506040518051600a555060095473959ac6cadd10be9c16fc2b05511c30870a3d5c23906366098d4f908360006040516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611cb157600080fd5b6102c65a03f41515611cc257600080fd5b505050604051805160095550600354600160a060020a031663f14ae17d8660006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611d2757600080fd5b6102c65a03f11515611d3857600080fd5b5050506040518051905015611dc757600b5473959ac6cadd10be9c16fc2b05511c30870a3d5c236366098d4f90918460006040516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611da957600080fd5b6102c65a03f41515611dba57600080fd5b5050506040518051600b55505b611dd78282600a54600954611396565b15611de157600080fd5b611deb8582611e91565b600554600160a060020a031682156108fc0283604051600060405180830381858888f193505050501515611e1e57600080fd5b7f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc4335085838387604051600160a060020a03909416845260208401929092526040808401919091526fffffffffffffffffffffffffffffffff90911660608301526080909101905180910390a1949350505050565b600254601454600160a060020a03918216916323b872dd91610100900416848460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515611f0957600080fd5b6102c65a03f11515611f1a57600080fd5b505050604051805190501515610dd657600080fd00a165627a7a723058201077dc8563a980d5c6737a6774a401228079c5e00db7aab794cd4fd568a8989600290000000000000000000000001a7a8bd9106f2b8d977e08582dc7d24c723ab0db000000000000000000000000138002773b444b644c6120214c19d5e13e5c9c4900000000000000000000000071e7c73375efbefdf7b4be67e768d9038dde2488000000000000000000000000000000000000000000000000000000005a315c90000000000000000000000000000000000000000000000000000000005a5cde100000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a684a3371e0d46bca4a6db1ff538a44f1440a855

Deployed Bytecode

0x6060604052600436106102215763ffffffff60e060020a6000350416630226401d8114610226578063046dc1661461024b578063062b01ce1461026c5780630a09284a1461029357806313f4e977146102a65780631865c57d146102b957806319b667da146102f05780631aae34601461030f57806321d5c0f61461032e57806338af3eed1461035d5780634042b66f146103705780634551dd59146103835780634bb278f31461039657806350c67734146103a9578063518ab2a8146103c857806357950697146103db578063590e1ae3146103ee5780635b7633d0146104015780635da89ac0146104145780635ed7ca5b146104275780636203f09f1461043a5780636e50eb3f1461044d57806373752db41461046357806378b99c2414610502578063797d9437146105155780637c2e08a314610528578063876121021461053b5780638d51faec146105435780638da5cb5b146105595780639075becf1461056c57806397b150ca1461057f5780639d3c663f1461059e578063a7ba44c3146105bd578063af468682146105d0578063b3f05b97146105e3578063b9b8af0b146105f6578063cb16e6d014610609578063cb3e64fd14610628578063d5d090211461063b578063d7c7159c1461064e578063d7e64c00146106a4578063de5f9866146106b7578063eac24932146106ca578063f2fde38b146106ee578063f3283fba1461070d578063f7c00e2f1461072c578063fc0c546a1461073f575b600080fd5b341561023157600080fd5b610239610752565b60405190815260200160405180910390f35b341561025657600080fd5b61026a600160a060020a0360043516610758565b005b341561027757600080fd5b61027f6107e2565b604051901515815260200160405180910390f35b341561029e57600080fd5b61023961085d565b34156102b157600080fd5b610239610863565b34156102c457600080fd5b6102cc610869565b604051808260078111156102dc57fe5b60ff16815260200191505060405180910390f35b34156102fb57600080fd5b61026a600160a060020a0360043516610a13565b341561031a57600080fd5b610239600160a060020a0360043516610ac2565b341561033957600080fd5b610341610ad4565b604051600160a060020a03909116815260200160405180910390f35b341561036857600080fd5b610341610ae3565b341561037b57600080fd5b610239610af7565b341561038e57600080fd5b61027f610afd565b34156103a157600080fd5b61026a610b02565b34156103b457600080fd5b61026a600160a060020a0360043516610bea565b34156103d357600080fd5b610239610c70565b34156103e657600080fd5b6102cc610c76565b34156103f957600080fd5b61026a610c7f565b341561040c57600080fd5b610341610dda565b341561041f57600080fd5b610239610de9565b341561043257600080fd5b61026a610def565b341561044557600080fd5b610239610e41565b341561045857600080fd5b61026a600435610e47565b341561046e57600080fd5b6104b460046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610eb995505050505050565b604051600160a060020a0390941684526fffffffffffffffffffffffffffffffff909216602084015263ffffffff908116604080850191909152911660608301526080909101905180910390f35b341561050d57600080fd5b610341611278565b341561052057600080fd5b610239611287565b341561053357600080fd5b61027f61128d565b61026a611298565b341561054e57600080fd5b61026a600435611346565b341561056457600080fd5b610341611366565b341561057757600080fd5b610341611375565b341561058a57600080fd5b610239600160a060020a0360043516611384565b34156105a957600080fd5b61027f600435602435604435606435611396565b34156105c857600080fd5b61027f6113bb565b34156105db57600080fd5b610239611405565b34156105ee57600080fd5b61027f61140b565b341561060157600080fd5b61027f611414565b341561061457600080fd5b61027f600160a060020a0360043516611435565b341561063357600080fd5b61026a61144a565b341561064657600080fd5b61027f6114ae565b61023960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496505060ff85351694602081013594506040013592506114be915050565b34156106af57600080fd5b6102396116f3565b34156106c257600080fd5b6102396116f9565b34156106d557600080fd5b61026a600160a060020a03600435166024351515611763565b34156106f957600080fd5b61026a600160a060020a03600435166117ef565b341561071857600080fd5b61026a600160a060020a036004351661184e565b341561073757600080fd5b6102396118a9565b341561074a57600080fd5b6103416118af565b60135481565b60005433600160a060020a0390811691161461077357600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290557f5719a5656c5cfdaafa148ecf366fd3b0a7fae06449ce2a46225977fb7417e29d9116604051600160a060020a03909116815260200160405180910390a150565b600354600090600160a060020a0316638e76828830836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561083d57600080fd5b6102c65a03f1151561084e57600080fd5b50505060405180519150505b90565b60085481565b60065481565b600f5460009060ff161561087f5750600661085a565b600454600160a060020a031615156108995750600161085a565b600454600160a060020a03166382771c8e6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156108e157600080fd5b6102c65a03f115156108f257600080fd5b50505060405180519050151561090a5750600161085a565b600354600160a060020a0316638e7682883060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561096357600080fd5b6102c65a03f1151561097457600080fd5b50505060405180519050151561098c5750600161085a565b60075442101561099e5750600261085a565b60085442111580156109b557506109b36114ae565b155b156109c25750600361085a565b6109ca61128d565b156109d75750600461085a565b6109df61128d565b1580156109ee57506000600a54115b80156109fe5750600a54600d5410155b15610a0b5750600761085a565b50600561085a565b60005433600160a060020a03908116911614610a2e57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290551663614cb9046000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a9957600080fd5b6102c65a03f11515610aaa57600080fd5b505050604051805190501515610abf57600080fd5b50565b60106020526000908152604090205481565b600454600160a060020a031681565b6014546101009004600160a060020a031681565b600a5481565b600190565b600480610b0d610869565b6007811115610b1857fe5b14610b2257600080fd5b60005433600160a060020a03908116911614610b3d57600080fd5b60005474010000000000000000000000000000000000000000900460ff1615610b6557600080fd5b600f5460ff1615610b7557600080fd5b600454600160a060020a031615610bda57600454600160a060020a0316630bf318a36040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610bc557600080fd5b6102c65a03f11515610bd657600080fd5b5050505b50600f805460ff19166001179055565b60005433600160a060020a03908116911614610c0557600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055166304bbc2556000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a9957600080fd5b60095481565b60145460ff1681565b6000600780610c8c610869565b6007811115610c9757fe5b14610ca157600080fd5b600160a060020a0333166000908152601060205260409020549150811515610cc857600080fd5b600160a060020a033316600090815260106020526040808220829055600e5473959ac6cadd10be9c16fc2b05511c30870a3d5c23926366098d4f92869190516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515610d4457600080fd5b6102c65a03f41515610d5557600080fd5b5050506040518051600e55507fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d3383604051600160a060020a03909216825260208201526040908101905180910390a1600160a060020a03331682156108fc0283604051600060405180830381858888f193505050501515610dd657600080fd5b5050565b601554600160a060020a031681565b600e5481565b60005433600160a060020a03908116911614610e0a57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b60015481565b60005433600160a060020a03908116911614610e6257600080fd5b80421115610e6f57600080fd5b806007541115610e7e57600080fd5b60088190557fd34bb772c4ae9baa99db852f622773b31c7827e8ee818449fef20d30980bd3108160405190815260200160405180910390a150565b600080808080808080738bce695330614f61346d37025da5f476f6fdbcb563b655e1388a8380604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610f3b578082015183820152602001610f23565b50505050905090810190601f168015610f685780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1515610f8557600080fd5b6102c65a03f41515610f9657600080fd5b50505060405180519450738bce695330614f61346d37025da5f476f6fdbcb590506316419aa78a60146000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561101d578082015183820152602001611005565b50505050905090810190601f16801561104a5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b151561106757600080fd5b6102c65a03f4151561107857600080fd5b505050604051805170010000000000000000000000000000000090049350738bce695330614f61346d37025da5f476f6fdbcb5905063d54dd8f98a60246000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156111135780820151838201526020016110fb565b50505050905090810190601f1680156111405780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b151561115d57600080fd5b6102c65a03f4151561116e57600080fd5b505050604051805160e060020a90049250738bce695330614f61346d37025da5f476f6fdbcb5905063d54dd8f98a60286000604051602001526040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156111fc5780820151838201526020016111e4565b50505050905090810190601f1680156112295780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b151561124657600080fd5b6102c65a03f4151561125757600080fd5b5050506040518051949a9399509197505060e060020a909204945092505050565b600354600160a060020a031681565b600d5481565b600654600a54101590565b6005806112a3610869565b60078111156112ae57fe5b146112b857600080fd5b3415156112c457600080fd5b600d5473959ac6cadd10be9c16fc2b05511c30870a3d5c236366098d4f90913460006040516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b151561132657600080fd5b6102c65a03f4151561133757600080fd5b5050506040518051600d555050565b60005433600160a060020a0390811691161461136157600080fd5b601355565b600054600160a060020a031681565b600554600160a060020a031681565b60116020526000908152604090205481565b60006113a06116f9565b8411156113af575060016113b3565b5060005b949350505050565b600454600090600160a060020a03166382771c8e82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561083d57600080fd5b60075481565b600f5460ff1681565b60005474010000000000000000000000000000000000000000900460ff1681565b60126020526000908152604090205460ff1681565b60005433600160a060020a0390811691161461146557600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561148e57600080fd5b6000805474ff000000000000000000000000000000000000000019169055565b60006114b86116f9565b15905090565b600160a060020a0333166000908152601260205260408120548190670de0b6b3a7640000908290819081908190819060ff161561150857611501336110006118be565b965061165d565b60028c6000604051602001526040518082805190602001908083835b602083106115435780518252601f199092019160209182019101611524565b6001836020036101000a03801982511681845116808217855250505050505090500191505060206040518083038160008661646e5a03f1151561158557600080fd5b50506040518051905094506115998c610eb9565b60155493975091955093509150600160a060020a03166001868d8d8d6040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f1151561161457600080fd5b505060206040510351600160a060020a03161461163057600080fd5b33600160a060020a031684600160a060020a031614151561165057600080fd5b61165a33846118be565b96505b600160a060020a03331660009081526012602052604090205460ff1615156116e35733600160a060020a031660009081526010602052604090205461271063ffffffff84168802049010156116b157600080fd5b33600160a060020a031660009081526010602052604090205461271063ffffffff83168802049011156116e357600080fd5b50949a9950505050505050505050565b600c5481565b600254600080549091600160a060020a039081169163dd62ed3e911630846040516020015260405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561083d57600080fd5b60005433600160a060020a0390811691161461177e57600080fd5b600160a060020a03821660009081526012602052604090819020805460ff19168315151790557fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f26440908390839051600160a060020a039092168252151560208201526040908101905180910390a15050565b60005433600160a060020a0390811691161461180a57600080fd5b600160a060020a038116151561181f57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a0390811691161461186957600080fd5b600154600c54111561187a57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600b5481565b600254600160a060020a031681565b600080548190819074010000000000000000000000000000000000000000900460ff16156118eb57600080fd5b60026118f5610869565b600781111561190057fe5b141561193257600160a060020a03851660009081526012602052604090205460ff16151561192d57600080fd5b61194e565b600361193c610869565b600781111561194757fe5b1415610221575b600354600b54600a54600954600254349650600160a060020a03948516946318a4155e94889403929133911663313ce5676000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156119b657600080fd5b6102c65a03f115156119c757600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8816028152600481019590955260248501939093526044840191909152600160a060020a03166064830152608482015260a401602060405180830381600087803b1515611a3357600080fd5b6102c65a03f11515611a4457600080fd5b5050506040518051915050801515611a5b57600080fd5b600160a060020a0385166000908152601060205260409020541515611a8457600c805460010190555b600160a060020a0385166000908152601060205260408082205473959ac6cadd10be9c16fc2b05511c30870a3d5c23926366098d4f92869190516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611afb57600080fd5b6102c65a03f41515611b0c57600080fd5b5050506040518051600160a060020a038716600090815260106020908152604080832093909355601190528181205473959ac6cadd10be9c16fc2b05511c30870a3d5c2393506366098d4f9290918591516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611b9a57600080fd5b6102c65a03f41515611bab57600080fd5b5050506040518051600160a060020a03871660009081526011602052604080822092909255600a5473959ac6cadd10be9c16fc2b05511c30870a3d5c2393506366098d4f9290918691516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611c3257600080fd5b6102c65a03f41515611c4357600080fd5b5050506040518051600a555060095473959ac6cadd10be9c16fc2b05511c30870a3d5c23906366098d4f908360006040516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611cb157600080fd5b6102c65a03f41515611cc257600080fd5b505050604051805160095550600354600160a060020a031663f14ae17d8660006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611d2757600080fd5b6102c65a03f11515611d3857600080fd5b5050506040518051905015611dc757600b5473959ac6cadd10be9c16fc2b05511c30870a3d5c236366098d4f90918460006040516020015260405160e060020a63ffffffff85160281526004810192909252602482015260440160206040518083038186803b1515611da957600080fd5b6102c65a03f41515611dba57600080fd5b5050506040518051600b55505b611dd78282600a54600954611396565b15611de157600080fd5b611deb8582611e91565b600554600160a060020a031682156108fc0283604051600060405180830381858888f193505050501515611e1e57600080fd5b7f0396f60aaad038749091d273dc13aaabc63db6e2271c7bad442d5cf25cc4335085838387604051600160a060020a03909416845260208401929092526040808401919091526fffffffffffffffffffffffffffffffff90911660608301526080909101905180910390a1949350505050565b600254601454600160a060020a03918216916323b872dd91610100900416848460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515611f0957600080fd5b6102c65a03f11515611f1a57600080fd5b505050604051805190501515610dd657600080fd00a165627a7a723058201077dc8563a980d5c6737a6774a401228079c5e00db7aab794cd4fd568a898960029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001a7a8bd9106f2b8d977e08582dc7d24c723ab0db000000000000000000000000138002773b444b644c6120214c19d5e13e5c9c4900000000000000000000000071e7c73375efbefdf7b4be67e768d9038dde2488000000000000000000000000000000000000000000000000000000005a315c90000000000000000000000000000000000000000000000000000000005a5cde100000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a684a3371e0d46bca4a6db1ff538a44f1440a855

-----Decoded View---------------
Arg [0] : _token (address): 0x1a7a8BD9106F2B8D977E08582DC7d24c723ab0DB
Arg [1] : _pricingStrategy (address): 0x138002773b444b644c6120214c19D5E13E5c9c49
Arg [2] : _multisigWallet (address): 0x71e7C73375eFBEFdf7B4be67E768D9038dde2488
Arg [3] : _start (uint256): 1513184400
Arg [4] : _end (uint256): 1516035600
Arg [5] : _minimumFundingGoal (uint256): 1
Arg [6] : _beneficiary (address): 0xa684A3371E0d46bCA4A6DB1FF538a44f1440A855

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000001a7a8bd9106f2b8d977e08582dc7d24c723ab0db
Arg [1] : 000000000000000000000000138002773b444b644c6120214c19d5e13e5c9c49
Arg [2] : 00000000000000000000000071e7c73375efbefdf7b4be67e768d9038dde2488
Arg [3] : 000000000000000000000000000000000000000000000000000000005a315c90
Arg [4] : 000000000000000000000000000000000000000000000000000000005a5cde10
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 000000000000000000000000a684a3371e0d46bca4a6db1ff538a44f1440a855


Libraries Used

BytesDeserializer : 0x8bce695330614f61346d37025da5f476f6fdbcb5Unverified

Swarm Source

bzzr://1077dc8563a980d5c6737a6774a401228079c5e00db7aab794cd4fd568a89896

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  ]
[ 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.