Contract Overview
Balance: 0 Ether
Transactions: 83911 txns
 Latest 25 transactions from a total of 83911 transactions

TxHash Age From To Value [TxFee]
0x35a7aaa329731657439b7d8cdc47507fc5e7fa92c5c851ae4aa4aa5db134543138 days 14 hrs ago0xde5a852fe6f8625b037d19615bc28c450d49fcba  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00065938
0xca1882351c111ec31625ca8053dd7925e3dbfb081178fbe478d2124cad364ee250 days 2 hrs ago0xdcf87751ec8a818e962de7e4d592ab3e10c5392b  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00025792
0xf20fa39b7fc45c87bbc6948877ac1585bd0cab5bcbcc4b6876381e0e76ec72c850 days 8 hrs ago0x6bc6048aee31b4f36950d28eed081b7cfd30cb27  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.000199755
0x909fb0df5963f7b2950d7eab9cd9f286c9070b113f506c16c991cf90435b715d50 days 8 hrs ago0x6bc6048aee31b4f36950d28eed081b7cfd30cb27  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00108773
0xc3d4f83e5cf7a829bdbc9d0f1ff1792914b39a035bcba6a22a8b201a3af1555650 days 8 hrs ago0x6bc6048aee31b4f36950d28eed081b7cfd30cb27  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00020799
0x3b45cecc661c78b40573497b7e89af5276bb77fa11aa278ef724d27c23a6b45d50 days 8 hrs ago0x15716a58b6214847871a2d60d4ce67d87fa7c398  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00361038
0xb2d0a7cdcd83deed683b088376e9a73059c8a0c73840cd94715b01114b13230a50 days 8 hrs ago0x4ba5ddee132b89032f394be349f768076f4c7f70  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00096587
0x02063bccf99ae6bbd068583db05f43394ac389d18f5fe433b8bfced3bf0a4d0350 days 8 hrs ago0x4ba5ddee132b89032f394be349f768076f4c7f70  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00028331
0x6b8694bd98d3aa2587f0958030538a24161f95dd31c3901f768d56076ac2b40050 days 8 hrs ago0x1b1de15706a206f11e164ec27ca80405d6848825  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00104411
0xca87d202f54211a898587f96c9ce020b48e23f1abcc5392fc609139e18adc3c250 days 8 hrs ago0xca5ffcd61301d1bffae57996176585f9e04f3bbc  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.000982675
0x162d719c48800a72b67e63b1cd87acbcaf645420c4aaff9499f333c23216bba750 days 8 hrs ago0x3f2ef5c5f22ed84e35771072b069a85743e4ad9f  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.000971505
0x149caf44f42aa0f17f6affff6d5fca9fab5039aca48c554dc3e726cd8a74f95d50 days 8 hrs ago0x51447ce0a502366658168bf5aaf96f51d22adcee  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00103294
0x51a2ecaf295dce66915371a978a9aedf29339ff2f9b6f3c17666d6e57293de7c50 days 8 hrs ago0x878b80f8a0cb53060049f0cc6b1235d0ba3e6865  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.0010106
0x7c2c11ac8874ef546b7a47f05bd03c0237d1e461e98edf20f841f73972ba913350 days 8 hrs ago0x97d7d0a05d2be05a908eee808b52fb6c47849d80  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00102177
0xd9bd8f9fb5f004d9ce61da1f410098c16503fe1f184ba33f75d86f9c4c5a6b5450 days 8 hrs ago0x3b880185793b4715cddd72a34794922fd76536a8  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00099831
0xf49b2e8d4e96fa2a888d588e914a5731599cc5e67e647de016af6b2dc284cb5a50 days 8 hrs ago0x8f760dacb34d0b094b2133e2e58f90c76b599aea  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00102172
0x9483afbf1c5015ddfa659cf52c73ba0a856785e84bfe69567fd89a7d465d5da650 days 8 hrs ago0xc6756e93cb74f8c786722491910dd245e162fa2b  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00102177
0xe95746aa75952973d0a1cfbd4a8bbafbc84e7e6bb9f9046d0597f88658d00bc450 days 8 hrs ago0xabc98d1bd48190a2e57f3c7c606f87cff7df7bf5  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00098826
0x9b5d850fe35ee29a2058fa44cbac9f8c299a6b6487f469f830d8b3a6ec67259d50 days 8 hrs ago0x8f9b2e444a5f6633bfd4089ddc8e94749b6e41bc  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00097704
0xc42c1833482a382294ff1771c0014357a6f53721de357faea90af43f9415894350 days 8 hrs ago0x8d8377a108bbb5f457c779f1947080620a8547b4  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00097704
0x1c420cd33ba9383438d5a76d1ba78974ed618fd3426d69361a7381579e8a49f650 days 8 hrs ago0xc7917fad4c4255f1925cc0b23fcfeb4548446ad4  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00096592
0x9791122577391c2ef4e8caddb5565ff5f74041d776c0b9b7c56962f85369cb4250 days 8 hrs ago0x08ef1df01ab47f5d3cb0b4a6a846feb1393b630c  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.000993845
0xc3de5b7f5ad10dc63fc5720d2cba21911d7e4c38f7ee6d074cb868fcbd90157250 days 8 hrs ago0xdd53ba2db10d079203968a9ccd9d5401b6aa1f74  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00097602
0x028d4edfc24a5340afeb982c06a1dec731f7171f5a7207e54e8bef1ec18abd1f50 days 8 hrs ago0x9719f3a6c5ab9b5e4510a6851dd78ef57cda4d77  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.00098556
0xe72589eb18b110127abb4030043417b46dc9aaf232d02283b18e308de85d719150 days 8 hrs ago0x80730259a1e1a7dff220787f66678b6458023243  IN   0x627b7731bb76cca3ff60c201ed108a8067cf2d8c0 Ether0.000971505
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: BiddingTest
Compiler Text: v0.4.24-nightly.2018.5.16+commit.7f965c86
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.23;

library SafeMath {
	function mul(uint256 a, uint256 b) internal pure returns (uint256) {
		uint256 c = a * b;
		assert(a == 0 || c / a == b);
		return c;
	}

	function div(uint256 a, uint256 b) internal pure returns (uint256) {
		// assert(b > 0); // Solidity automatically throws when dividing by 0
		uint256 c = a / b;
		// assert(a == b * c + a % b); // There is no case in which this doesn't hold
		return c;
	}

	function sub(uint256 a, uint256 b) internal pure returns (uint256) {
		assert(b <= a);
		return a - b;
	}

	function add(uint256 a, uint256 b) internal pure returns (uint256) {
		uint256 c = a + b;
		assert(c >= a);
		return c;
	}
}

