ETH Price: $3,670.10 (+1.92%)

Contract

0xD37f29d1CD9f379B3f9363453725eD971190aecA
 

Overview

ETH Balance

0.000000000000002 ETH

Eth Value

Less Than $0.01 (@ $3,670.10/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Bid53012982018-03-22 13:10:222445 days ago1521724222IN
Blockchain Cuties: Presale 1
0 ETH0.000061061
Add Cutie53008642018-03-22 11:29:202445 days ago1521718160IN
Blockchain Cuties: Presale 1
0 ETH0.000315845
Add Cutie52619052018-03-15 21:52:232451 days ago1521150743IN
Blockchain Cuties: Presale 1
0 ETH0.000315845
Withdraw52595342018-03-15 12:13:082452 days ago1521115988IN
Blockchain Cuties: Presale 1
0 ETH0.000178746
Bid52594652018-03-15 11:55:402452 days ago1521114940IN
Blockchain Cuties: Presale 1
0 ETH0.000152122
Add Cutie52555622018-03-14 19:56:442452 days ago1521057404IN
Blockchain Cuties: Presale 1
0 ETH0.0003796
Add Cutie52555482018-03-14 19:53:122452 days ago1521057192IN
Blockchain Cuties: Presale 1
0 ETH0.000378246
Add Cutie52555372018-03-14 19:51:132452 days ago1521057073IN
Blockchain Cuties: Presale 1
0 ETH0.000377086

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
52595342018-03-15 12:13:082452 days ago1521115988
Blockchain Cuties: Presale 1
0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BlockchainCutiesPresale

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-03-14
*/

pragma solidity ^0.4.20;


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

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

}



/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}


