ETH Price: $3,136.23 (-5.27%)
 

Overview

Max Total Supply

220,000,000 GMP

Holders

271

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
bagsk.eth
Balance
185 GMP

Value
$0.00
0x7bfd4cC4f7645a65A1538C770F5093ffd012484E
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
GMPToken

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

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

pragma solidity ^0.4.15;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
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;
  }
}

contract Ownable {

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

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

  function transferOwnership(address newOwner) public onlyOwner {owner = newOwner;}
}

contract ERC20Interface {

  function totalSupply() public constant returns (uint256);

  function balanceOf(address _owner) public constant returns (uint256);

  function transfer(address _to, uint256 _value) public returns (bool);

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool);

  function approve(address _spender, uint256 _value) public returns (bool);

  function allowance(address _owner, address _spender) public constant returns (uint256);

  event Transfer(address indexed _from, address indexed _to, uint256 _value);

  event Approval(address indexed _owner, address indexed _spender, uint256 _value);

 }

contract GMPToken is Ownable, ERC20Interface {

  using SafeMath for uint256;

  /* Public variables of the token */
  string public constant name = "GMP Coin";
  string public constant symbol = "GMP";
  uint public constant decimals = 18;
  uint256 public constant initialSupply = 220000000 * 1 ether;
  uint256 public totalSupply;

  /* This creates an array with all balances */
  mapping (address => uint256) public balances;
  mapping (address => mapping (address => uint256)) public allowed;

  /* Events */
  event Burn(address indexed burner, uint256 value);
  event Mint(address indexed to, uint256 amount);

  /* Constuctor: Initializes contract with initial supply tokens to the creator of the contract */
  function GMPToken() public {
      balances[msg.sender] = initialSupply;              // Give the creator all initial tokens
      totalSupply = initialSupply;                        // Update total supply
  }


  /* Implementation of ERC20Interface */

  function totalSupply() public constant returns (uint256) { return totalSupply; }

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

  /* Internal transfer, only can be called by this contract */
  function _transfer(address _from, address _to, uint _amount) internal {
      require (_to != 0x0);                               // Prevent transfer to 0x0 address. Use burn() instead
      require (balances[_from] >= _amount);                // Check if the sender has enough
      balances[_from] = balances[_from].sub(_amount);
      balances[_to] = balances[_to].add(_amount);
      Transfer(_from, _to, _amount);

  }

  function transfer(address _to, uint256 _amount) public returns (bool) {
    _transfer(msg.sender, _to, _amount);
    return true;
  }

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require (_value <= allowed[_from][msg.sender]);     // Check allowance
    allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
    _transfer(_from, _to, _value);
    return true;
  }

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

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

  function mintToken(uint256 _mintedAmount) public onlyOwner {
    balances[Ownable.owner] = balances[Ownable.owner].add(_mintedAmount);
    totalSupply = totalSupply.add(_mintedAmount);
    Mint(Ownable.owner, _mintedAmount);
  }

  //For refund only
  function burnToken(address _burner, uint256 _value) public onlyOwner {
    require(_value > 0);
    require(_value <= balances[_burner]);

    balances[_burner] = balances[_burner].sub(_value);
    totalSupply = totalSupply.sub(_value);
    Burn(_burner, _value);
  }


}


