ERC-20
Source Code
Overview
Max Total Supply
100,000,000 SNC
Holders
6
Transfers
-
0
Market
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 8 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
SNC
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2018-05-31
*/
pragma solidity ^0.4.11;
/**
* @title Snow Coin
* @author lan yuhang
*/
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b > 0);
uint256 c = a / b;
assert(a == b * c + a % b);
return c;
}
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a && c >= b);
return c;
}
}
/**
* @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;
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 {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
require(paused);
_;
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
}
contract SNC is SafeMath, Pausable {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
/* Initializes contract with initial supply tokens to the creator of the contract */
function SNC() public {
totalSupply = (10**8) * (10**8);
name = "Snow Coin"; // Set the name for display purposes
symbol = "SNC"; // Set the symbol for display purposes
decimals = 8; // Amount of decimals for display purposes
owner = msg.sender;
balanceOf[owner] = totalSupply; // Give the creator all tokens
}
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool success) {
require(_value > 0);
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value); // Subtract from the sender
balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value); // Add the same to the recipient
emit Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
return true;
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool success) {
allowance[msg.sender][_spender] = _value; // Set allowance
emit Approval(msg.sender, _spender, _value); // Raise Approval event
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the sender has enough
require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] = SafeMath.safeSub(balanceOf[_from], _value); // Subtract from the sender
balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value); // Add the same to the recipient
allowance[_from][msg.sender] = SafeMath.safeSub(allowance[_from][msg.sender], _value);
emit Transfer(_from, _to, _value);
return true;
}
function totalSupply() constant public returns (uint256 Supply) {
return totalSupply;
}
function balanceOf(address _owner) constant public returns (uint256 balance) {
return balanceOf[_owner];
}
function allowance(address _owner, address _spender) constant public returns (uint256 remaining) {
return allowance[_owner][_spender];
}
function() public payable {
revert();
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"Supply","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":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","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":"pause","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":"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":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","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"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"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"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]Contract Creation Code
60806040526000805460a060020a60ff021916905534801561002057600080fd5b5060008054600160a060020a03191633179055662386f26fc100006004556040805180820190915260098082527f536e6f7720436f696e000000000000000000000000000000000000000000000060209092019182526100829160019161010c565b506040805180820190915260038082527f534e43000000000000000000000000000000000000000000000000000000000060209092019182526100c79160029161010c565b506003805460ff1916600817905560058054600160a060020a031916331790819055600454600160a060020a03919091166000908152600660205260409020556101a7565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061014d57805160ff191683800117855561017a565b8280016001018555821561017a579182015b8281111561017a57825182559160200191906001019061015f565b5061018692915061018a565b5090565b6101a491905b808211156101865760008155600101610190565b90565b610980806101b66000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd578063313ce567146101e75780633f4ba83a146102125780635c975abb1461022957806370a082311461023e5780638456cb591461025f5780638da5cb5b1461027457806395d89b41146102a5578063a9059cbb146102ba578063dd62ed3e146102de578063f2fde38b14610305575b600080fd5b3480156100e057600080fd5b506100e9610326565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a03600435166024356103b3565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab610432565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a0360043581169060243516604435610438565b3480156101f357600080fd5b506101fc6105c7565b6040805160ff9092168252519081900360200190f35b34801561021e57600080fd5b506102276105d0565b005b34801561023557600080fd5b50610182610646565b34801561024a57600080fd5b506101ab600160a060020a0360043516610656565b34801561026b57600080fd5b50610227610671565b34801561028057600080fd5b506102896106ec565b60408051600160a060020a039092168252519081900360200190f35b3480156102b157600080fd5b506100e96106fb565b3480156102c657600080fd5b50610182600160a060020a0360043516602435610753565b3480156102ea57600080fd5b506101ab600160a060020a036004358116906024351661085f565b34801561031157600080fd5b50610227600160a060020a036004351661088a565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103ab5780601f10610380576101008083540402835291602001916103ab565b820191906000526020600020905b81548152906001019060200180831161038e57829003601f168201915b505050505081565b6000805460a060020a900460ff16156103cb57600080fd5b336000818152600760209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60045490565b6000805460a060020a900460ff161561045057600080fd5b600160a060020a03841660009081526006602052604090205482111561047557600080fd5b600160a060020a038316600090815260066020526040902054828101101561049c57600080fd5b600160a060020a03841660009081526007602090815260408083203384529091529020548211156104cc57600080fd5b600160a060020a0384166000908152600660205260409020546104ef908361091e565b600160a060020a03808616600090815260066020526040808220939093559085168152205461051e9083610930565b600160a060020a03808516600090815260066020908152604080832094909455918716815260078252828120338252909152205461055c908361091e565b600160a060020a03808616600081815260076020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60035460ff1681565b600054600160a060020a031633146105e757600080fd5b60005460a060020a900460ff1615156105ff57600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b600160a060020a031660009081526006602052604090205490565b600054600160a060020a0316331461068857600080fd5b60005460a060020a900460ff161561069f57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600554600160a060020a031681565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156103ab5780601f10610380576101008083540402835291602001916103ab565b6000805460a060020a900460ff161561076b57600080fd5b6000821161077857600080fd5b3360009081526006602052604090205482111561079457600080fd5b600160a060020a03831660009081526006602052604090205482810110156107bb57600080fd5b336000908152600660205260409020546107d5908361091e565b3360009081526006602052604080822092909255600160a060020a038516815220546108019083610930565b600160a060020a0384166000818152600660209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600160a060020a03918216600090815260076020908152604080832093909416825291909152205490565b600054600160a060020a031633146108a157600080fd5b600160a060020a03811615156108b657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561092a57fe5b50900390565b60008282018381108015906109455750828110155b151561094d57fe5b93925050505600a165627a7a72305820b4b586553142cef8fd6512d3bf7b5c358770e4260b07181907e3acb68ca29f390029
Deployed Bytecode
0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd578063313ce567146101e75780633f4ba83a146102125780635c975abb1461022957806370a082311461023e5780638456cb591461025f5780638da5cb5b1461027457806395d89b41146102a5578063a9059cbb146102ba578063dd62ed3e146102de578063f2fde38b14610305575b600080fd5b3480156100e057600080fd5b506100e9610326565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a03600435166024356103b3565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab610432565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a0360043581169060243516604435610438565b3480156101f357600080fd5b506101fc6105c7565b6040805160ff9092168252519081900360200190f35b34801561021e57600080fd5b506102276105d0565b005b34801561023557600080fd5b50610182610646565b34801561024a57600080fd5b506101ab600160a060020a0360043516610656565b34801561026b57600080fd5b50610227610671565b34801561028057600080fd5b506102896106ec565b60408051600160a060020a039092168252519081900360200190f35b3480156102b157600080fd5b506100e96106fb565b3480156102c657600080fd5b50610182600160a060020a0360043516602435610753565b3480156102ea57600080fd5b506101ab600160a060020a036004358116906024351661085f565b34801561031157600080fd5b50610227600160a060020a036004351661088a565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103ab5780601f10610380576101008083540402835291602001916103ab565b820191906000526020600020905b81548152906001019060200180831161038e57829003601f168201915b505050505081565b6000805460a060020a900460ff16156103cb57600080fd5b336000818152600760209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60045490565b6000805460a060020a900460ff161561045057600080fd5b600160a060020a03841660009081526006602052604090205482111561047557600080fd5b600160a060020a038316600090815260066020526040902054828101101561049c57600080fd5b600160a060020a03841660009081526007602090815260408083203384529091529020548211156104cc57600080fd5b600160a060020a0384166000908152600660205260409020546104ef908361091e565b600160a060020a03808616600090815260066020526040808220939093559085168152205461051e9083610930565b600160a060020a03808516600090815260066020908152604080832094909455918716815260078252828120338252909152205461055c908361091e565b600160a060020a03808616600081815260076020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60035460ff1681565b600054600160a060020a031633146105e757600080fd5b60005460a060020a900460ff1615156105ff57600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b600160a060020a031660009081526006602052604090205490565b600054600160a060020a0316331461068857600080fd5b60005460a060020a900460ff161561069f57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600554600160a060020a031681565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156103ab5780601f10610380576101008083540402835291602001916103ab565b6000805460a060020a900460ff161561076b57600080fd5b6000821161077857600080fd5b3360009081526006602052604090205482111561079457600080fd5b600160a060020a03831660009081526006602052604090205482810110156107bb57600080fd5b336000908152600660205260409020546107d5908361091e565b3360009081526006602052604080822092909255600160a060020a038516815220546108019083610930565b600160a060020a0384166000818152600660209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600160a060020a03918216600090815260076020908152604080832093909416825291909152205490565b600054600160a060020a031633146108a157600080fd5b600160a060020a03811615156108b657600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561092a57fe5b50900390565b60008282018381108015906109455750828110155b151561094d57fe5b93925050505600a165627a7a72305820b4b586553142cef8fd6512d3bf7b5c358770e4260b07181907e3acb68ca29f390029
Swarm Source
bzzr://b4b586553142cef8fd6512d3bf7b5c358770e4260b07181907e3acb68ca29f39
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)