/**
 * @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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

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

     /**
     * @dev Throws if called by any account other than the owner.
     */
     modifier onlyOwner() {
          require(msg.sender == owner, "Only owner can execute this action");
          _;
     }

     /**
     * @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 {
          require(newOwner != address(0));
          emit OwnershipTransferred(owner, newOwner);
          owner = newOwner;
     }

 }

contract ERC20Basic {
	uint256 public totalSupply;
	function balanceOf(address who) public constant returns (uint256);
	function transfer(address to, uint256 value) public returns (bool);
	event Transfer(address indexed from, address indexed to, uint256 value);
}

contract ERC20 is ERC20Basic {
	function allowance(address owner, address spender) public constant 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);
}

contract EscrowHolder {
	function initiateEscrow(address DC_wallet, address DH_wallet, bytes32 import_id, uint token_amount, uint stake_amount, uint total_time_in_minutes) public;
}

contract BiddingTest is Ownable{
	using SafeMath for uint256;

	ERC20 public token;
	EscrowHolder public escrow;
	address public reading;
	uint public replication_modifier;

	modifier onlyContracts() {
		require(EscrowHolder(msg.sender) == escrow || msg.sender == reading, "Only contracts can execute this function");
		_;
	}

	modifier senderNotZero() {
          require(msg.sender != address(0), "Sender address cannot be 0");
          _;
     }
	
	function BiddingTest(address token_address, address escrow_address, address reading_address)
	public senderNotZero {
		require ( token_address != address(0) && escrow_address != address(0) && reading_address != address(0),
			"No input addresses can be 0");
		token = ERC20(token_address);
		escrow = EscrowHolder(escrow_address);
		reading = reading_address;
		active_nodes = 0;
		replication_modifier = 1;
	}

	function setReplicationModifier(uint newModifier)
	public onlyOwner senderNotZero{
		replication_modifier = newModifier;
	}


	/*    ----------------------------- BIDDING -----------------------------     */


	struct OfferDefinition{
		address DC_wallet;

		//Parameters for DH filtering
		uint max_token_amount_per_byte_minute;
		uint min_stake_amount_per_byte_minute; 
		uint min_reputation;

		//Data holding parameters
		uint total_escrow_time_in_minutes;
		uint data_size_in_bytes;

		//Parameters for the bidding ranking
		bytes32 data_hash;
		uint first_bid_index;

		uint replication_factor;

		bool active;
		bool finalized;

		// uint256 offer_creation_timestamp;

		BidDefinition[] bid;

		uint replication_modifier;
	}

	struct ProfileDefinition{
		//Offer Parameters
		uint token_amount_per_byte_minute; //Per byte per minute
		uint stake_amount_per_byte_minute; //Per byte per minute

		uint read_stake_factor;

		uint balance;
		uint reputation;
		uint number_of_escrows;

		uint max_escrow_time_in_minutes;

		bool active;
	}

	struct BidDefinition{
		address DH_wallet;
		bytes32 DH_node_id;

		uint token_amount_for_escrow;
		uint stake_amount_for_escrow;

		uint256 distance;

		uint next_bid;

		bool active;
		bool chosen;
	}

	uint256 public active_nodes;
	mapping(bytes32 => OfferDefinition) public offer; //offer[import_id] import_id
	mapping(address => ProfileDefinition) public profile; //profile[wallet]

	event OfferCreated(bytes32 import_id, bytes32 DC_node_id, uint total_escrow_time_in_minutes, uint max_token_amount_per_byte_minute, uint min_stake_amount_per_byte_minute, uint min_reputation, uint data_size_in_bytes, bytes32 data_hash);
	event OfferCanceled(bytes32 import_id);
	event AddedBid(bytes32 import_id, address DH_wallet, bytes32 DH_node_id, uint bid_index);
	event AddedPredeterminedBid(bytes32 import_id, address DH_wallet, bytes32 DH_node_id, uint bid_index, uint total_escrow_time_in_minutes, uint max_token_amount_per_byte_minute, uint min_stake_amount_per_byte_minute, uint data_size_in_bytes);
	event FinalizeOfferReady(bytes32 import_id);
	event BidTaken(bytes32 import_id, address DH_wallet);
	event OfferFinalized(bytes32 import_id);

	/*    ----------------------------- OFFERS -----------------------------     */

	function createOffer(
		bytes32 import_id,
		bytes32 DC_node_id,

		uint total_escrow_time_in_minutes, 
		uint max_token_amount_per_byte_minute,
		uint min_stake_amount_per_byte_minute,
		uint min_reputation,

		bytes32 data_hash,
		uint data_size_in_bytes,

		address[] predetermined_DH_wallet,
		bytes32[] predetermined_DH_node_id)
	public senderNotZero{
		OfferDefinition storage this_offer = offer[import_id];

		require(max_token_amount_per_byte_minute > 0 && total_escrow_time_in_minutes > 0 && data_size_in_bytes > 0,
			"Tokens, time and size cannot be 0");
		require(this_offer.active == false,
			"Offer is already active");

		uint256 max_total_token_amount = max_token_amount_per_byte_minute.mul(predetermined_DH_wallet.length.mul(2).add(replication_modifier));
		max_total_token_amount = max_total_token_amount.mul(data_size_in_bytes).mul(total_escrow_time_in_minutes);
		
		require(profile[msg.sender].balance >= max_total_token_amount,
			"Sender does not have enough funds on profile for replication");
		

		profile[msg.sender].balance = profile[msg.sender].balance.sub(max_total_token_amount);
		emit BalanceModified(msg.sender, profile[msg.sender].balance);

		this_offer.DC_wallet = msg.sender;

		this_offer.total_escrow_time_in_minutes = total_escrow_time_in_minutes;
		this_offer.max_token_amount_per_byte_minute = max_token_amount_per_byte_minute;
		this_offer.min_stake_amount_per_byte_minute = min_stake_amount_per_byte_minute;
		this_offer.min_reputation = min_reputation;

		this_offer.data_hash = data_hash;
		this_offer.data_size_in_bytes = data_size_in_bytes;

		this_offer.replication_factor = predetermined_DH_wallet.length;

		this_offer.active = true;
		this_offer.finalized = false;

		this_offer.first_bid_index = uint(-1);
		this_offer.replication_modifier = replication_modifier;
		// this_offer.offer_creation_timestamp = block.timestamp;

		//Writing the predetermined DC into the bid list
		while(this_offer.bid.length < predetermined_DH_wallet.length) {
			BidDefinition memory bid_def = BidDefinition(predetermined_DH_wallet[this_offer.bid.length], predetermined_DH_node_id[this_offer.bid.length], 0, 0, 0, 0, false, false);
			this_offer.bid.push(bid_def);
			emit AddedPredeterminedBid(import_id, bid_def.DH_wallet, bid_def.DH_node_id, this_offer.bid.length - 1, total_escrow_time_in_minutes, max_token_amount_per_byte_minute, min_stake_amount_per_byte_minute, data_size_in_bytes);
		}

		emit OfferCreated(import_id, DC_node_id, total_escrow_time_in_minutes, max_token_amount_per_byte_minute, min_stake_amount_per_byte_minute, min_reputation, data_size_in_bytes, data_hash);
	}

	//TODO Decide when and under which conditions DC can cancel an offer
	function cancelOffer(bytes32 import_id)
	public senderNotZero{
		OfferDefinition storage this_offer = offer[import_id];
		require(this_offer.active, "Offer is not active");
		require(this_offer.DC_wallet == msg.sender, "Only offer creator can call this function");
		require(this_offer.finalized == false, "Offer is already finalized");
		this_offer.active = false;
		uint256 max_total_token_amount = this_offer.max_token_amount_per_byte_minute.mul(this_offer.replication_factor.mul(2).add(this_offer.replication_modifier));
		max_total_token_amount = max_total_token_amount.mul(this_offer.data_size_in_bytes).mul(this_offer.total_escrow_time_in_minutes);

		profile[msg.sender].balance = profile[msg.sender].balance.add(max_total_token_amount);
		emit BalanceModified(msg.sender, profile[msg.sender].balance);
		emit OfferCanceled(import_id);
	}

	function activatePredeterminedBid(bytes32 import_id, bytes32 DH_node_id, uint bid_index)
	public senderNotZero{
		require(offer[import_id].active && !offer[import_id].finalized, "Offer is inactive and/or finalized");

		OfferDefinition storage this_offer = offer[import_id];
		ProfileDefinition storage this_DH = profile[msg.sender];
		BidDefinition storage this_bid = offer[import_id].bid[bid_index];

		require(this_bid.DH_wallet == msg.sender, "Sender address not equal to selected predetermined bid address");
		require(this_bid.DH_node_id == DH_node_id, "Sender identity not equal to selected predetermined bid identity");

		//Check if the the DH meets the filters DC set for the offer
		uint scope = this_offer.data_size_in_bytes * this_offer.total_escrow_time_in_minutes;
		require(this_offer.total_escrow_time_in_minutes <= this_DH.max_escrow_time_in_minutes,
			"Escrow time greater than senders max escrow time");
		require(this_offer.max_token_amount_per_byte_minute  >= this_DH.token_amount_per_byte_minute,
			"Sender price too high");
		require(this_offer.min_stake_amount_per_byte_minute  <= this_DH.stake_amount_per_byte_minute,
			"Sender stake too low");
		require(this_DH.stake_amount_per_byte_minute * scope <= profile[msg.sender].balance,
			"Sender has insuficient funds on profile for stake amount");

		//Write the required data for the bid
		this_bid.token_amount_for_escrow = this_DH.token_amount_per_byte_minute * scope;
		this_bid.stake_amount_for_escrow = this_DH.stake_amount_per_byte_minute * scope;
		this_bid.active = true;
	}

	function getDistanceParameters(bytes32 import_id)
	public senderNotZero view returns (bytes32 node_hash, bytes32 data_hash, uint256 distance, uint256 current_ranking, uint256 required_bid_amount, uint256 active_nodes_){
		OfferDefinition storage this_offer = offer[import_id];

		node_hash = bytes32(uint128(keccak256(msg.sender)));
		data_hash = bytes32(uint128(this_offer.data_hash));


		distance = calculateDistance(import_id, msg.sender);
		required_bid_amount = this_offer.replication_factor.mul(2).add(this_offer.replication_modifier);
		active_nodes_ = active_nodes;

		if(this_offer.first_bid_index == uint(-1)){
			current_ranking = 0;
		}
		else{
			uint256 current_index = this_offer.first_bid_index;
			current_ranking = 0;
			while(this_offer.bid[current_index].next_bid != uint(-1) && this_offer.bid[current_index].distance >= distance){
				current_index = this_offer.bid[current_index].next_bid;
				current_ranking++;
			}
		}
	}

	function addBid(bytes32 import_id, bytes32 DH_node_id)
	public senderNotZero returns (uint distance){
		require(offer[import_id].active && !offer[import_id].finalized, "Offer inactive or finalized");

		OfferDefinition storage this_offer = offer[import_id];
		ProfileDefinition storage this_DH = profile[msg.sender];

		//Check if the the DH meets the filters DC set for the offer
		uint scope = this_offer.data_size_in_bytes * this_offer.total_escrow_time_in_minutes;
		require(this_offer.total_escrow_time_in_minutes <= this_DH.max_escrow_time_in_minutes,
			"Escrow time greater than senders max escrow time");
		require(this_offer.max_token_amount_per_byte_minute  >= this_DH.token_amount_per_byte_minute,
			"Sender price too high");
		require(this_offer.min_stake_amount_per_byte_minute  <= this_DH.stake_amount_per_byte_minute,
			"Sender stake too low");
		require(this_DH.stake_amount_per_byte_minute * scope <= profile[msg.sender].balance,
			"Sender has insuficient funds on profile for stake amount");
		require(this_offer.min_reputation 	 <= profile[msg.sender].reputation,
			"Sender reputation lower than required");

		//Create new bid in the list
		uint this_bid_index = this_offer.bid.length;
		BidDefinition memory new_bid = BidDefinition(msg.sender, DH_node_id, this_DH.token_amount_per_byte_minute * scope, this_DH.stake_amount_per_byte_minute * scope, 0, uint(-1), true, false);
		new_bid.distance = calculateDistance(import_id, msg.sender);

		distance = new_bid.distance;

		//Insert the bid in the proper place in the list
		if(this_offer.first_bid_index == uint(-1)){
			this_offer.first_bid_index = this_bid_index;
			this_offer.bid.push(new_bid);
		}
		else{
			uint256 current_index = this_offer.first_bid_index;
			uint256 previous_index = uint(-1);
			if(this_offer.bid[current_index].distance < new_bid.distance){
				this_offer.first_bid_index = this_bid_index;
				new_bid.next_bid = current_index;
				this_offer.bid.push(new_bid);
			}
			else {
				while(current_index != uint(-1) && this_offer.bid[current_index].distance >= new_bid.distance){
					previous_index = current_index;
					current_index = this_offer.bid[current_index].next_bid;
				}
				if(current_index == uint(-1)){
					this_offer.bid[previous_index].next_bid = this_bid_index;
					this_offer.bid.push(new_bid);
				}
				else{
					new_bid.next_bid = current_index;
					this_offer.bid[previous_index].next_bid = this_bid_index;
					this_offer.bid.push(new_bid);
				}
			}
		}

		if(this_offer.bid.length >= this_offer.replication_factor.mul(3).add(this_offer.replication_modifier)) emit FinalizeOfferReady(import_id);

		emit AddedBid(import_id, msg.sender, DH_node_id, this_bid_index);
		// return this_bid_index;
	}

	function getBidIndex(bytes32 import_id, bytes32 DH_node_id) public senderNotZero view returns(uint){
		OfferDefinition storage this_offer = offer[import_id];
		uint256 i = 0;
		while(i < this_offer.bid.length && (offer[import_id].bid[i].DH_wallet != msg.sender || offer[import_id].bid[i].DH_node_id != DH_node_id)) i = i + 1;
		if( i == this_offer.bid.length) return uint(-1);
		else return i;
	}

	function cancelBid(bytes32 import_id, uint bid_index)
	public senderNotZero{
		require(offer[import_id].bid[bid_index].DH_wallet == msg.sender,
			"Selected bid not created by sender");
		offer[import_id].bid[bid_index].active = false;
	}

	function chooseBids(bytes32 import_id) public senderNotZero returns (uint256[] chosen_data_holders){

		OfferDefinition storage this_offer = offer[import_id];
		require(this_offer.active && !this_offer.finalized, "Offer inactive or finalized");
		require(this_offer.replication_factor.mul(3).add(this_offer.replication_modifier) <= this_offer.bid.length,
			"Not enough bids");
		// require(this_offer.offer_creation_timestamp + 5 minutes < block.timestamp);
		
		chosen_data_holders = new uint256[](this_offer.replication_factor.mul(2).add(this_offer.replication_modifier));

		uint256 i;
		uint256 current_index = 0;

		uint256 token_amount_sent = 0;
		uint256 max_total_token_amount = this_offer.max_token_amount_per_byte_minute.mul(this_offer.replication_factor.mul(2).add(this_offer.replication_modifier));
		max_total_token_amount = max_total_token_amount.mul(this_offer.data_size_in_bytes).mul(this_offer.total_escrow_time_in_minutes);

		//Sending escrow requests to predetermined bids
		for(i = 0; i < this_offer.replication_factor; i = i + 1){
			BidDefinition storage chosen_bid = this_offer.bid[i];
			ProfileDefinition storage chosen_DH = profile[chosen_bid.DH_wallet];				

			if(profile[chosen_bid.DH_wallet].balance >= chosen_bid.stake_amount_for_escrow && chosen_bid.active){
				//Initiating new escrow
				escrow.initiateEscrow(msg.sender, chosen_bid.DH_wallet, import_id, chosen_bid.token_amount_for_escrow, chosen_bid.stake_amount_for_escrow, this_offer.total_escrow_time_in_minutes);

				token_amount_sent = token_amount_sent.add(chosen_bid.token_amount_for_escrow);

				chosen_bid.chosen = true;
				chosen_data_holders[current_index] = i;
				current_index = current_index + 1;

				emit BidTaken(import_id, chosen_bid.DH_wallet);
			}
		}		

		//Sending escrow requests to network bids
		uint256 bid_index = this_offer.first_bid_index;
		while(current_index < this_offer.replication_factor.mul(2).add(this_offer.replication_modifier)) {

			while(bid_index != uint(-1) && !this_offer.bid[bid_index].active){
				bid_index = this_offer.bid[bid_index].next_bid;
			} 
			if(bid_index == uint(-1)) break;

			chosen_bid = this_offer.bid[bid_index];
			chosen_DH = profile[chosen_bid.DH_wallet];

			if(profile[chosen_bid.DH_wallet].balance >= chosen_bid.stake_amount_for_escrow){
				//Initiating new escrow
				escrow.initiateEscrow(msg.sender, chosen_bid.DH_wallet, import_id, chosen_bid.token_amount_for_escrow, chosen_bid.stake_amount_for_escrow, this_offer.total_escrow_time_in_minutes);

				token_amount_sent = token_amount_sent.add(chosen_bid.token_amount_for_escrow);

				chosen_bid.chosen = true;
				chosen_data_holders[current_index] = bid_index;
				current_index = current_index + 1;
				bid_index = this_offer.bid[bid_index].next_bid;

				emit BidTaken(import_id, chosen_bid.DH_wallet);
			}
			else{
				chosen_bid.active = false;
			}
		}

		offer[import_id].finalized = true;

		profile[msg.sender].balance = profile[msg.sender].balance.add(max_total_token_amount.sub(token_amount_sent));
		emit BalanceModified(msg.sender, profile[msg.sender].balance);
		emit OfferFinalized(import_id); 
	}


	function isBidChosen(bytes32 import_id, uint bid_index) public senderNotZero constant returns (bool _isBidChosen){
		return offer[import_id].bid[bid_index].chosen;
	}

	function getOfferStatus(bytes32 import_id) public senderNotZero constant returns (bool isOfferFinal){
		return offer[import_id].finalized;
	}

	/*    ----------------------------- PROFILE -----------------------------    */

	event ProfileCreated(address wallet, bytes32 node_id);
	event BalanceModified(address wallet, uint new_balance);
	event ReputationModified(address wallet, uint new_balance);

	function createProfile(bytes32 node_id, uint price_per_byte_minute, uint stake_per_byte_minute, uint read_stake_factor, uint max_time_in_minutes) public senderNotZero{
		ProfileDefinition storage this_profile = profile[msg.sender];
		if(!this_profile.active) active_nodes = active_nodes.add(1);

		this_profile.token_amount_per_byte_minute = price_per_byte_minute;
		this_profile.stake_amount_per_byte_minute = stake_per_byte_minute;

		this_profile.read_stake_factor = read_stake_factor;
		this_profile.max_escrow_time_in_minutes = max_time_in_minutes;

		this_profile.active = true;
		emit ProfileCreated(msg.sender, node_id);
	}

	function setPrice(uint new_price_per_byte_minute) public senderNotZero{
		profile[msg.sender].token_amount_per_byte_minute = new_price_per_byte_minute;
	}

	function setStake(uint new_stake_per_byte_minute) public senderNotZero{
		profile[msg.sender].stake_amount_per_byte_minute = new_stake_per_byte_minute;
	}

	function setMaxTime(uint new_max_time_in_minutes) public senderNotZero{
		profile[msg.sender].max_escrow_time_in_minutes = new_max_time_in_minutes;
	}

	function depositToken(uint amount) public senderNotZero{
		require(token.balanceOf(msg.sender) >= amount, "Sender has insuficient tokens for depositing");
		require(token.allowance(msg.sender, this) >= amount, "Insuficient allowance for depositing");
		uint amount_to_transfer = amount;
		amount = 0;
		if(amount_to_transfer > 0) {
			token.transferFrom(msg.sender, this, amount_to_transfer);
			profile[msg.sender].balance = profile[msg.sender].balance.add(amount_to_transfer);
			emit BalanceModified(msg.sender, profile[msg.sender].balance);
		}
	}

	function withdrawToken(uint amount) public senderNotZero{
		uint256 amount_to_transfer;
		if(profile[msg.sender].balance >= amount){
			amount_to_transfer = amount;
			profile[msg.sender].balance = profile[msg.sender].balance.sub(amount);
		}
		else{ 
			amount_to_transfer = profile[msg.sender].balance;
			profile[msg.sender].balance = 0;
		}
		amount = 0;
		if(amount_to_transfer > 0){
			token.transfer(msg.sender, amount_to_transfer);
			emit BalanceModified(msg.sender, profile[msg.sender].balance);
		} 
	}

	function increaseBalance(address wallet, uint amount) public onlyContracts senderNotZero{
		profile[wallet].balance = profile[wallet].balance.add(amount);
		emit BalanceModified(wallet, profile[wallet].balance);
	}

	function decreaseBalance(address wallet, uint amount) public onlyContracts senderNotZero{
		require(profile[wallet].balance >= amount, "Insuficient profile balance");
		profile[wallet].balance = profile[wallet].balance.sub(amount);
		emit BalanceModified(wallet, profile[wallet].balance);
	}

	function increaseReputation(address wallet, uint amount) public onlyContracts senderNotZero{
		profile[wallet].reputation = profile[wallet].reputation.add(amount);
		emit ReputationModified(wallet, profile[wallet].reputation);
	}

	function addEscrow(address wallet) public onlyContracts senderNotZero{
		profile[wallet].number_of_escrows = profile[wallet].number_of_escrows.add(1);
	}

	function getBalance(address wallet)
	public view returns (uint256) {
		return profile[wallet].balance;
	}

	function absoluteDifference(uint256 a, uint256 b) public pure returns (uint256) {
		if (a > b) return a-b;
		else return b-a;
	}

	function log2(uint x) internal pure returns (uint y){
		require(x > 0, "log(0) not allowed");
		assembly {
			let arg := x
			x := sub(x,1)
			x := or(x, div(x, 0x02))
			x := or(x, div(x, 0x04))
			x := or(x, div(x, 0x10))
			x := or(x, div(x, 0x100))
			x := or(x, div(x, 0x10000))
			x := or(x, div(x, 0x100000000))
			x := or(x, div(x, 0x10000000000000000))
			x := or(x, div(x, 0x100000000000000000000000000000000))
			x := add(x, 1)
			let m := mload(0x40)
			mstore(m,           0xf8f9cbfae6cc78fbefe7cdc3a1793dfcf4f0e8bbd8cec470b6a28a7a5a3e1efd)
			mstore(add(m,0x20), 0xf5ecf1b3e9debc68e1d9cfabc5997135bfb7a7a3938b7b606b5b4b3f2f1f0ffe)
			mstore(add(m,0x40), 0xf6e4ed9ff2d6b458eadcdf97bd91692de2d4da8fd2d0ac50c6ae9a8272523616)
			mstore(add(m,0x60), 0xc8c0b887b0a8a4489c948c7f847c6125746c645c544c444038302820181008ff)
			mstore(add(m,0x80), 0xf7cae577eec2a03cf3bad76fb589591debb2dd67e0aa9834bea6925f6a4a2e0e)
			mstore(add(m,0xa0), 0xe39ed557db96902cd38ed14fad815115c786af479b7e83247363534337271707)
			mstore(add(m,0xc0), 0xc976c13bb96e881cb166a933a55e490d9d56952b8d4e801485467d2362422606)
			mstore(add(m,0xe0), 0x753a6d1b65325d0c552a4d1345224105391a310b29122104190a110309020100)
			mstore(0x40, add(m, 0x100))
			let magic := 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff
			let shift := 0x100000000000000000000000000000000000000000000000000000000000000
			let a := div(mul(x, magic), shift)
			y := div(mload(add(m,sub(255,a))), shift)
			y := add(y, mul(256, gt(arg, 0x8000000000000000000000000000000000000000000000000000000000000000)))
		}
	}

	
	// corrective_factor = 10^10;
	// DH_stake = 10^20
	// min_stake_amount_per_byte_minute = 10^18
	// data_hash = 1234567890
	// DH_node_id = 123456789011
	// max_token_amount_per_byte_minute = 100000000
	// token_amount = 10000
	// min_reputation = 10
	// reputation = 60
	// hash_difference = abs(data_hash - DH_node_id)
	// hash_f = (data_hash * (2^128)) / (hash_difference + data_hash)
	// price_f = corrective_factor - ((corrective_factor * token_amount) / max_token_amount_per_byte_minute)
	// stake_f = (corrective_factor - ((min_stake_amount_per_byte_minute * corrective_factor) / DH_stake)) * data_hash / (hash_difference + data_hash)
	// rep_f = (corrective_factor - (min_reputation * corrective_factor / reputation))
	// distance = ((hash_f * (corrective_factor + price_f + stake_`f + rep_f)) / 4) / corrective_factor 

	// Constant values used for distance calculation
	uint256 corrective_factor = 10**10;

	function calculateDistance(bytes32 import_id, address DH_wallet)
	public senderNotZero view returns (uint256 distance) {
		OfferDefinition storage this_offer = offer[import_id];
		ProfileDefinition storage this_DH = profile[DH_wallet];

		uint256 stake_amount;
		if (this_DH.stake_amount_per_byte_minute == 0) stake_amount = 1;
		else stake_amount = this_DH.stake_amount_per_byte_minute * this_offer.total_escrow_time_in_minutes.mul(this_offer.data_size_in_bytes);
		uint256 token_amount = this_DH.token_amount_per_byte_minute * this_offer.total_escrow_time_in_minutes.mul(this_offer.data_size_in_bytes);

		uint256 reputation;
		if(this_DH.number_of_escrows == 0 || this_DH.reputation == 0) reputation = 1;
		else reputation = (log2(this_DH.reputation / this_DH.number_of_escrows) * corrective_factor / 115) / (corrective_factor / 100);
		if(reputation == 0) reputation = 1;

		uint256 hash_difference = absoluteDifference(uint256(uint128(this_offer.data_hash)), uint256(uint128(keccak256(DH_wallet))));

		uint256 hash_f = ((uint256(uint128(this_offer.data_hash)) * (2**128)) / (hash_difference + uint256(uint128(this_offer.data_hash))));
		uint256 price_f = corrective_factor - ((corrective_factor * token_amount) / this_offer.max_token_amount_per_byte_minute);
		uint256 stake_f = ((corrective_factor - ((this_offer.min_stake_amount_per_byte_minute * corrective_factor) / stake_amount)) * uint256(uint128(this_offer.data_hash))) / (hash_difference + uint256(uint128(this_offer.data_hash)));
		uint256 rep_f = (corrective_factor - (this_offer.min_reputation * corrective_factor / reputation));
		distance = ((hash_f * (corrective_factor + price_f + stake_f + rep_f)) / 4) / corrective_factor;
	}
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"import_id","type":"bytes32"},{"name":"DH_node_id","type":"bytes32"}],"name":"addBid","outputs":[{"name":"distance","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"new_stake_per_byte_minute","type":"uint256"}],"name":"setStake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"import_id","type":"bytes32"},{"name":"DC_node_id","type":"bytes32"},{"name":"total_escrow_time_in_minutes","type":"uint256"},{"name":"max_token_amount_per_byte_minute","type":"uint256"},{"name":"min_stake_amount_per_byte_minute","type":"uint256"},{"name":"min_reputation","type":"uint256"},{"name":"data_hash","type":"bytes32"},{"name":"data_size_in_bytes","type":"uint256"},{"name":"predetermined_DH_wallet","type":"address[]"},{"name":"predetermined_DH_node_id","type":"bytes32[]"}],"name":"createOffer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"import_id","type":"bytes32"},{"name":"bid_index","type":"uint256"}],"name":"cancelBid","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"},{"name":"amount","type":"uint256"}],"name":"increaseBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"import_id","type":"bytes32"}],"name":"getOfferStatus","outputs":[{"name":"isOfferFinal","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"depositToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"a","type":"uint256"},{"name":"b","type":"uint256"}],"name":"absoluteDifference","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"import_id","type":"bytes32"},{"name":"DH_node_id","type":"bytes32"},{"name":"bid_index","type":"uint256"}],"name":"activatePredeterminedBid","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"new_price_per_byte_minute","type":"uint256"}],"name":"setPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"import_id","type":"bytes32"}],"name":"getDistanceParameters","outputs":[{"name":"node_hash","type":"bytes32"},{"name":"data_hash","type":"bytes32"},{"name":"distance","type":"uint256"},{"name":"current_ranking","type":"uint256"},{"name":"required_bid_amount","type":"uint256"},{"name":"active_nodes_","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"new_max_time_in_minutes","type":"uint256"}],"name":"setMaxTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"profile","outputs":[{"name":"token_amount_per_byte_minute","type":"uint256"},{"name":"stake_amount_per_byte_minute","type":"uint256"},{"name":"read_stake_factor","type":"uint256"},{"name":"balance","type":"uint256"},{"name":"reputation","type":"uint256"},{"name":"number_of_escrows","type":"uint256"},{"name":"max_escrow_time_in_minutes","type":"uint256"},{"name":"active","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"active_nodes","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"import_id","type":"bytes32"},{"name":"bid_index","type":"uint256"}],"name":"isBidChosen","outputs":[{"name":"_isBidChosen","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"import_id","type":"bytes32"},{"name":"DH_node_id","type":"bytes32"}],"name":"getBidIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"replication_modifier","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"node_id","type":"bytes32"},{"name":"price_per_byte_minute","type":"uint256"},{"name":"stake_per_byte_minute","type":"uint256"},{"name":"read_stake_factor","type":"uint256"},{"name":"max_time_in_minutes","type":"uint256"}],"name":"createProfile","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"}],"name":"addEscrow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"import_id","type":"bytes32"}],"name":"chooseBids","outputs":[{"name":"chosen_data_holders","type":"uint256[]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"import_id","type":"bytes32"},{"name":"DH_wallet","type":"address"}],"name":"calculateDistance","outputs":[{"name":"distance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"offer","outputs":[{"name":"DC_wallet","type":"address"},{"name":"max_token_amount_per_byte_minute","type":"uint256"},{"name":"min_stake_amount_per_byte_minute","type":"uint256"},{"name":"min_reputation","type":"uint256"},{"name":"total_escrow_time_in_minutes","type":"uint256"},{"name":"data_size_in_bytes","type":"uint256"},{"name":"data_hash","type":"bytes32"},{"name":"first_bid_index","type":"uint256"},{"name":"replication_factor","type":"uint256"},{"name":"active","type":"bool"},{"name":"finalized","type":"bool"},{"name":"replication_modifier","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"},{"name":"amount","type":"uint256"}],"name":"increaseReputation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"escrow","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"wallet","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"import_id","type":"bytes32"}],"name":"cancelOffer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"},{"name":"amount","type":"uint256"}],"name":"decreaseBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newModifier","type":"uint256"}],"name":"setReplicationModifier","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reading","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"token_address","type":"address"},{"name":"escrow_address","type":"address"},{"name":"reading_address","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"import_id","type":"bytes32"},{"indexed":false,"name":"DC_node_id","type":"bytes32"},{"indexed":false,"name":"total_escrow_time_in_minutes","type":"uint256"},{"indexed":false,"name":"max_token_amount_per_byte_minute","type":"uint256"},{"indexed":false,"name":"min_stake_amount_per_byte_minute","type":"uint256"},{"indexed":false,"name":"min_reputation","type":"uint256"},{"indexed":false,"name":"data_size_in_bytes","type":"uint256"},{"indexed":false,"name":"data_hash","type":"bytes32"}],"name":"OfferCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"import_id","type":"bytes32"}],"name":"OfferCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"import_id","type":"bytes32"},{"indexed":false,"name":"DH_wallet","type":"address"},{"indexed":false,"name":"DH_node_id","type":"bytes32"},{"indexed":false,"name":"bid_index","type":"uint256"}],"name":"AddedBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"import_id","type":"bytes32"},{"indexed":false,"name":"DH_wallet","type":"address"},{"indexed":false,"name":"DH_node_id","type":"bytes32"},{"indexed":false,"name":"bid_index","type":"uint256"},{"indexed":false,"name":"total_escrow_time_in_minutes","type":"uint256"},{"indexed":false,"name":"max_token_amount_per_byte_minute","type":"uint256"},{"indexed":false,"name":"min_stake_amount_per_byte_minute","type":"uint256"},{"indexed":false,"name":"data_size_in_bytes","type":"uint256"}],"name":"AddedPredeterminedBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"import_id","type":"bytes32"}],"name":"FinalizeOfferReady","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"import_id","type":"bytes32"},{"indexed":false,"name":"DH_wallet","type":"address"}],"name":"BidTaken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"import_id","type":"bytes32"}],"name":"OfferFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"wallet","type":"address"},{"indexed":false,"name":"node_id","type":"bytes32"}],"name":"ProfileCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"wallet","type":"address"},{"indexed":false,"name":"new_balance","type":"uint256"}],"name":"BalanceModified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"wallet","type":"address"},{"indexed":false,"name":"new_balance","type":"uint256"}],"name":"ReputationModified","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60806040526402540be4006008553480156200001a57600080fd5b5060405160608062003f8083398101604090815281516020830151919092015160008054600160a060020a031916339081179091551515620000bd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f53656e64657220616464726573732063616e6e6f742062652030000000000000604482015290519081900360640190fd5b600160a060020a03831615801590620000de5750600160a060020a03821615155b8015620000f35750600160a060020a03811615155b15156200016157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4e6f20696e707574206164647265737365732063616e20626520300000000000604482015290519081900360640190fd5b60018054600160a060020a03948516600160a060020a03199182161782556002805494861694821694909417909355600380549290941691909216179091556000600555600455613dc880620001b86000396000f3006080604052600436106101875763ffffffff60e060020a60003504166329edfe5c811461018c57806335d9db53146101b957806350baa622146101d3578063519d3eb9146101eb57806358b9cddd1461029a5780635b86f599146102b55780635ec8fcb3146102d95780636215be77146103055780637fcc5cf81461031d5780638da5cb5b146103385780638fa46d821461036957806391b7f5ed1461038757806395dd50441461039f57806398b777e7146103ea5780639dd9d0fd14610402578063a498deb114610466578063a57f4fa51461047b578063c74acfcd14610496578063c914807e146104b1578063cbfc89ef146104c6578063cc224d44146104ea578063d175c07b1461050b578063d49d021c14610573578063dec4b4b814610597578063ded86d681461061c578063e2fdcc1714610640578063f2fde38b14610655578063f8b2cb4f14610676578063f952279e14610697578063fc0c546a146106af578063ff056949146106c4578063ffd3405f146106e8578063fffd52c614610700575b600080fd5b34801561019857600080fd5b506101a7600435602435610715565b60408051918252519081900360200190f35b3480156101c557600080fd5b506101d1600435610fb0565b005b3480156101df57600080fd5b506101d160043561100a565b3480156101f757600080fd5b506040805161010435600481810135602081810285810182019096528185526101d195833595602480359660443596606435966084359660a4359660c4359660e435963696610124959294910192829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506111a69650505050505050565b3480156102a657600080fd5b506101d160043560243561173d565b3480156102c157600080fd5b506101d1600160a060020a036004351660243561187a565b3480156102e557600080fd5b506102f16004356119b2565b604080519115158252519081900360200190f35b34801561031157600080fd5b506101d1600435611a17565b34801561032957600080fd5b506101a7600435602435611d8e565b34801561034457600080fd5b5061034d611dac565b60408051600160a060020a039092168252519081900360200190f35b34801561037557600080fd5b506101d1600435602435604435611dbb565b34801561039357600080fd5b506101d1600435612218565b3480156103ab57600080fd5b506103b760043561226f565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b3480156103f657600080fd5b506101d16004356123fe565b34801561040e57600080fd5b50610423600160a060020a0360043516612458565b604080519889526020890197909752878701959095526060870193909352608086019190915260a085015260c0840152151560e083015251908190036101000190f35b34801561047257600080fd5b506101a76124a0565b34801561048757600080fd5b506102f16004356024356124a6565b3480156104a257600080fd5b506101a760043560243561252d565b3480156104bd57600080fd5b506101a7612640565b3480156104d257600080fd5b506101d1600435602435604435606435608435612646565b3480156104f657600080fd5b506101d1600160a060020a0360043516612730565b34801561051757600080fd5b5061052360043561283c565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561055f578181015183820152602001610547565b505050509050019250505060405180910390f35b34801561057f57600080fd5b506101a7600435600160a060020a0360243516612faa565b3480156105a357600080fd5b506105af600435613254565b60408051600160a060020a03909d168d5260208d019b909b528b8b019990995260608b019790975260808a019590955260a089019390935260c088019190915260e08701526101008601521515610120850152151561014084015261016083015251908190036101800190f35b34801561062857600080fd5b506101d1600160a060020a03600435166024356132c6565b34801561064c57600080fd5b5061034d613410565b34801561066157600080fd5b506101d1600160a060020a036004351661341f565b34801561068257600080fd5b506101a7600160a060020a0360043516613524565b3480156106a357600080fd5b506101d1600435613542565b3480156106bb57600080fd5b5061034d6137e0565b3480156106d057600080fd5b506101d1600160a060020a03600435166024356137ef565b3480156106f457600080fd5b506101d160043561394e565b34801561070c57600080fd5b5061034d613a20565b6000806000806000610725613cd8565b60008033151561076d576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b60008a81526006602052604090206009015460ff1680156107a5575060008a815260066020526040902060090154610100900460ff16155b15156107fb576040805160e560020a62461bcd02815260206004820152601b60248201527f4f6666657220696e616374697665206f722066696e616c697a65640000000000604482015290519081900360640190fd5b60008a815260066020818152604080842033855260079092529092206004830154600584015492820154939a50909850908102965011156108ac576040805160e560020a62461bcd02815260206004820152603060248201527f457363726f772074696d652067726561746572207468616e2073656e6465727360448201527f206d617820657363726f772074696d6500000000000000000000000000000000606482015290519081900360840190fd5b855460018801541015610909576040805160e560020a62461bcd02815260206004820152601560248201527f53656e64657220707269636520746f6f20686967680000000000000000000000604482015290519081900360640190fd5b600186015460028801541115610969576040805160e560020a62461bcd02815260206004820152601460248201527f53656e646572207374616b6520746f6f206c6f77000000000000000000000000604482015290519081900360640190fd5b336000908152600760205260409020600301546001870154860211156109ff576040805160e560020a62461bcd02815260206004820152603860248201527f53656e6465722068617320696e737566696369656e742066756e6473206f6e2060448201527f70726f66696c6520666f72207374616b6520616d6f756e740000000000000000606482015290519081900360840190fd5b3360009081526007602052604090206004015460038801541115610a93576040805160e560020a62461bcd02815260206004820152602560248201527f53656e6465722072657075746174696f6e206c6f776572207468616e2072657160448201527f7569726564000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600a870154604080516101008101825233808252602082018d905289548902928201929092526001808a01548902606083015260006080830181905260001960a084015260c083019190915260e0820152919550909350610af5908b90612faa565b6080840181905260078801549098506000191415610bcb576007878101859055600a88018054600180820183556000928352602092839020875192909402909301805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091178155908501519181019190915560408401516002820155606084015160038201556080840151600482015560a0840151600582015560c08401516006909101805460e086015160ff199091169215159290921761ff00191661010092151592909202919091179055610ef3565b866007015491506000199050826080015187600a0183815481101515610bed57fe5b9060005260206000209060070201600401541015610cc657600787810185905560a08401838152600a89018054600180820183556000928352602092839020885192909502909401805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091178155908601519281019290925560408501516002830155606085015160038301556080850151600483015551600582015560c08401516006909101805460e086015160ff199091169215159290921761ff00191661010092151592909202919091179055610ef3565b6000198214158015610cfd57506080830151600a8801805484908110610ce857fe5b90600052602060002090600702016004015410155b15610d2f5781905086600a0182815481101515610d1657fe5b9060005260206000209060070201600501549150610cc6565b600019821415610e14578387600a0182815481101515610d4b57fe5b60009182526020808320600792830201600590810194909455600a8b0180546001808201835591855293829020885194909302909201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039094169390931783558601519082015560408501516002820155606085015160038201556080850151600482015560a08501519181019190915560c08401516006909101805460e086015160ff199091169215159290921761ff00191661010092151592909202919091179055610ef3565b60a08301829052600a8701805485919083908110610e2e57fe5b60009182526020808320600792830201600590810194909455600a8b0180546001808201835591855293829020885194909302909201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039094169390931783558601519082015560408501516002820155606085015160038201556080850151600482015560a08501519181019190915560c08401516006909101805460e086015160ff199091169215159290921761ff001916610100921515929092029190911790555b610f1f87600b0154610f1360038a60080154613a2f90919063ffffffff16565b9063ffffffff613a5a16565b600a88015410610f5d57604080518b815290517f0f05a51232d62169c9cfc476dc3cf57ea79a5f76cd471d4573f15a81b906d50d9181900360200190a15b604080518b81523360208201528082018b90526060810186905290517f233eabcfdf1576177898efb9ca04a875b0cc9b9f511528b6045aca2eb9231b1a9181900360800190a15050505050505092915050565b331515610ff5576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b33600090815260076020526040902060010155565b6000331515611051576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b3360009081526007602052604090206003015482116110a85750336000908152600760205260409020600301548190611090908263ffffffff613a6916565b336000908152600760205260409020600301556110c1565b5033600090815260076020526040812060030180549190555b6000915060008111156111a257600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b15801561113b57600080fd5b505af115801561114f573d6000803e3d6000fd5b505050506040513d602081101561116557600080fd5b505033600081815260076020908152604091829020600301548251938452908301528051600080516020613d1d8339815191529281900390910190a15b5050565b6000806111b1613cd8565b3315156111f6576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b60008d815260066020526040812093508a118015611214575060008b115b80156112205750600086115b151561129c576040805160e560020a62461bcd02815260206004820152602160248201527f546f6b656e732c2074696d6520616e642073697a652063616e6e6f742062652060448201527f3000000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600983015460ff16156112f9576040805160e560020a62461bcd02815260206004820152601760248201527f4f6666657220697320616c726561647920616374697665000000000000000000604482015290519081900360640190fd5b611324611317600454610f1360028951613a2f90919063ffffffff16565b8b9063ffffffff613a2f16565b91506113468b61133a848963ffffffff613a2f16565b9063ffffffff613a2f16565b336000908152600760205260409020600301549092508211156113d9576040805160e560020a62461bcd02815260206004820152603c60248201527f53656e64657220646f6573206e6f74206861766520656e6f7567682066756e6460448201527f73206f6e2070726f66696c6520666f72207265706c69636174696f6e00000000606482015290519081900360840190fd5b336000908152600760205260409020600301546113fc908363ffffffff613a6916565b3360008181526007602090815260409182902060030184905581519283528201929092528151600080516020613d1d833981519152929181900390910190a182543373ffffffffffffffffffffffffffffffffffffffff1990911617835560048084018c905560018085018c9055600285018b9055600385018a905560068501899055600585018890558651600886015560098501805460ff191690911761ff0019169055600019600785015554600b8401555b8451600a84015410156116ca57604080516101008101909152600a84015486518291889181106114dc57fe5b90602001906020020151600160a060020a031681526020018585600a018054905081518110151561150957fe5b906020019060200201516000191681526020016000815260200160008152602001600081526020016000815260200160001515815260200160001515815250905082600a01819080600181540180825580915050906001820390600052602060002090600702016000909192909190915060008201518160000160006101000a815481600160a060020a030219169083600160a060020a031602179055506020820151816001019060001916905560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff0219169083151502179055505050507fcdb680d02c7d0a1c61c7c60c959041d6715718145e9a9fa34fc6f0ec584d46ff8d82600001518360200151600187600a0180549050038f8f8f8d60405180896000191660001916815260200188600160a060020a0316600160a060020a0316815260200187600019166000191681526020018681526020018581526020018481526020018381526020018281526020019850505050505050505060405180910390a16114b0565b604080518e8152602081018e90528082018d9052606081018c9052608081018b905260a081018a905260c0810188905260e0810189905290517ffb0ad3d6fe2d6aace8e159e33bfe904742741cdc348607d4219199e2e7ff5ac7918190036101000190a150505050505050505050505050565b331515611782576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b6000828152600660205260409020600a018054339190839081106117a257fe5b6000918252602090912060079091020154600160a060020a031614611837576040805160e560020a62461bcd02815260206004820152602260248201527f53656c656374656420626964206e6f7420637265617465642062792073656e6460448201527f6572000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000828152600660205260408120600a0180548390811061185457fe5b60009182526020909120600790910201600601805460ff19169115159190911790555050565b600254600160a060020a031633148061189d5750600354600160a060020a031633145b15156118f5576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613d3d8339815191526044820152600080516020613d7d833981519152606482015290519081900360840190fd5b33151561193a576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b600160a060020a038216600090815260076020526040902060030154611966908263ffffffff613a5a16565b600160a060020a03831660008181526007602090815260409182902060030184905581519283528201929092528151600080516020613d1d833981519152929181900390910190a15050565b60003315156119f9576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b50600090815260066020526040902060090154610100900460ff1690565b6000331515611a5e576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b600154604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518492600160a060020a0316916370a082319160248083019260209291908290030181600087803b158015611ac357600080fd5b505af1158015611ad7573d6000803e3d6000fd5b505050506040513d6020811015611aed57600080fd5b50511015611b6b576040805160e560020a62461bcd02815260206004820152602c60248201527f53656e6465722068617320696e737566696369656e7420746f6b656e7320666f60448201527f72206465706f736974696e670000000000000000000000000000000000000000606482015290519081900360840190fd5b600154604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815233600482015230602482015290518492600160a060020a03169163dd62ed3e9160448083019260209291908290030181600087803b158015611bd657600080fd5b505af1158015611bea573d6000803e3d6000fd5b505050506040513d6020811015611c0057600080fd5b50511015611c7d576040805160e560020a62461bcd028152602060048201526024808201527f496e737566696369656e7420616c6c6f77616e636520666f72206465706f736960448201527f74696e6700000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50600090818111156111a257600154604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018490529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b158015611cfc57600080fd5b505af1158015611d10573d6000803e3d6000fd5b505050506040513d6020811015611d2657600080fd5b505033600090815260076020526040902060030154611d4b908263ffffffff613a5a16565b3360008181526007602090815260409182902060030184905581519283528201929092528151600080516020613d1d833981519152929181900390910190a15050565b600081831115611da15750808203611da6565b508181035b92915050565b600054600160a060020a031681565b6000808080331515611e05576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b60008781526006602052604090206009015460ff168015611e3d5750600087815260066020526040902060090154610100900460ff16155b1515611eb9576040805160e560020a62461bcd02815260206004820152602260248201527f4f6666657220697320696e61637469766520616e642f6f722066696e616c697a60448201527f6564000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600087815260066020818152604080842033855260078352908420938b9052919052600a8101805491965091945086908110611ef157fe5b600091825260209091206007909102018054909250600160a060020a03163314611f8b576040805160e560020a62461bcd02815260206004820152603e60248201527f53656e6465722061646472657373206e6f7420657175616c20746f2073656c6560448201527f637465642070726564657465726d696e65642062696420616464726573730000606482015290519081900360840190fd5b6001820154861461200c576040805160e560020a62461bcd02815260206004820152602481018290527f53656e646572206964656e74697479206e6f7420657175616c20746f2073656c60448201527f65637465642070726564657465726d696e656420626964206964656e74697479606482015290519081900360840190fd5b5060048301546005840154600684015490820291111561209c576040805160e560020a62461bcd02815260206004820152603060248201527f457363726f772074696d652067726561746572207468616e2073656e6465727360448201527f206d617820657363726f772074696d6500000000000000000000000000000000606482015290519081900360840190fd5b8254600185015410156120f9576040805160e560020a62461bcd02815260206004820152601560248201527f53656e64657220707269636520746f6f20686967680000000000000000000000604482015290519081900360640190fd5b600183015460028501541115612159576040805160e560020a62461bcd02815260206004820152601460248201527f53656e646572207374616b6520746f6f206c6f77000000000000000000000000604482015290519081900360640190fd5b336000908152600760205260409020600301546001840154820211156121ef576040805160e560020a62461bcd02815260206004820152603860248201527f53656e6465722068617320696e737566696369656e742066756e6473206f6e2060448201527f70726f66696c6520666f72207374616b6520616d6f756e740000000000000000606482015290519081900360840190fd5b825481026002830155600192830154026003820155600601805460ff1916909117905550505050565b33151561225d576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b33600090815260076020526040902055565b6000808080808080803315156122bd576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b60008981526006602081905260409182902082516c010000000000000000000000003390810282529351908190036014019020918101546fffffffffffffffffffffffffffffffff9283169b509091169850925061231c908a90612faa565b955061233e82600b0154610f1360028560080154613a2f90919063ffffffff16565b935060055492506000198260070154141561235c57600094506123f3565b506007810154600094505b60001982600a018281548110151561237b57fe5b906000526020600020906007020160050154141580156123bd57508582600a01828154811015156123a857fe5b90600052602060002090600702016004015410155b156123f357600a82018054829081106123d257fe5b90600052602060002090600702016005015490508480600101955050612367565b505091939550919395565b331515612443576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b33600090815260076020526040902060060155565b60076020819052600091825260409091208054600182015460028301546003840154600485015460058601546006870154969097015494969395929491939092909160ff1688565b60055481565b60003315156124ed576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b6000838152600660205260409020600a0180548390811061250a57fe5b6000918252602090912060079091020160060154610100900460ff169392505050565b60008080331515612576576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b50506000838152600660205260408120905b600a8201548110801561261157506000858152600660205260409020600a018054339190839081106125b657fe5b6000918252602090912060079091020154600160a060020a031614158061261157506000858152600660205260409020600a018054859190839081106125f857fe5b9060005260206000209060070201600101546000191614155b1561261e57600101612588565b600a820154811415612634576000199250612638565b8092505b505092915050565b60045481565b600033151561268d576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b503360009081526007602081905260409091209081015460ff1615156126c5576005546126c190600163ffffffff613a5a16565b6005555b8481556001808201859055600282018490556006820183905560078201805460ff19169091179055604080513381526020810188905281517fcc2a3f6f73d93e68647505272d671f19f071ccaaee0ee75879e1983578d063d9929181900390910190a1505050505050565b600254600160a060020a03163314806127535750600354600160a060020a031633145b15156127ab576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613d3d8339815191526044820152600080516020613d7d833981519152606482015290519081900360840190fd5b3315156127f0576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b600160a060020a03811660009081526007602052604090206005015461281d90600163ffffffff613a5a16565b600160a060020a03909116600090815260076020526040902060050155565b606060008080808080808033151561288c576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b60008a8152600660205260409020600981015490985060ff1680156128bb57506009880154610100900460ff16155b1515612911576040805160e560020a62461bcd02815260206004820152601b60248201527f4f6666657220696e616374697665206f722066696e616c697a65640000000000604482015290519081900360640190fd5b600a880154600b89015460088a01546129369190610f1390600363ffffffff613a2f16565b111561298c576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420656e6f75676820626964730000000000000000000000000000000000604482015290519081900360640190fd5b6129ac88600b0154610f1360028b60080154613a2f90919063ffffffff16565b6040519080825280602002602001820160405280156129d5578160200160208202803883390190505b5098506000955060009450612a14612a0389600b0154610f1360028c60080154613a2f90919063ffffffff16565b60018a01549063ffffffff613a2f16565b9350612a35886004015461133a8a6005015487613a2f90919063ffffffff16565b9350600096505b8760080154871015612c3357600a8801805488908110612a5857fe5b600091825260208083206007928302018054600160a060020a0316845291905260409091206003808301549082015492955090935011801590612a9f5750600683015460ff165b15612c2857600260009054906101000a9004600160a060020a0316600160a060020a03166330632caf338560000160009054906101000a9004600160a060020a03168d876002015488600301548e600401546040518763ffffffff1660e060020a0281526004018087600160a060020a0316600160a060020a0316815260200186600160a060020a0316600160a060020a0316815260200185600019166000191681526020018481526020018381526020018281526020019650505050505050600060405180830381600087803b158015612b7957600080fd5b505af1158015612b8d573d6000803e3d6000fd5b5050506002840154612ba79150869063ffffffff613a5a16565b60068401805461ff001916610100179055895190955087908a9088908110612bcb57fe5b60209081029091018101919091528354604080518d8152600160a060020a039092169282019290925281516001909801977fc96580162b07491a6a8a9249ad78e6a101d27e76f1799c2e7a0cc2b0895bc6d6929181900390910190a15b866001019650612a3c565b5060078701545b612c5a88600b0154610f1360028b60080154613a2f90919063ffffffff16565b861015612edb575b6000198114158015612c985750600a8801805482908110612c7f57fe5b600091825260209091206006600790920201015460ff16155b15612cc657600a8801805482908110612cad57fe5b9060005260206000209060070201600501549050612c62565b600019811415612cd557612edb565b600a8801805482908110612ce557fe5b600091825260208083206007928302018054600160a060020a0316845291905260409091206003808301549082015492955090935011612ec957600260009054906101000a9004600160a060020a0316600160a060020a03166330632caf338560000160009054906101000a9004600160a060020a03168d876002015488600301548e600401546040518763ffffffff1660e060020a0281526004018087600160a060020a0316600160a060020a0316815260200186600160a060020a0316600160a060020a0316815260200185600019166000191681526020018481526020018381526020018281526020019650505050505050600060405180830381600087803b158015612df457600080fd5b505af1158015612e08573d6000803e3d6000fd5b5050506002840154612e229150869063ffffffff613a5a16565b60068401805461ff001916610100179055895190955081908a9088908110612e4657fe5b60209081029091010152600a8801805460019097019682908110612e6657fe5b6000918252602091829020600560079092020101548454604080518e8152600160a060020a039092169382019390935282519193507fc96580162b07491a6a8a9249ad78e6a101d27e76f1799c2e7a0cc2b0895bc6d692908290030190a1612ed6565b60068301805460ff191690555b612c3a565b60008a8152600660205260409020600901805461ff001916610100179055612f2b612f0c858763ffffffff613a6916565b336000908152600760205260409020600301549063ffffffff613a5a16565b3360008181526007602090815260409182902060030184905581519283528201929092528151600080516020613d1d833981519152929181900390910190a1604080518b815290517fb997233152be5256e4effcb7aacb7d7e8ace6009a8b8097ac2876f15f24908cc9181900360200190a15050505050505050919050565b600080808080808080808080331515612ffb576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b600660008e600019166000191681526020019081526020016000209950600760008d600160a060020a0316600160a060020a0316815260200190815260200160002098508860010154600014156130555760019750613077565b60058a015460048b015461306e9163ffffffff613a2f16565b89600101540297505b60058a015460048b01546130909163ffffffff613a2f16565b895460058b01549102975015806130a957506004890154155b156130b757600195506130f7565b6008546064900460736008546130df8c600501548d600401548115156130d957fe5b04613a7b565b028115156130e957fe5b048115156130f357fe5b0495505b85151561310357600195505b6131738a60060154600190046fffffffffffffffffffffffffffffffff168d6040518082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040518091039020600190046fffffffffffffffffffffffffffffffff16611d8e565b60068b01549095506fffffffffffffffffffffffffffffffff1680860190700100000000000000000000000000000000028115156131ad57fe5b049350896001015487600854028115156131c357fe5b60085460068d015460028e015493909204810395506fffffffffffffffffffffffffffffffff9091168781019290918b91028115156131fe57fe5b04600854030281151561320d57fe5b049150856008548b600301540281151561322357fe5b6008549190048103915060048482018401830186020481151561324257fe5b049d9c50505050505050505050505050565b600660208190526000918252604090912080546001820154600283015460038401546004850154600586015496860154600787015460088801546009890154600b90990154600160a060020a03909816999698959794969395939492939192909160ff8082169261010090920416908c565b600254600160a060020a03163314806132e95750600354600160a060020a031633145b1515613341576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613d3d8339815191526044820152600080516020613d7d833981519152606482015290519081900360840190fd5b331515613386576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600760205260409020600401546133b2908263ffffffff613a5a16565b600160a060020a038316600081815260076020908152604091829020600401849055815192835282019290925281517f2748185582415a5c48ef08230d4a145b985992231f57489fb14f7e0a93697d4a929181900390910190a15050565b600254600160a060020a031681565b600054600160a060020a031633146134a7576040805160e560020a62461bcd02815260206004820152602260248201527f4f6e6c79206f776e65722063616e20657865637574652074686973206163746960448201527f6f6e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03811615156134bc57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a031660009081526007602052604090206003015490565b60008033151561358a576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b6000838152600660205260409020600981015490925060ff1615156135f9576040805160e560020a62461bcd02815260206004820152601360248201527f4f66666572206973206e6f742061637469766500000000000000000000000000604482015290519081900360640190fd5b8154600160a060020a03163314613680576040805160e560020a62461bcd02815260206004820152602960248201527f4f6e6c79206f666665722063726561746f722063616e2063616c6c207468697360448201527f2066756e6374696f6e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6009820154610100900460ff16156136e2576040805160e560020a62461bcd02815260206004820152601a60248201527f4f6666657220697320616c72656164792066696e616c697a6564000000000000604482015290519081900360640190fd5b60098201805460ff19169055600b82015460088301546137229161371191610f1390600263ffffffff613a2f16565b60018401549063ffffffff613a2f16565b9050613743826004015461133a846005015484613a2f90919063ffffffff16565b33600090815260076020526040902060030154909150613769908263ffffffff613a5a16565b3360008181526007602090815260409182902060030184905581519283528201929092528151600080516020613d1d833981519152929181900390910190a16040805184815290517f551093dec6053933c320273f5b5e812f1ef7b496dacdb2f731e5f73fdc1d2eb99181900360200190a1505050565b600154600160a060020a031681565b600254600160a060020a03163314806138125750600354600160a060020a031633145b151561386a576040805160e560020a62461bcd0281526020600482015260286024820152600080516020613d3d8339815191526044820152600080516020613d7d833981519152606482015290519081900360840190fd5b3315156138af576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b600160a060020a038216600090815260076020526040902060030154811115613922576040805160e560020a62461bcd02815260206004820152601b60248201527f496e737566696369656e742070726f66696c652062616c616e63650000000000604482015290519081900360640190fd5b600160a060020a038216600090815260076020526040902060030154611966908263ffffffff613a6916565b600054600160a060020a031633146139d6576040805160e560020a62461bcd02815260206004820152602260248201527f4f6e6c79206f776e65722063616e20657865637574652074686973206163746960448201527f6f6e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b331515613a1b576040805160e560020a62461bcd02815260206004820152601a6024820152600080516020613d5d833981519152604482015290519081900360640190fd5b600455565b600354600160a060020a031681565b6000828202831580613a4b5750828482811515613a4857fe5b04145b1515613a5357fe5b9392505050565b600082820183811015613a5357fe5b600082821115613a7557fe5b50900390565b6000808211613ad4576040805160e560020a62461bcd02815260206004820152601260248201527f6c6f67283029206e6f7420616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b50604080517ff8f9cbfae6cc78fbefe7cdc3a1793dfcf4f0e8bbd8cec470b6a28a7a5a3e1efd81527ff5ecf1b3e9debc68e1d9cfabc5997135bfb7a7a3938b7b606b5b4b3f2f1f0ffe60208201527ff6e4ed9ff2d6b458eadcdf97bd91692de2d4da8fd2d0ac50c6ae9a8272523616818301527fc8c0b887b0a8a4489c948c7f847c6125746c645c544c444038302820181008ff60608201527ff7cae577eec2a03cf3bad76fb589591debb2dd67e0aa9834bea6925f6a4a2e0e60808201527fe39ed557db96902cd38ed14fad815115c786af479b7e8324736353433727170760a08201527fc976c13bb96e881cb166a933a55e490d9d56952b8d4e801485467d236242260660c08201527f753a6d1b65325d0c552a4d1345224105391a310b29122104190a11030902010060e08201526101008082019092527f0100000000000000000000000000000000000000000000000000000000000000600170010000000000000000000000000000000068010000000000000000640100000000620100006010600460026000198c019081041790810417908104178881041790810417908104179081041790810417017e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff0281900460ff0390910151047f8000000000000000000000000000000000000000000000000000000000000000909211020190565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101919091529056005367ca05319474f4dd8d8d57f6de9347b2da64ba4f9e6de0f445236ad00f12664f6e6c7920636f6e7472616374732063616e206578656375746520746869732053656e64657220616464726573732063616e6e6f74206265203000000000000066756e6374696f6e000000000000000000000000000000000000000000000000a165627a7a723058203f84d56f9a2c0f513f1070af2ed6c3d6e2899c232b63bfa3e99a049afed36126002900000000000000000000000098d9a611ad1b5761bdc1daac42c48e4d54cf5882000000000000000000000000fb2fdffbcbe785fa2531618d1bed83fcc304026c00000000000000000000000079ba6d2f303762519cca5a3a456678615fa53731

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

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000098d9a611ad1b5761bdc1daac42c48e4d54cf5882
Arg [1] : 000000000000000000000000fb2fdffbcbe785fa2531618d1bed83fcc304026c
Arg [2] : 00000000000000000000000079ba6d2f303762519cca5a3a456678615fa53731


   Swarm Source:
bzzr://3f84d56f9a2c0f513f1070af2ed6c3d6e2899c232b63bfa3e99a049afed36126

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward