ETH Price: $3,382.62 (+4.57%)
Gas: 3 Gwei

Contract

0x71e7a455991Cd9f60148720e2EB0Bc823014dB32
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer58536102018-06-25 20:05:232225 days ago1529957123IN
0x71e7a455...23014dB32
0 ETH0.000174028
Transfer52984822018-03-22 1:57:552321 days ago1521683875IN
0x71e7a455...23014dB32
0 ETH00
Transfer52984752018-03-22 1:56:522321 days ago1521683812IN
0x71e7a455...23014dB32
0 ETH00
Transfer52919402018-03-20 23:26:402322 days ago1521588400IN
0x71e7a455...23014dB32
0 ETH0.000002170.1
Transfer52899222018-03-20 15:37:232322 days ago1521560243IN
0x71e7a455...23014dB32
0 ETH0.0004568121
Transfer50959972018-02-15 17:53:052355 days ago1518717185IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50954182018-02-15 15:38:142355 days ago1518709094IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50949392018-02-15 13:43:212355 days ago1518702201IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50939582018-02-15 9:38:072355 days ago1518687487IN
0x71e7a455...23014dB32
0 ETH0.00004352
Transfer50932362018-02-15 6:41:412356 days ago1518676901IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50930012018-02-15 5:49:402356 days ago1518673780IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50928972018-02-15 5:26:152356 days ago1518672375IN
0x71e7a455...23014dB32
0 ETH0.000021751
Transfer50928902018-02-15 5:24:482356 days ago1518672288IN
0x71e7a455...23014dB32
0 ETH0.000021751
Transfer50928782018-02-15 5:22:112356 days ago1518672131IN
0x71e7a455...23014dB32
0 ETH0.000002170.1
Transfer50928782018-02-15 5:22:112356 days ago1518672131IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50928572018-02-15 5:19:052356 days ago1518671945IN
0x71e7a455...23014dB32
0 ETH0.000002170.1
Transfer50927922018-02-15 5:04:152356 days ago1518671055IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50926562018-02-15 4:33:242356 days ago1518669204IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50923402018-02-15 3:14:552356 days ago1518664495IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50921842018-02-15 2:39:362356 days ago1518662376IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50920352018-02-15 2:03:332356 days ago1518660213IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50917592018-02-15 0:54:272356 days ago1518656067IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50914662018-02-14 23:39:582356 days ago1518651598IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50913652018-02-14 23:17:252356 days ago1518650245IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
Transfer50913062018-02-14 23:04:432356 days ago1518649483IN
0x71e7a455...23014dB32
0 ETH0.000006520.3
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
49066532018-01-14 10:49:422387 days ago1515926982
0x71e7a455...23014dB32
 Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xbD4282E6...560D71a2B
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
FreeShop

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-01-14
*/

pragma solidity ^0.4.18;

// zeppelin-solidity: 1.5.0

/**
 * @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));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

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

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(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 Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  /**
  * @dev transfer token for a specified address
  * @param _to The address to transfer to.
  * @param _value The amount to be transferred.
  */
  function transfer(address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param _owner The address to query the the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address _owner) public view returns (uint256 balance) {
    return balances[_owner];
  }

}

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

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * @dev https://github.com/ethereum/EIPs/issues/20
 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) internal allowed;


  /**
   * @dev Transfer tokens from one address to another
   * @param _from address The address which you want to send tokens from
   * @param _to address The address which you want to transfer to
   * @param _value uint256 the amount of tokens to be transferred
   */
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[_from]);
    require(_value <= allowed[_from][msg.sender]);

    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

  /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   *
   * Beware that changing an allowance with this method brings the risk that someone may use both the old
   * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
   * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param _owner address The address which owns the funds.
   * @param _spender address The address which will spend the funds.
   * @return A uint256 specifying the amount of tokens still available for the spender.
   */
  function allowance(address _owner, address _spender) public view returns (uint256) {
    return allowed[_owner][_spender];
  }

  /**
   * @dev Increase the amount of tokens that an owner allowed to a spender.
   *
   * approve should be called when allowed[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param _spender The address which will spend the funds.
   * @param _addedValue The amount of tokens to increase the allowance by.
   */
  function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  /**
   * @dev Decrease the amount of tokens that an owner allowed to a spender.
   *
   * approve should be called when allowed[_spender] == 0. To decrement
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param _spender The address which will spend the funds.
   * @param _subtractedValue The amount of tokens to decrease the allowance by.
   */
  function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
    uint oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

contract Object is StandardToken, Ownable {
    string public name;
    string public symbol;
    uint8 public constant decimals = 18;
    bool public mintingFinished = false;

    event Burn(address indexed burner, uint value);
    event Mint(address indexed to, uint amount);
    event MintFinished();

    modifier canMint() {
        require(!mintingFinished);
        _;
    }

    function Object(string _name, string _symbol) public {
        name = _name;
        symbol = _symbol;
    }

    function burn(uint _value) public {
        require(_value <= balances[msg.sender]);
        address burner = msg.sender;
        balances[burner] = balances[burner].sub(_value);
        totalSupply = totalSupply.sub(_value);
        Burn(burner, _value);
    }

    function mint(address _to, uint _amount) onlyOwner canMint public returns(bool) {
        totalSupply = totalSupply.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        Mint(_to, _amount);
        Transfer(address(0), _to, _amount);
        return true;
    }

    function finishMinting() onlyOwner canMint public returns(bool) {
        mintingFinished = true;
        MintFinished();
        return true;
    }

    function transfer(address _to, uint256 _value) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[msg.sender]);
        require(_value % (1 ether) == 0); // require whole token transfers

        // SafeMath.sub will throw if there is not enough balance.
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        Transfer(msg.sender, _to, _value);
        return true;
    }
}

contract Shop is Ownable {
    using SafeMath for *;

    struct ShopSettings {
        address bank;
        uint32 startTime;
        uint32 endTime;
        uint fundsRaised;
        uint rate;
        uint price;
        //uint recommendedBid;
    }

    Object public object;
    ShopSettings public shopSettings;

    modifier onlyValidPurchase() {
        require(msg.value % shopSettings.price == 0); // whole numbers only
        require((now >= shopSettings.startTime && now <= shopSettings.endTime) && msg.value != 0);
        _;
    }

    modifier whenClosed() { // not actually implemented?
        require(now > shopSettings.endTime);
        _;
    }

    modifier whenOpen() {
        require(now < shopSettings.endTime);
        _;
    }

    modifier onlyValidAddress(address _bank) {
        require(_bank != address(0));
        _;
    }

    modifier onlyOne() {
        require(calculateTokens() == 1 ether);
        _;
    }

    modifier onlyBuyer(address _beneficiary) {
        require(_beneficiary == msg.sender);
        _;
    }

    event ShopClosed(uint32 date);
    event ObjectPurchase(address indexed purchaser, address indexed beneficiary, uint value, uint amount);

    function () external payable {
        buyObject(msg.sender);
    }

    function Shop(address _bank, string _name, string _symbol, uint _rate, uint32 _endTime)
    onlyValidAddress(_bank) public {
        require(_rate >= 0);
        require(_endTime > now);
        shopSettings = ShopSettings(_bank, uint32(now), _endTime, 0, _rate, 0);
        calculatePrice(); // set initial price based on initial rate
        object = new Object(_name, _symbol);
    }

    function buyObject(address _beneficiary) onlyValidPurchase
    onlyBuyer(_beneficiary)
    onlyValidAddress(_beneficiary) public payable {
        uint numTokens = calculateTokens();
        shopSettings.fundsRaised = shopSettings.fundsRaised.add(msg.value);
        object.mint(_beneficiary, numTokens);
        ObjectPurchase(msg.sender, _beneficiary, msg.value, numTokens);
        forwardFunds();
    }

    function calculateTokens() internal returns(uint) {
        // rate is literally tokens per eth in wei;
        // passing in a rate of 10 ETH (10*10^18) equates to 10 tokens per ETH, or a price of 0.1 ETH per token
        // rate is always 1/price!
        calculatePrice(); // update price
        return msg.value.mul(1 ether).div(1 ether.mul(1 ether).div(shopSettings.rate));
    }

    function calculatePrice() internal returns(uint) {
        shopSettings.price = (1 ether).mul(1 ether).div(shopSettings.rate); // update price based on current rate
        //shopSettings.recommendedBid = shopSettings.price.add((1 ether).div(100)); // update recommended bid based on current price
    }

    function closeShop() onlyOwner whenOpen public {
        shopSettings.endTime = uint32(now);
        ShopClosed(uint32(now));
    }

    function forwardFunds() internal {
        shopSettings.bank.transfer(msg.value);
    }
}

