ETH Price: $2,040.64 (-6.05%)

Contract

0x268d5bC896cC8CeB0CC1E82D80d9BeE0995E2Db4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer67466132018-11-21 16:34:192682 days ago1542818059IN
0x268d5bC8...0995E2Db4
0 ETH0.0004221620
Transfer67461812018-11-21 14:52:292682 days ago1542811949IN
0x268d5bC8...0995E2Db4
0.26522292 ETH0.0004221620
Transfer67450162018-11-21 10:18:332682 days ago1542795513IN
0x268d5bC8...0995E2Db4
0.03933861 ETH0.000063323
Transfer67450042018-11-21 10:15:372682 days ago1542795337IN
0x268d5bC8...0995E2Db4
0.04142312 ETH0.000084434
Transfer67449832018-11-21 10:11:232682 days ago1542795083IN
0x268d5bC8...0995E2Db4
0.03884528 ETH0.0004221620
Transfer66992572018-11-13 22:07:002689 days ago1542146820IN
0x268d5bC8...0995E2Db4
0.5 ETH0.000409083
Transfer66989752018-11-13 21:02:132689 days ago1542142933IN
0x268d5bC8...0995E2Db4
0.5 ETH0.00044
Transfer66989592018-11-13 20:57:152689 days ago1542142635IN
0x268d5bC8...0995E2Db4
0.5 ETH0.00025494

Latest 3 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer66992572018-11-13 22:07:002689 days ago1542146820
0x268d5bC8...0995E2Db4
0.5 ETH
Transfer66989752018-11-13 21:02:132689 days ago1542142933
0x268d5bC8...0995E2Db4
0.5 ETH
Transfer66989592018-11-13 20:57:152689 days ago1542142635
0x268d5bC8...0995E2Db4
0.5 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenSale

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.4.25;

contract Ownable {
    
    address public owner = 0x0;
    
    constructor() public {
        owner = msg.sender;
    }
}