/// @title BlockchainCuties Presale
contract BlockchainCutiesPresale is Pausable
{
	struct Purchase
	{
		address owner;
		uint32 cutieKind;
	}
	Purchase[] public purchases;

	mapping (uint32 => uint256) public prices;
	mapping (uint32 => uint256) public leftCount;

	event Bid(address indexed owner, uint32 indexed cutieKind);

	function addCutie(uint32 id, uint256 price, uint256 count) public onlyOwner
	{
		prices[id] = price;
		leftCount[id] = count;
	}

	function isAvailable(uint32 cutieKind) public view returns (bool)
	{
		return leftCount[cutieKind] > 0;
	}

	function getPrice(uint32 cutieKind) public view returns (uint256 price, uint256 left)
	{
		price = prices[cutieKind];
		left = leftCount[cutieKind];
	}

	function bid(uint32 cutieKind) public payable whenNotPaused
	{
		require(isAvailable(cutieKind));
		require(prices[cutieKind] <= msg.value);

		purchases.push(Purchase(msg.sender, cutieKind));
		leftCount[cutieKind]--;

		emit Bid(msg.sender, cutieKind);
	}

	function purchasesCount() public view returns (uint256)
	{
		return purchases.length;
	}

    function destroyContract() public onlyOwner {
        selfdestruct(msg.sender);
    }

    function withdraw() public onlyOwner {
        address(msg.sender).transfer(address(this).balance);
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[],"name":"destroyContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"cutieKind","type":"uint32"}],"name":"isAvailable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"purchasesCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cutieKind","type":"uint32"}],"name":"bid","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"prices","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"leftCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"purchases","outputs":[{"name":"owner","type":"address"},{"name":"cutieKind","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint32"},{"name":"price","type":"uint256"},{"name":"count","type":"uint256"}],"name":"addCutie","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"cutieKind","type":"uint32"}],"name":"getPrice","outputs":[{"name":"price","type":"uint256"},{"name":"left","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"cutieKind","type":"uint32"}],"name":"Bid","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

606060405260008054600160a060020a033316600160a860020a03199091161790556107b1806100306000396000f3006060604052600436106100da5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663092a5cce81146100df57806331e5144c146100f45780633ccfd60b146101245780633f4ba83a14610137578063509040811461014a57806351ffcab31461016f5780635c975abb14610180578063655750ac14610193578063784fbcbf146101af5780638392fe31146101cb5780638456cb59146102095780638da5cb5b1461021c578063a583535d1461024b578063da26663a1461026d578063f2fde38b146102a1575b600080fd5b34156100ea57600080fd5b6100f26102c0565b005b34156100ff57600080fd5b61011063ffffffff600435166102e7565b604051901515815260200160405180910390f35b341561012f57600080fd5b6100f2610300565b341561014257600080fd5b6100f261035a565b341561015557600080fd5b61015d6103d9565b60405190815260200160405180910390f35b6100f263ffffffff600435166103e0565b341561018b57600080fd5b610110610526565b341561019e57600080fd5b61015d63ffffffff60043516610536565b34156101ba57600080fd5b61015d63ffffffff60043516610548565b34156101d657600080fd5b6101e160043561055a565b604051600160a060020a03909216825263ffffffff1660208201526040908101905180910390f35b341561021457600080fd5b6100f2610590565b341561022757600080fd5b61022f610614565b604051600160a060020a03909116815260200160405180910390f35b341561025657600080fd5b6100f263ffffffff60043516602435604435610623565b341561027857600080fd5b61028963ffffffff60043516610663565b60405191825260208201526040908101905180910390f35b34156102ac57600080fd5b6100f2600160a060020a0360043516610688565b60005433600160a060020a039081169116146102db57600080fd5b33600160a060020a0316ff5b63ffffffff166000908152600360205260408120541190565b60005433600160a060020a0390811691161461031b57600080fd5b33600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f19350505050151561035857600080fd5b565b60005433600160a060020a0390811691161461037557600080fd5b60005460a060020a900460ff16151561038d57600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6001545b90565b60005460a060020a900460ff16156103f757600080fd5b610400816102e7565b151561040b57600080fd5b63ffffffff81166000908152600260205260409020543490111561042e57600080fd5b6001805480820161043f8382610723565b9160005260206000209001600060408051908101604052600160a060020a033316815263ffffffff851660208201529190508151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151815477ffffffff0000000000000000000000000000000000000000191660a060020a63ffffffff9283160217909155831660008181526003602052604090819020805460001901905590925033600160a060020a031691507f1395824e255e4df6983f1f2d84bb8afe054b8c65b520192076cf671c14068f88905160405180910390a350565b60005460a060020a900460ff1681565b60026020526000908152604090205481565b60036020526000908152604090205481565b600180548290811061056857fe5b600091825260209091200154600160a060020a038116915060a060020a900463ffffffff1682565b60005433600160a060020a039081169116146105ab57600080fd5b60005460a060020a900460ff16156105c257600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600054600160a060020a031681565b60005433600160a060020a0390811691161461063e57600080fd5b63ffffffff909216600090815260026020908152604080832093909355600390522055565b63ffffffff166000908152600260209081526040808320546003909252909120549091565b60005433600160a060020a039081169116146106a357600080fd5b600160a060020a03811615156106b857600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b8154818355818115116107475760008381526020902061074791810190830161074c565b505050565b6103dd91905b8082111561078157805477ffffffffffffffffffffffffffffffffffffffffffffffff19168155600101610752565b50905600a165627a7a723058209f4396157abf3ee77c3e628d06599149c6221f858e87d34af006cc61a88331fe0029

Deployed Bytecode

0x6060604052600436106100da5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663092a5cce81146100df57806331e5144c146100f45780633ccfd60b146101245780633f4ba83a14610137578063509040811461014a57806351ffcab31461016f5780635c975abb14610180578063655750ac14610193578063784fbcbf146101af5780638392fe31146101cb5780638456cb59146102095780638da5cb5b1461021c578063a583535d1461024b578063da26663a1461026d578063f2fde38b146102a1575b600080fd5b34156100ea57600080fd5b6100f26102c0565b005b34156100ff57600080fd5b61011063ffffffff600435166102e7565b604051901515815260200160405180910390f35b341561012f57600080fd5b6100f2610300565b341561014257600080fd5b6100f261035a565b341561015557600080fd5b61015d6103d9565b60405190815260200160405180910390f35b6100f263ffffffff600435166103e0565b341561018b57600080fd5b610110610526565b341561019e57600080fd5b61015d63ffffffff60043516610536565b34156101ba57600080fd5b61015d63ffffffff60043516610548565b34156101d657600080fd5b6101e160043561055a565b604051600160a060020a03909216825263ffffffff1660208201526040908101905180910390f35b341561021457600080fd5b6100f2610590565b341561022757600080fd5b61022f610614565b604051600160a060020a03909116815260200160405180910390f35b341561025657600080fd5b6100f263ffffffff60043516602435604435610623565b341561027857600080fd5b61028963ffffffff60043516610663565b60405191825260208201526040908101905180910390f35b34156102ac57600080fd5b6100f2600160a060020a0360043516610688565b60005433600160a060020a039081169116146102db57600080fd5b33600160a060020a0316ff5b63ffffffff166000908152600360205260408120541190565b60005433600160a060020a0390811691161461031b57600080fd5b33600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f19350505050151561035857600080fd5b565b60005433600160a060020a0390811691161461037557600080fd5b60005460a060020a900460ff16151561038d57600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6001545b90565b60005460a060020a900460ff16156103f757600080fd5b610400816102e7565b151561040b57600080fd5b63ffffffff81166000908152600260205260409020543490111561042e57600080fd5b6001805480820161043f8382610723565b9160005260206000209001600060408051908101604052600160a060020a033316815263ffffffff851660208201529190508151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151815477ffffffff0000000000000000000000000000000000000000191660a060020a63ffffffff9283160217909155831660008181526003602052604090819020805460001901905590925033600160a060020a031691507f1395824e255e4df6983f1f2d84bb8afe054b8c65b520192076cf671c14068f88905160405180910390a350565b60005460a060020a900460ff1681565b60026020526000908152604090205481565b60036020526000908152604090205481565b600180548290811061056857fe5b600091825260209091200154600160a060020a038116915060a060020a900463ffffffff1682565b60005433600160a060020a039081169116146105ab57600080fd5b60005460a060020a900460ff16156105c257600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600054600160a060020a031681565b60005433600160a060020a0390811691161461063e57600080fd5b63ffffffff909216600090815260026020908152604080832093909355600390522055565b63ffffffff166000908152600260209081526040808320546003909252909120549091565b60005433600160a060020a039081169116146106a357600080fd5b600160a060020a03811615156106b857600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b8154818355818115116107475760008381526020902061074791810190830161074c565b505050565b6103dd91905b8082111561078157805477ffffffffffffffffffffffffffffffffffffffffffffffff19168155600101610752565b50905600a165627a7a723058209f4396157abf3ee77c3e628d06599149c6221f858e87d34af006cc61a88331fe0029

Swarm Source

bzzr://9f4396157abf3ee77c3e628d06599149c6221f858e87d34af006cc61a88331fe

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.