Sponsored:   LH-CRYPTO - 200 instruments (BTC, EUR, GOLD, OIL, SHARES). Leverage up to 1:500. OPEN ACCOUNT
Contract Overview
Balance: 0.0025 Ether
Ether Value: $0.33 (@ $132.39/ETH)
Transactions: 8 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xb4f81988469a0c210aea58a72481c1100294a669at txn 0xa22a3af41d8396f84c122ff33c2beb0405e486806456dfca49bd08402be88e8e
 Latest 8 txns

TxHash Age From To Value [TxFee]
0x973d6863bb8b6599f8b0bcb851893f0b1d658d955b3630a804fdd6d63636f1af371 days 18 hrs ago0xb4f81988469a0c210aea58a72481c1100294a669  IN   0x79ca19b5737a00314473debaaaf1421c501baa800.0025 Ether0.00060707
0xef4abdc44b40e5fa13cec6e216d6b57e7e14c323b6e4f41473fa66861e581bdd376 days 59 mins ago0xb4f81988469a0c210aea58a72481c1100294a669  IN   0x79ca19b5737a00314473debaaaf1421c501baa800 Ether0.000459735
0x3fba56d50ae03d280cf5d13bc850b285ff8ef36076884d809a5ae6914a875c86376 days 1 hr ago0xb4f81988469a0c210aea58a72481c1100294a669  IN   0x79ca19b5737a00314473debaaaf1421c501baa800 Ether0.000447465
0x3362c0f66bc8732693bf6b5a0b4597240c1b0762056c5e6a572d7e9d406a77bf387 days 2 hrs ago0xb4f81988469a0c210aea58a72481c1100294a669  IN   0x79ca19b5737a00314473debaaaf1421c501baa800 Ether0.000410775
0xdbc51b823fa3b9fa95f243440cab2563a230a64a05c572d92328ade25103b656387 days 2 hrs ago0x61fb7f2d72e21dc83b176ddeee0ac163dad32e4f  IN   0x79ca19b5737a00314473debaaaf1421c501baa800 Ether0.00033552
0x9d337a9328073f6d98a5c0501413d5076678ef7fddfc1fcfab3ec64fd6b932f8387 days 2 hrs ago0x61fb7f2d72e21dc83b176ddeee0ac163dad32e4f  IN   0x79ca19b5737a00314473debaaaf1421c501baa800.005 Ether0.000485656
0xc189c49afe9eee08b951a841d38dfdccc8b555acefdc9dea794ee66798d9234c387 days 2 hrs ago0xb4f81988469a0c210aea58a72481c1100294a669  IN   0x79ca19b5737a00314473debaaaf1421c501baa800 Ether0.00065403
0xa22a3af41d8396f84c122ff33c2beb0405e486806456dfca49bd08402be88e8e387 days 2 hrs ago0xb4f81988469a0c210aea58a72481c1100294a669  IN    Contract Creation0 Ether0.007852845
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x3fba56d50ae03d280cf5d13bc850b285ff8ef36076884d809a5ae6914a875c864524572376 days 1 hr ago0x79ca19b5737a00314473debaaaf1421c501baa800xb4f81988469a0c210aea58a72481c1100294a6690.005 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Sale
Compiler Text: v0.4.16+commit.d7661dd9
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.11;

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

  function div(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a / b;
    return c;
  }

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

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

contract Ownable {
  address public owner;

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

  function Ownable() {
    owner = msg.sender;
  }

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }
}

contract SmartToken is Ownable {
  using SafeMath for uint256;

  uint256 public totalSupply;
  mapping(address => uint256) balances;
  mapping (address => mapping (address => uint256)) allowed;
  bool public mintingFinished = false;

  event Transfer(address indexed from, address indexed to, uint256 value);
  event Approval(address indexed owner, address indexed spender, uint256 value);
  event Burn(address indexed burner, uint256 value);
  event Mint(address indexed to, uint256 amount);
  event MintFinished();

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

  function balanceOf(address _owner) public constant returns (uint256 balance) {
    return balances[_owner];
  }

  function transfer(address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    uint256 _allowance = allowed[_from][msg.sender];
    require(_allowance > 0);
    require(_allowance >= _value);
    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowed[_from][msg.sender] = _allowance.sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

  function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

  function approve(address _spender, uint256 _value) public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  function increaseApproval (address _spender, uint _addedValue) returns (bool success) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) {
    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;
  }

  function burn(uint256 _value) public {
      require(_value > 0);

      address burner = msg.sender;
      balances[burner] = balances[burner].sub(_value);
      totalSupply = totalSupply.sub(_value);
      Burn(burner, _value);
  }

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

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

}

