ERC-20
Source Code
Overview
Max Total Supply
35,000,000 NTC
Holders
1,523
Transfers
-
0
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
NatCoin
Compiler Version
v0.4.11+commit.68ef5810
Optimization Enabled:
Yes with 0 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2017-10-04
*/
pragma solidity ^0.4.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
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) {
// 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 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;
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 {
uint256 _totalSupply;
function totalSupply() constant returns (uint256 totalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function approve(address _spender, uint _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint remaining);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
// Owner of account approves the transfer of an amount to another account
mapping(address => mapping (address => uint256)) allowed;
/**
* @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) returns (bool success) {
if (balances[msg.sender] >= _value
&& _value > 0
&& balances[_to] + _value > balances[_to]) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else {
return false;
}
}
// Send _value amount of tokens from address _from to address _to
// The transferFrom method is used for a withdraw workflow, allowing contracts to send
// tokens on your behalf, for example to "deposit" to a contract address and/or to charge
// fees in sub-currencies; the command should fail unless the _from account has
// deliberately authorized the sender of the message via some mechanism; we propose
// these standardized APIs for approval:
function transferFrom(address _from,address _to, uint256 _amount) returns (bool success) {
if (balances[_from] >= _amount
&& allowed[_from][msg.sender] >= _amount
&& _amount > 0
&& balances[_to] + _amount > balances[_to]) {
balances[_from] -= _amount;
allowed[_from][msg.sender] -= _amount;
balances[_to] += _amount;
return true;
} else {
return false;
}
}
/**
* @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 returns (uint256 balance) {
return balances[_owner];
}
function totalSupply() constant returns (uint256 totalSupply) {
totalSupply = _totalSupply;
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @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 amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
Transfer(_from, _to, _value);
return true;
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) returns (bool success) {
allowed[msg.sender][_spender] = _value;
return true;
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
// Functions with this modifier can only be executed by the owner
modifier onlyOwner() {
if (msg.sender != owner) {
revert();
}
_;
}
/**
* @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 {
if (newOwner != address(0)) {
owner = newOwner;
}
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
_totalSupply = _totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
return true;
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
}
contract NatCoin is MintableToken {
string public constant name = "NATCOIN";
string public constant symbol = "NTC";
uint256 public constant decimals = 18;
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"totalSupply","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","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"}]Contract Creation Code
60606040526004805460a060020a60ff02191690555b60048054600160a060020a03191633600160a060020a03161790555b5b610890806100416000396000f300606060405236156100b45763ffffffff60e060020a60003504166305d2035b81146100b657806306fdde03146100da578063095ea7b31461016a57806318160ddd1461019d57806323b872dd146101bf578063313ce567146101f857806340c10f191461021a57806370a082311461024d5780637d64bcb41461027b5780638da5cb5b1461029f57806395d89b41146102cb578063a9059cbb1461035b578063dd62ed3e1461038e578063f2fde38b146103c2575bfe5b34156100be57fe5b6100c66103e0565b604080519115158252519081900360200190f35b34156100e257fe5b6100ea6103f0565b604080516020808252835181830152835191928392908301918501908083838215610130575b80518252602083111561013057601f199092019160209182019101610110565b505050905090810190601f16801561015c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017257fe5b6100c6600160a060020a0360043516602435610414565b604080519115158252519081900360200190f35b34156101a557fe5b6101ad610445565b60408051918252519081900360200190f35b34156101c757fe5b6100c6600160a060020a036004358116906024351660443561044c565b604080519115158252519081900360200190f35b341561020057fe5b6101ad61054f565b60408051918252519081900360200190f35b341561022257fe5b6100c6600160a060020a0360043516602435610554565b604080519115158252519081900360200190f35b341561025557fe5b6101ad600160a060020a0360043516610627565b60408051918252519081900360200190f35b341561028357fe5b6100c6610646565b604080519115158252519081900360200190f35b34156102a757fe5b6102af6106ac565b60408051600160a060020a039092168252519081900360200190f35b34156102d357fe5b6100ea6106bb565b604080516020808252835181830152835191928392908301918501908083838215610130575b80518252602083111561013057601f199092019160209182019101610110565b505050905090810190601f16801561015c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561036357fe5b6100c6600160a060020a03600435166024356106db565b604080519115158252519081900360200190f35b341561039657fe5b6101ad600160a060020a036004358116906024351661079a565b60408051918252519081900360200190f35b34156103ca57fe5b6103de600160a060020a03600435166107c7565b005b60045460a060020a900460ff1681565b604080518082019091526007815260c960020a662720aa21a7a4a702602082015281565b600160a060020a03338116600090815260036020908152604080832093861683529290522081905560015b92915050565b6000545b90565b600160a060020a038084166000908152600360209081526040808320338516845282528083205493861683526001909152812054909190610493908463ffffffff61081316565b600160a060020a0380861660009081526001602052604080822093909355908716815220546104c8908463ffffffff61082d16565b600160a060020a0386166000908152600160205260409020556104f1818463ffffffff61082d16565b600160a060020a03808716600081815260036020908152604080832033861684528252918290209490945580518781529051928816939192600080516020610845833981519152929181900390910190a3600191505b509392505050565b601281565b60045460009033600160a060020a039081169116146105735760006000fd5b60045460a060020a900460ff161561058b5760006000fd5b60005461059e908363ffffffff61081316565b6000908155600160a060020a0384168152600160205260409020546105c9908363ffffffff61081316565b600160a060020a038416600081815260016020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a25060015b5b5b92915050565b600160a060020a0381166000908152600160205260409020545b919050565b60045460009033600160a060020a039081169116146106655760006000fd5b6004805460a060020a60ff02191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a15060015b5b90565b600454600160a060020a031681565b604080518082019091526003815260e860020a624e544302602082015281565b600160a060020a0333166000908152600160205260408120548290108015906107045750600082115b80156107295750600160a060020a038316600090815260016020526040902054828101115b1561078b57600160a060020a0333811660008181526001602090815260408083208054889003905593871680835291849020805487019055835186815293519193600080516020610845833981519152929081900390910190a350600161043f565b50600061043f565b5b92915050565b600160a060020a038083166000908152600360209081526040808320938516835292905220545b92915050565b60045433600160a060020a039081169116146107e35760006000fd5b600160a060020a0381161561080e5760048054600160a060020a031916600160a060020a0383161790555b5b5b50565b60008282018381101561082257fe5b8091505b5092915050565b60008282111561083957fe5b508082035b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058203de204ea5eb943ffceed674dba40e5aa3a1d583f22d1cee0bf338663c3b7202d0029
Deployed Bytecode
0x606060405236156100b45763ffffffff60e060020a60003504166305d2035b81146100b657806306fdde03146100da578063095ea7b31461016a57806318160ddd1461019d57806323b872dd146101bf578063313ce567146101f857806340c10f191461021a57806370a082311461024d5780637d64bcb41461027b5780638da5cb5b1461029f57806395d89b41146102cb578063a9059cbb1461035b578063dd62ed3e1461038e578063f2fde38b146103c2575bfe5b34156100be57fe5b6100c66103e0565b604080519115158252519081900360200190f35b34156100e257fe5b6100ea6103f0565b604080516020808252835181830152835191928392908301918501908083838215610130575b80518252602083111561013057601f199092019160209182019101610110565b505050905090810190601f16801561015c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017257fe5b6100c6600160a060020a0360043516602435610414565b604080519115158252519081900360200190f35b34156101a557fe5b6101ad610445565b60408051918252519081900360200190f35b34156101c757fe5b6100c6600160a060020a036004358116906024351660443561044c565b604080519115158252519081900360200190f35b341561020057fe5b6101ad61054f565b60408051918252519081900360200190f35b341561022257fe5b6100c6600160a060020a0360043516602435610554565b604080519115158252519081900360200190f35b341561025557fe5b6101ad600160a060020a0360043516610627565b60408051918252519081900360200190f35b341561028357fe5b6100c6610646565b604080519115158252519081900360200190f35b34156102a757fe5b6102af6106ac565b60408051600160a060020a039092168252519081900360200190f35b34156102d357fe5b6100ea6106bb565b604080516020808252835181830152835191928392908301918501908083838215610130575b80518252602083111561013057601f199092019160209182019101610110565b505050905090810190601f16801561015c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561036357fe5b6100c6600160a060020a03600435166024356106db565b604080519115158252519081900360200190f35b341561039657fe5b6101ad600160a060020a036004358116906024351661079a565b60408051918252519081900360200190f35b34156103ca57fe5b6103de600160a060020a03600435166107c7565b005b60045460a060020a900460ff1681565b604080518082019091526007815260c960020a662720aa21a7a4a702602082015281565b600160a060020a03338116600090815260036020908152604080832093861683529290522081905560015b92915050565b6000545b90565b600160a060020a038084166000908152600360209081526040808320338516845282528083205493861683526001909152812054909190610493908463ffffffff61081316565b600160a060020a0380861660009081526001602052604080822093909355908716815220546104c8908463ffffffff61082d16565b600160a060020a0386166000908152600160205260409020556104f1818463ffffffff61082d16565b600160a060020a03808716600081815260036020908152604080832033861684528252918290209490945580518781529051928816939192600080516020610845833981519152929181900390910190a3600191505b509392505050565b601281565b60045460009033600160a060020a039081169116146105735760006000fd5b60045460a060020a900460ff161561058b5760006000fd5b60005461059e908363ffffffff61081316565b6000908155600160a060020a0384168152600160205260409020546105c9908363ffffffff61081316565b600160a060020a038416600081815260016020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a25060015b5b5b92915050565b600160a060020a0381166000908152600160205260409020545b919050565b60045460009033600160a060020a039081169116146106655760006000fd5b6004805460a060020a60ff02191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a15060015b5b90565b600454600160a060020a031681565b604080518082019091526003815260e860020a624e544302602082015281565b600160a060020a0333166000908152600160205260408120548290108015906107045750600082115b80156107295750600160a060020a038316600090815260016020526040902054828101115b1561078b57600160a060020a0333811660008181526001602090815260408083208054889003905593871680835291849020805487019055835186815293519193600080516020610845833981519152929081900390910190a350600161043f565b50600061043f565b5b92915050565b600160a060020a038083166000908152600360209081526040808320938516835292905220545b92915050565b60045433600160a060020a039081169116146107e35760006000fd5b600160a060020a0381161561080e5760048054600160a060020a031916600160a060020a0383161790555b5b5b50565b60008282018381101561082257fe5b8091505b5092915050565b60008282111561083957fe5b508082035b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058203de204ea5eb943ffceed674dba40e5aa3a1d583f22d1cee0bf338663c3b7202d0029
Swarm Source
bzzr://3de204ea5eb943ffceed674dba40e5aa3a1d583f22d1cee0bf338663c3b7202d
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.
Add Token to MetaMask (Web3)