ETH Price: $3,182.81 (+3.13%)

Contract

0xF2fB97a06a655A602bf87317F8FeDf4285313777
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer62824822018-09-06 13:26:202265 days ago1536240380IN
0xF2fB97a0...285313777
0.01 ETH0.000160777
Setup62820152018-09-06 11:29:422265 days ago1536233382IN
0xF2fB97a0...285313777
0 ETH0.000237537
0x6080604062818692018-09-06 10:53:582265 days ago1536231238IN
 Create: Sale
0 ETH0.00510456

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Sale

Compiler Version
v0.4.22+commit.4cb486ee

Optimization Enabled:
No with 200 runs

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

pragma solidity ^0.4.21;

/*

  BASIC ERC20 Sale Contract
  
  Create this Sale contract first! 
  
     Sale(address ethwallet)   // this will send the received ETH funds to this address


  @author Hunter Long
  @repo https://github.com/hunterlong/ethereum-ico-contract

*/


contract ERC20 {
  uint public totalSupply;
  function balanceOf(address who) constant returns (uint);
  function allowance(address owner, address spender) constant returns (uint);
  function transfer(address to, uint value) returns (bool ok);
  function transferFrom(address from, address to, uint value) returns (bool ok);
  function approve(address spender, uint value) returns (bool ok);
  function mintToken(address to, uint256 value) returns (uint256);
  function changeTransfer(bool allowed);
}


contract Sale {

    uint256 public maxMintable;
    uint256 public totalMinted;
    uint public exchangeRate;
    bool public isFunding;
    ERC20 public Token;
    address public ETHWallet;

    bool private configSet;
    address public creator;

    event Contribution(address from, uint256 amount);

    function Sale(address _wallet) {
        maxMintable = 10000000000000000000000000000; 
        ETHWallet = _wallet;
        isFunding = true;
        creator = msg.sender;
        exchangeRate = 25000;
    }

    // setup function to be ran only 1 time
    // setup token address
    function setup(address token_address) {
        require(!configSet);
        Token = ERC20(token_address);
        configSet = true;
    }

    function closeSale() external {
      require(msg.sender==creator);
      isFunding = false;
    }
    
    function () payable {
        this.contribute();
    }

    // CONTRIBUTE FUNCTION
    // converts ETH to TOKEN and sends new TOKEN to the sender
    function contribute() external payable {
        require(msg.value>0);
        require(isFunding);
        uint256 amount = msg.value * exchangeRate;
        uint256 total = totalMinted + amount;
        require(total<=maxMintable);
        totalMinted += amount;
        ETHWallet.transfer(msg.value);
        Token.mintToken(msg.sender, amount);
        Contribution(msg.sender, amount);
    }

    // update the ETH/COIN rate
    function updateRate(uint256 rate) external {
        require(msg.sender==creator);
        require(isFunding);
        exchangeRate = rate;
    }

    // change creator address
    function changeCreator(address _creator) external {
        require(msg.sender==creator);
        creator = _creator;
    }

    // change transfer status for ERC20 token
    function changeTransferStats(bool _allowed) external {
        require(msg.sender==creator);
        Token.changeTransfer(_allowed);
    }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"creator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isFunding","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ETHWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxMintable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"exchangeRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token_address","type":"address"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"rate","type":"uint256"}],"name":"updateRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_creator","type":"address"}],"name":"changeCreator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalMinted","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_allowed","type":"bool"}],"name":"changeTransferStats","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":"contribute","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"closeSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_wallet","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Contribution","type":"event"}]