contract Token is SmartToken {

  using SafeMath for uint256;
  string public name = "Ponscoin";
  string public symbol = "PONS";
  uint public decimals = 6;
  uint256 public INITIAL_SUPPLY = 10000000;

  function Token() {
    owner = msg.sender;
    mint(msg.sender, INITIAL_SUPPLY * 1000000);
  }

  function transfer(address _to, uint _value) returns (bool success) {
    return super.transfer(_to, _value);
  }

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    return super.transferFrom(_from, _to, _value);
  }

  function () payable {
    revert();
  }

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

  function withdrawSome(uint _value) onlyOwner {
    require(_value <= this.balance);
    msg.sender.transfer(_value);
  }

  function killContract(uint256 _value) onlyOwner {
    require(_value > 0);
    selfdestruct(owner);
  }
}

contract Sale is Ownable {
  using SafeMath for uint256;
  uint256 public rate = 162866449511000;
  Token public token;

  event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);

  function Sale() {
    owner = msg.sender;
  }

  function startSale(address _token) onlyOwner {
    token = Token(_token);
  }

  function updateRate(uint256 _rate) onlyOwner {
    rate = _rate;
  }

  function () payable {
    if(rate == 0){
      revert();
    }
    if(msg.value < rate){
      revert();
    }
    uint256 value = msg.value;
    uint256 tokens = value.mul(1000000).div(rate);
    if(token.transferFrom(owner, msg.sender, tokens)){
        TokenPurchase(msg.sender, msg.sender, value, tokens);
    } else {
      revert();
    }
  }

  function tokensAvailable() constant returns (uint256) {
    return token.balanceOf(owner);
  }

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

  function withdrawSome(uint _value) onlyOwner {
    require(_value <= this.balance);
    msg.sender.transfer(_value);
  }

  function killContract(uint256 _value) onlyOwner {
    require(_value > 0);
    selfdestruct(owner);
  }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"startSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokensAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_rate","type":"uint256"}],"name":"updateRate","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":"_value","type":"uint256"}],"name":"killContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"withdrawSome","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"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":"TokenPurchase","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
60606040526594204cde7258600155341561001957600080fd5b5b5b60008054600160a060020a03191633600160a060020a03161790555b60008054600160a060020a03191633600160a060020a03161790555b5b610628806100636000396000f300606060405236156100885763ffffffff60e060020a6000350416632c4e722e81146101c05780633ccfd60b146101e55780633f2916d9146101fa57806360659a921461021b57806369ea1771146102405780638da5cb5b14610258578063a2c2ed9b14610287578063ae9b051c1461029f578063f2fde38b146102b7578063fc0c546a146102d8575b5b6000806001546000141561009c57600080fd5b6001543410156100ab57600080fd5b6001543492506100d4906100c884620f424063ffffffff61030716565b9063ffffffff61033616565b60025460008054929350600160a060020a03918216926323b872dd921690339085906040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561014c57600080fd5b6102c65a03f1151561015d57600080fd5b50505060405180519050156101b657600160a060020a033316807f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad18848460405191825260208201526040908101905180910390a36101bb565b600080fd5b5b5050005b34156101cb57600080fd5b6101d3610352565b60405190815260200160405180910390f35b34156101f057600080fd5b6101f8610358565b005b341561020557600080fd5b6101f8600160a060020a03600435166103b4565b005b341561022657600080fd5b6101d36103fc565b60405190815260200160405180910390f35b341561024b57600080fd5b6101f860043561047e565b005b341561026357600080fd5b61026b6104a3565b604051600160a060020a03909116815260200160405180910390f35b341561029257600080fd5b6101f86004356104b2565b005b34156102aa57600080fd5b6101f86004356104ec565b005b34156102c257600080fd5b6101f8600160a060020a0360043516610554565b005b34156102e357600080fd5b61026b6105ed565b604051600160a060020a03909116815260200160405180910390f35b6000828202831580610323575082848281151561032057fe5b04145b151561032b57fe5b8091505b5092915050565b600080828481151561034457fe5b0490508091505b5092915050565b60015481565b60005433600160a060020a0390811691161461037357600080fd5b33600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f1935050505015156103b057600080fd5b5b5b565b60005433600160a060020a039081169116146103cf57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600254600080549091600160a060020a03908116916370a082319116836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561045e57600080fd5b6102c65a03f1151561046f57600080fd5b50505060405180519150505b90565b60005433600160a060020a0390811691161461049957600080fd5b60018190555b5b50565b600054600160a060020a031681565b60005433600160a060020a039081169116146104cd57600080fd5b600081116104da57600080fd5b600054600160a060020a0316ff5b5b50565b60005433600160a060020a0390811691161461050757600080fd5b600160a060020a0330163181111561051e57600080fd5b600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015156103f857600080fd5b5b5b50565b60005433600160a060020a0390811691161461056f57600080fd5b600160a060020a038116151561058457600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600254600160a060020a0316815600a165627a7a7230582073426ac7d01368b9f45591bdc6443085a012bbd312e95b35556b61c84d379c490029

   Swarm Source:
bzzr://73426ac7d01368b9f45591bdc6443085a012bbd312e95b35556b61c84d379c49

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.