contract TokenSale is Ownable{
    struct DataBase{
        uint256 deposit;
        uint256 soulValue;
    }
    
    mapping(address => DataBase) wallets;
    
    uint8 public usersCount = 0;
    uint8 public depositsCount = 0;
    
    uint256 public constant soulCap = 25000000;
    
    uint256 public collectedFunds = 0;
    uint256 public distributedTokens = 0;
    
    uint256 internal constant soulReward0 = 20000;
    uint256 internal constant soulReward1 = 22000;
    uint256 internal constant soulReward2 = 25000;
    
    uint256 public constant minDeposit = 0.5 ether;
    uint256 internal constant ethPriceLvl0 = 2.99 ether;
    uint256 internal constant ethPriceLvl1 = 9.99 ether;
    
    function() external payable{
        require(msg.value >= minDeposit &&
        distributedTokens < soulCap);
        uint256 ethValue = msg.value;
        uint256 soulValue = getSoulByEth(ethValue);     
        uint256 totalSoulValue = distributedTokens + soulValue;
        if (totalSoulValue > soulCap){
            soulValue = soulCap - distributedTokens;
            ethValue = getResidualEtherAmount(ethValue, soulValue);
            uint256 etherNickel = msg.value - ethValue;
            msg.sender.transfer(etherNickel);
        }
        owner.transfer(ethValue);
        depositsCount++;
        countUser(msg.sender);
        wallets[msg.sender].deposit += ethValue;
        wallets[msg.sender].soulValue += soulValue;
        collectedFunds += ethValue;
        distributedTokens += soulValue;
    }
  
  function getDepositValue(address _owner) public view returns(uint256){
      return wallets[_owner].deposit;
  }
  
  function balanceOf(address _owner) public view returns(uint256){
      return wallets[_owner].soulValue;
  }
  
  function getResidualEtherAmount(uint256 _ethValue, uint256 _soulResidual) internal pure returns(uint256){
      return _soulResidual * 10 ** 18 / getRewardLevel(_ethValue);
  }
  
   function getSoulByEth(uint256 _ethValue) internal pure returns(uint256){
       return (_ethValue * getRewardLevel(_ethValue)) / 10 ** 18;
   }
   
   function getRewardLevel(uint256 _ethValue) internal pure returns(uint256){
        if (_ethValue <= ethPriceLvl0){
           return soulReward0;
       } else if (_ethValue > ethPriceLvl0 && _ethValue <= ethPriceLvl1){
           return soulReward1;
       } else if (_ethValue > ethPriceLvl1){
           return soulReward2;
       }
   }
   
   function countUser(address _owner) internal{
       if (wallets[_owner].deposit == 0){
           usersCount++;
       }
   }
   
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"getDepositValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minDeposit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"depositsCount","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"distributedTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collectedFunds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"usersCount","outputs":[{"name":"","type":"uint8"}],"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":"soulCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

6080604052600080546002805461ffff191690556003829055600482905533600160a060020a03199091161790556104798061003c6000396000f3006080604052600436106100985763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633b2e5f9481146101cc57806341b3d185146101ff5780634506e93514610214578063586360ce1461023f57806364256611146102545780636ba13a821461026957806370a082311461027e5780638da5cb5b1461029f578063b0aa44a5146102d0575b6000806000806706f05b59d3b2000034101580156100bb575063017d7840600454105b15156100c657600080fd5b3493506100d2846102e5565b92508260045401915063017d78408211156101345760045463017d78400392506100fc848461030d565b604051909450348590039150339082156108fc029083906000818181858888f19350505050158015610132573d6000803e3d6000fd5b505b60008054604051600160a060020a039091169186156108fc02918791818181858888f1935050505015801561016d573d6000803e3d6000fd5b506002805460ff61010080830482166001019091160261ff001990911617905561019633610334565b50503360009081526001602081905260409091208054840181550180548201905560038054909201909155600480549091019055005b3480156101d857600080fd5b506101ed600160a060020a036004351661036d565b60408051918252519081900360200190f35b34801561020b57600080fd5b506101ed610388565b34801561022057600080fd5b50610229610394565b6040805160ff9092168252519081900360200190f35b34801561024b57600080fd5b506101ed6103a2565b34801561026057600080fd5b506101ed6103a8565b34801561027557600080fd5b506102296103ae565b34801561028a57600080fd5b506101ed600160a060020a03600435166103b7565b3480156102ab57600080fd5b506102b46103d6565b60408051600160a060020a039092168252519081900360200190f35b3480156102dc57600080fd5b506101ed6103e5565b6000670de0b6b3a76400006102f9836103ed565b830281151561030457fe5b0490505b919050565b6000610318836103ed565b82670de0b6b3a76400000281151561032c57fe5b049392505050565b600160a060020a038116600090815260016020526040902054151561036a576002805460ff8082166001011660ff199091161790555b50565b600160a060020a031660009081526001602052604090205490565b6706f05b59d3b2000081565b600254610100900460ff1681565b60045481565b60035481565b60025460ff1681565b600160a060020a03166000908152600160208190526040909120015490565b600054600160a060020a031681565b63017d784081565b600067297e9d28866b000082116104075750614e20610308565b67297e9d28866b0000821180156104265750678aa39c121a2700008211155b1561043457506155f0610308565b678aa39c121a27000082111561030857506161a86103085600a165627a7a72305820fdf6b4465e857afd9bb1e8dafd9bc6db13ac786ccb1f9fa4529222ca8324aa2d0029

Deployed Bytecode

0x6080604052600436106100985763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633b2e5f9481146101cc57806341b3d185146101ff5780634506e93514610214578063586360ce1461023f57806364256611146102545780636ba13a821461026957806370a082311461027e5780638da5cb5b1461029f578063b0aa44a5146102d0575b6000806000806706f05b59d3b2000034101580156100bb575063017d7840600454105b15156100c657600080fd5b3493506100d2846102e5565b92508260045401915063017d78408211156101345760045463017d78400392506100fc848461030d565b604051909450348590039150339082156108fc029083906000818181858888f19350505050158015610132573d6000803e3d6000fd5b505b60008054604051600160a060020a039091169186156108fc02918791818181858888f1935050505015801561016d573d6000803e3d6000fd5b506002805460ff61010080830482166001019091160261ff001990911617905561019633610334565b50503360009081526001602081905260409091208054840181550180548201905560038054909201909155600480549091019055005b3480156101d857600080fd5b506101ed600160a060020a036004351661036d565b60408051918252519081900360200190f35b34801561020b57600080fd5b506101ed610388565b34801561022057600080fd5b50610229610394565b6040805160ff9092168252519081900360200190f35b34801561024b57600080fd5b506101ed6103a2565b34801561026057600080fd5b506101ed6103a8565b34801561027557600080fd5b506102296103ae565b34801561028a57600080fd5b506101ed600160a060020a03600435166103b7565b3480156102ab57600080fd5b506102b46103d6565b60408051600160a060020a039092168252519081900360200190f35b3480156102dc57600080fd5b506101ed6103e5565b6000670de0b6b3a76400006102f9836103ed565b830281151561030457fe5b0490505b919050565b6000610318836103ed565b82670de0b6b3a76400000281151561032c57fe5b049392505050565b600160a060020a038116600090815260016020526040902054151561036a576002805460ff8082166001011660ff199091161790555b50565b600160a060020a031660009081526001602052604090205490565b6706f05b59d3b2000081565b600254610100900460ff1681565b60045481565b60035481565b60025460ff1681565b600160a060020a03166000908152600160208190526040909120015490565b600054600160a060020a031681565b63017d784081565b600067297e9d28866b000082116104075750614e20610308565b67297e9d28866b0000821180156104265750678aa39c121a2700008211155b1561043457506155f0610308565b678aa39c121a27000082111561030857506161a86103085600a165627a7a72305820fdf6b4465e857afd9bb1e8dafd9bc6db13ac786ccb1f9fa4529222ca8324aa2d0029

Swarm Source

bzzr://fdf6b4465e857afd9bb1e8dafd9bc6db13ac786ccb1f9fa4529222ca8324aa2d

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.