608060405234801561001057600080fd5b50604051602080610b10833981018060405281019080805190602001909291905050506b204fce5e3e2502611000000060008190555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600360006101000a81548160ff02191690831515021790555033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506161a860028190555050610a14806100fc6000396000f3006080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461014357806313b531531461019a5780631a30ec13146101c95780632154dc39146102205780633ba0b9a91461024b57806366d382031461027657806369ea1771146102b957806374580e2f146102e6578063a2309ff814610329578063b602a91714610354578063c241267614610383578063d7bb99ba146103da578063ee55efee146103e4575b3073ffffffffffffffffffffffffffffffffffffffff1663d7bb99ba6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15801561012957600080fd5b505af115801561013d573d6000803e3d6000fd5b50505050005b34801561014f57600080fd5b506101586103fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a657600080fd5b506101af610421565b604051808215151515815260200191505060405180910390f35b3480156101d557600080fd5b506101de610434565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561022c57600080fd5b5061023561045a565b6040518082815260200191505060405180910390f35b34801561025757600080fd5b50610260610460565b6040518082815260200191505060405180910390f35b34801561028257600080fd5b506102b7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610466565b005b3480156102c557600080fd5b506102e4600480360381019080803590602001909291905050506104e1565b005b3480156102f257600080fd5b50610327600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610562565b005b34801561033557600080fd5b5061033e610602565b6040518082815260200191505060405180910390f35b34801561036057600080fd5b50610381600480360381019080803515159060200190929190505050610608565b005b34801561038f57600080fd5b50610398610714565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e261073a565b005b3480156103f057600080fd5b506103f961096f565b005b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b60025481565b600460149054906101000a900460ff1615151561048257600080fd5b80600360016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600460146101000a81548160ff02191690831515021790555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561053d57600080fd5b600360009054906101000a900460ff16151561055857600080fd5b8060028190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105be57600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60015481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561066457600080fd5b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166309010e53826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082151515158152602001915050600060405180830381600087803b1580156106f957600080fd5b505af115801561070d573d6000803e3d6000fd5b5050505050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060003411151561074c57600080fd5b600360009054906101000a900460ff16151561076757600080fd5b6002543402915081600154019050600054811115151561078657600080fd5b81600160008282540192505081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156107fe573d6000803e3d6000fd5b50600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379c6506833846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156108c457600080fd5b505af11580156108d8573d6000803e3d6000fd5b505050506040513d60208110156108ee57600080fd5b8101908080519060200190929190505050507f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b3383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109cb57600080fd5b6000600360006101000a81548160ff0219169083151502179055505600a165627a7a72305820a2410ecca36dfcba6073c15a131eef3ba7fc8841329ffd7c1a3b6d74d2d337760029000000000000000000000000429a97147be1db6f260da0bbd348fc8cca1668d8

Deployed Bytecode

0x6080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461014357806313b531531461019a5780631a30ec13146101c95780632154dc39146102205780633ba0b9a91461024b57806366d382031461027657806369ea1771146102b957806374580e2f146102e6578063a2309ff814610329578063b602a91714610354578063c241267614610383578063d7bb99ba146103da578063ee55efee146103e4575b3073ffffffffffffffffffffffffffffffffffffffff1663d7bb99ba6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15801561012957600080fd5b505af115801561013d573d6000803e3d6000fd5b50505050005b34801561014f57600080fd5b506101586103fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a657600080fd5b506101af610421565b604051808215151515815260200191505060405180910390f35b3480156101d557600080fd5b506101de610434565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561022c57600080fd5b5061023561045a565b6040518082815260200191505060405180910390f35b34801561025757600080fd5b50610260610460565b6040518082815260200191505060405180910390f35b34801561028257600080fd5b506102b7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610466565b005b3480156102c557600080fd5b506102e4600480360381019080803590602001909291905050506104e1565b005b3480156102f257600080fd5b50610327600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610562565b005b34801561033557600080fd5b5061033e610602565b6040518082815260200191505060405180910390f35b34801561036057600080fd5b50610381600480360381019080803515159060200190929190505050610608565b005b34801561038f57600080fd5b50610398610714565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e261073a565b005b3480156103f057600080fd5b506103f961096f565b005b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b60025481565b600460149054906101000a900460ff1615151561048257600080fd5b80600360016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600460146101000a81548160ff02191690831515021790555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561053d57600080fd5b600360009054906101000a900460ff16151561055857600080fd5b8060028190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105be57600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60015481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561066457600080fd5b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166309010e53826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082151515158152602001915050600060405180830381600087803b1580156106f957600080fd5b505af115801561070d573d6000803e3d6000fd5b5050505050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060003411151561074c57600080fd5b600360009054906101000a900460ff16151561076757600080fd5b6002543402915081600154019050600054811115151561078657600080fd5b81600160008282540192505081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156107fe573d6000803e3d6000fd5b50600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379c6506833846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156108c457600080fd5b505af11580156108d8573d6000803e3d6000fd5b505050506040513d60208110156108ee57600080fd5b8101908080519060200190929190505050507f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b3383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109cb57600080fd5b6000600360006101000a81548160ff0219169083151502179055505600a165627a7a72305820a2410ecca36dfcba6073c15a131eef3ba7fc8841329ffd7c1a3b6d74d2d337760029

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

000000000000000000000000429a97147be1db6f260da0bbd348fc8cca1668d8

-----Decoded View---------------
Arg [0] : _wallet (address): 0x429A97147bE1db6F260da0Bbd348fC8cca1668D8

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000429a97147be1db6f260da0bbd348fc8cca1668d8


Swarm Source

bzzr://a2410ecca36dfcba6073c15a131eef3ba7fc8841329ffd7c1a3b6d74d2d33776

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  ]

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.