contract Crowdsale is Ownable {

  using SafeMath for uint256;

  // The token being sold
  GMPToken public token;

  // Flag setting that investments are allowed (both inclusive)
  bool public saleIsActive;

  // address where funds are collected
  address public wallet;

  // Number of tokents for 1 ETH, i.e. 683 tokens for 1 ETH
  uint256 public rate;

  // amount of raised money in wei
  uint256 public weiRaised;

  /**
   * event for token purchase logging
   * @param purchaser who paid for the tokens
   * @param beneficiary who got the tokens
   * @param value weis paid for purchase
   * @param amount amount of tokens purchased
   */
  event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);


  /* -----------   A D M I N        F U N C T I O N S    ----------- */

  function Crowdsale(uint256 _initialRate, address _targetWallet) public {

    //Checks
    require(_initialRate > 0);
    require(_targetWallet != 0x0);

    //Init
    token = new GMPToken();
    rate = _initialRate;
    wallet = _targetWallet;
    saleIsActive = true;

  }

  function close() public onlyOwner {
    selfdestruct(owner);
  }

  //Transfer token to
  function transferToAddress(address _targetWallet, uint256 _tokenAmount) public onlyOwner {
    token.transfer(_targetWallet, _tokenAmount * 1 ether);
  }


  //Setters
  function enableSale() public onlyOwner {
    saleIsActive = true;
  }

  function disableSale() public onlyOwner {
    saleIsActive = false;
  }

  function setRate(uint256 _newRate) public onlyOwner {
    rate = _newRate;
  }

  //Mint new tokens
  function mintToken(uint256 _mintedAmount) public onlyOwner {
    token.mintToken(_mintedAmount);
  }



  /* -----------   P U B L I C      C A L L B A C K       F U N C T I O N     ----------- */

  function () public payable {

    require(msg.sender != 0x0);
    require(saleIsActive);
    require(msg.value >= 0.01 * 1 ether);

    uint256 weiAmount = msg.value;

    //Update total wei counter
    weiRaised = weiRaised.add(weiAmount);

    //Calc number of tokents
    uint256 tokenAmount = weiAmount.mul(rate);

    //Forward wei to wallet account
    wallet.transfer(weiAmount);

    //Transfer token to sender
    token.transfer(msg.sender, tokenAmount);
    TokenPurchase(msg.sender, wallet, weiAmount, tokenAmount);

  }



}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"initialSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_mintedAmount","type":"uint256"}],"name":"mintToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_burner","type":"address"},{"name":"_value","type":"uint256"}],"name":"burnToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","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":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"burner","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]

6060604052341561000f57600080fd5b60008054600160a060020a033316600160a060020a03199091168117825581526002602052604090206ab5facfe5b81c365c000000908190556001556108c68061005a6000396000f3006060604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101aa57806323b872dd146101cf57806327e235e3146101f7578063313ce56714610216578063378dc3dc146102295780635c6581651461023c57806370a08231146102615780638da5cb5b1461028057806395d89b41146102af578063a9059cbb146102c2578063c634d032146102e4578063d1df306c146102fc578063dd62ed3e1461031e578063f2fde38b14610343575b600080fd5b34156100f557600080fd5b6100fd610362565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610139578082015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017f57600080fd5b610196600160a060020a0360043516602435610399565b604051901515815260200160405180910390f35b34156101b557600080fd5b6101bd610405565b60405190815260200160405180910390f35b34156101da57600080fd5b610196600160a060020a036004358116906024351660443561040b565b341561020257600080fd5b6101bd600160a060020a03600435166104b3565b341561022157600080fd5b6101bd6104c5565b341561023457600080fd5b6101bd6104ca565b341561024757600080fd5b6101bd600160a060020a03600435811690602435166104d9565b341561026c57600080fd5b6101bd600160a060020a03600435166104f6565b341561028b57600080fd5b610293610511565b604051600160a060020a03909116815260200160405180910390f35b34156102ba57600080fd5b6100fd610520565b34156102cd57600080fd5b610196600160a060020a0360043516602435610557565b34156102ef57600080fd5b6102fa60043561056d565b005b341561030757600080fd5b6102fa600160a060020a0360043516602435610622565b341561032957600080fd5b6101bd600160a060020a0360043581169060243516610708565b341561034e57600080fd5b6102fa600160a060020a0360043516610733565b60408051908101604052600881527f474d5020436f696e000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260036020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b600160a060020a0380841660009081526003602090815260408083203390941683529290529081205482111561044057600080fd5b600160a060020a0380851660009081526003602090815260408083203390941683529290522054610477908363ffffffff61077d16565b600160a060020a03808616600090815260036020908152604080832033909416835292905220556104a984848461078f565b5060019392505050565b60026020526000908152604090205481565b601281565b6ab5facfe5b81c365c00000081565b600360209081526000928352604080842090915290825290205481565b600160a060020a031660009081526002602052604090205490565b600054600160a060020a031681565b60408051908101604052600381527f474d500000000000000000000000000000000000000000000000000000000000602082015281565b600061056433848461078f565b50600192915050565b60005433600160a060020a0390811691161461058857600080fd5b60008054600160a060020a03168152600260205260409020546105b1908263ffffffff61088416565b60008054600160a060020a03168152600260205260409020556001546105dd908263ffffffff61088416565b600155600054600160a060020a03167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968858260405190815260200160405180910390a250565b60005433600160a060020a0390811691161461063d57600080fd5b6000811161064a57600080fd5b600160a060020a03821660009081526002602052604090205481111561066f57600080fd5b600160a060020a038216600090815260026020526040902054610698908263ffffffff61077d16565b600160a060020a0383166000908152600260205260409020556001546106c4908263ffffffff61077d16565b600155600160a060020a0382167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a25050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60005433600160a060020a0390811691161461074e57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561078957fe5b50900390565b600160a060020a03821615156107a457600080fd5b600160a060020a038316600090815260026020526040902054819010156107ca57600080fd5b600160a060020a0383166000908152600260205260409020546107f3908263ffffffff61077d16565b600160a060020a038085166000908152600260205260408082209390935590841681522054610828908263ffffffff61088416565b600160a060020a03808416600081815260026020526040908190209390935591908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3505050565b60008282018381101561089357fe5b93925050505600a165627a7a7230582082ab05fed9360702d9dc5d3d708a7e263e3082d278855dc699dc7763e7f4842e0029

Deployed Bytecode

0x6060604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101aa57806323b872dd146101cf57806327e235e3146101f7578063313ce56714610216578063378dc3dc146102295780635c6581651461023c57806370a08231146102615780638da5cb5b1461028057806395d89b41146102af578063a9059cbb146102c2578063c634d032146102e4578063d1df306c146102fc578063dd62ed3e1461031e578063f2fde38b14610343575b600080fd5b34156100f557600080fd5b6100fd610362565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610139578082015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017f57600080fd5b610196600160a060020a0360043516602435610399565b604051901515815260200160405180910390f35b34156101b557600080fd5b6101bd610405565b60405190815260200160405180910390f35b34156101da57600080fd5b610196600160a060020a036004358116906024351660443561040b565b341561020257600080fd5b6101bd600160a060020a03600435166104b3565b341561022157600080fd5b6101bd6104c5565b341561023457600080fd5b6101bd6104ca565b341561024757600080fd5b6101bd600160a060020a03600435811690602435166104d9565b341561026c57600080fd5b6101bd600160a060020a03600435166104f6565b341561028b57600080fd5b610293610511565b604051600160a060020a03909116815260200160405180910390f35b34156102ba57600080fd5b6100fd610520565b34156102cd57600080fd5b610196600160a060020a0360043516602435610557565b34156102ef57600080fd5b6102fa60043561056d565b005b341561030757600080fd5b6102fa600160a060020a0360043516602435610622565b341561032957600080fd5b6101bd600160a060020a0360043581169060243516610708565b341561034e57600080fd5b6102fa600160a060020a0360043516610733565b60408051908101604052600881527f474d5020436f696e000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260036020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b600160a060020a0380841660009081526003602090815260408083203390941683529290529081205482111561044057600080fd5b600160a060020a0380851660009081526003602090815260408083203390941683529290522054610477908363ffffffff61077d16565b600160a060020a03808616600090815260036020908152604080832033909416835292905220556104a984848461078f565b5060019392505050565b60026020526000908152604090205481565b601281565b6ab5facfe5b81c365c00000081565b600360209081526000928352604080842090915290825290205481565b600160a060020a031660009081526002602052604090205490565b600054600160a060020a031681565b60408051908101604052600381527f474d500000000000000000000000000000000000000000000000000000000000602082015281565b600061056433848461078f565b50600192915050565b60005433600160a060020a0390811691161461058857600080fd5b60008054600160a060020a03168152600260205260409020546105b1908263ffffffff61088416565b60008054600160a060020a03168152600260205260409020556001546105dd908263ffffffff61088416565b600155600054600160a060020a03167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968858260405190815260200160405180910390a250565b60005433600160a060020a0390811691161461063d57600080fd5b6000811161064a57600080fd5b600160a060020a03821660009081526002602052604090205481111561066f57600080fd5b600160a060020a038216600090815260026020526040902054610698908263ffffffff61077d16565b600160a060020a0383166000908152600260205260409020556001546106c4908263ffffffff61077d16565b600155600160a060020a0382167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a25050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60005433600160a060020a0390811691161461074e57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561078957fe5b50900390565b600160a060020a03821615156107a457600080fd5b600160a060020a038316600090815260026020526040902054819010156107ca57600080fd5b600160a060020a0383166000908152600260205260409020546107f3908263ffffffff61077d16565b600160a060020a038085166000908152600260205260408082209390935590841681522054610828908263ffffffff61088416565b600160a060020a03808416600081815260026020526040908190209390935591908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3505050565b60008282018381101561089357fe5b93925050505600a165627a7a7230582082ab05fed9360702d9dc5d3d708a7e263e3082d278855dc699dc7763e7f4842e0029

Swarm Source

bzzr://82ab05fed9360702d9dc5d3d708a7e263e3082d278855dc699dc7763e7f4842e
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.