contract FreeShop is Shop {

    modifier onlyValidPurchase() { // override to require 0-ETH transactions
        require(msg.value == 0); // 0 ETH only
        require(now >= shopSettings.startTime && now <= shopSettings.endTime);
        _;
    }

    modifier onlyValidAddress(address _bank) { // override so we can use a bank address of 0
        _;
    }

    function FreeShop(string _name, string _symbol,  uint32 _endTime)
    Shop(0, _name, _symbol, 0, _endTime) public
    {}

    function calculateTokens() internal returns(uint) { // override to always return 1 token per 'purchase'
        return (1 ether);
    }

    function calculatePrice() internal returns(uint) { // override to fix divide by zero error in Shop
        shopSettings.price = 0;
    }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"object","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"buyObject","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"closeShop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shopSettings","outputs":[{"name":"bank","type":"address"},{"name":"startTime","type":"uint32"},{"name":"endTime","type":"uint32"},{"name":"fundsRaised","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"price","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_endTime","type":"uint32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"date","type":"uint32"}],"name":"ShopClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"ObjectPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Deployed Bytecode

0x606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632812988f14610083578063828f1b42146100d85780638da5cb5b146101065780639b6dbc8a1461015b578063a52c34c314610170578063f2fde38b14610200575b61008133610239565b005b341561008e57600080fd5b610096610465565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610104600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610239565b005b341561011157600080fd5b61011961048b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561016657600080fd5b61016e6104b0565b005b341561017b57600080fd5b61018361059d565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018663ffffffff1663ffffffff1681526020018563ffffffff1663ffffffff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b341561020b57600080fd5b610237600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610607565b005b6000803414151561024957600080fd5b600260000160149054906101000a900463ffffffff1663ffffffff16421015801561028f5750600260000160189054906101000a900463ffffffff1663ffffffff164211155b151561029a57600080fd5b813373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156102d557600080fd5b826102de61075c565b92506102f83460026001015461076c90919063ffffffff16565b600260010181905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985856000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156103ce57600080fd5b6102c65a03f115156103df57600080fd5b50505060405180519050508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17f6c712ed756d8ee310ddf7fcd41ffcfb4dd5dd9dcbfe8bd92fad7717a6b5cb3486604051808381526020018281526020019250505060405180910390a361045f61078a565b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561050b57600080fd5b600260000160189054906101000a900463ffffffff1663ffffffff164210151561053457600080fd5b42600260000160186101000a81548163ffffffff021916908363ffffffff1602179055507fb567a1e708dab1490bd0e0c66021fec2bd86fa13605874f72415015ad4b31ee642604051808263ffffffff1663ffffffff16815260200191505060405180910390a1565b60028060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900463ffffffff16908060000160189054906101000a900463ffffffff16908060010154908060020154908060030154905086565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561066257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561069e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000670de0b6b3a7640000905090565b600080828401905083811015151561078057fe5b8091505092915050565b600260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156107ef57600080fd5b565b600080600260030181905550905600a165627a7a72305820ba987042cf1433256c9de754df08fda85d12ff7b26d2191a95550a4ad7dcdb600029

Swarm Source

bzzr://7fa3ef8de074600e8cd200cc3e8758e54c268c210cc8d10b2ee5c0e0972f5df2

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.