CanYa token contract has migrated to a new address. The new token can be found here.
Overview
Max Total Supply
100,000,000 CAN
Holders
2 (0.00%)
Market
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 6 Decimals)
Balance
90,550,000 CANValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
CanYaCoin
Compiler Version
v0.4.15+commit.bbb8e64f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2017-10-03
*/
/**
* CanYaCoin Presale contract
*/
pragma solidity 0.4.15;
library SafeMath {
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;
}
}
contract ERC20TokenInterface {
/// @return The total amount of tokens
function totalSupply() constant returns (uint256 supply);
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant public returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) public returns (bool success);
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) constant public returns (uint256 remaining);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract CanYaCoin is ERC20TokenInterface {
string public constant name = "CanYaCoin";
string public constant symbol = "CAN";
uint256 public constant decimals = 6;
uint256 public constant totalTokens = 100000000 * (10 ** decimals);
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
function CanYaCoin() {
balances[msg.sender] = totalTokens;
}
function totalSupply() constant returns (uint256) {
return totalTokens;
}
function transfer(address _to, uint256 _value) public returns (bool) {
if (balances[msg.sender] >= _value) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
}
return false;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value) {
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
balances[_to] += _value;
Transfer(_from, _to, _value);
return true;
}
return false;
}
function balanceOf(address _owner) constant public returns (uint256) {
return balances[_owner];
}
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
function allowance(address _owner, address _spender) constant public returns (uint256 remaining) {
return allowed[_owner][_spender];
}
}
/* Included for compilation to match bytecode for etherscan. Unused. */
contract Presale {
using SafeMath for uint256;
CanYaCoin public CanYaCoinToken;
bool public ended = false;
uint256 internal refundAmount = 0;
uint256 public constant MAX_CONTRIBUTION = 3780 ether;
uint256 public constant MIN_CONTRIBUTION = 1 ether;
address public owner;
address public multisig;
uint256 public constant pricePerToken = 400000000; // (wei per CAN)
uint256 public tokensAvailable = 9450000 * (10**6); // Whitepaper 9.45mil * 10^6
event LogRefund(uint256 _amount);
event LogEnded(bool _soldOut);
event LogContribution(uint256 _amount, uint256 _tokensPurchased);
modifier notEnded() {
require(!ended);
_;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/// @dev Sets up the amount of tokens available as per the whitepaper
/// @param _token Address of the CanYaCoin contract
function Presale(address _token, address _multisig) {
require (_token != address(0) && _multisig != address(0));
owner = msg.sender;
CanYaCoinToken = CanYaCoin(_token);
multisig = _multisig;
}
/// @dev Fallback function, this allows users to purchase tokens by simply sending ETH to the
/// contract; they will however need to specify a higher amount of gas than the default (21000)
function () notEnded payable public {
require(msg.value >= MIN_CONTRIBUTION && msg.value <= MAX_CONTRIBUTION);
uint256 tokensPurchased = msg.value.div(pricePerToken);
if (tokensPurchased > tokensAvailable) {
ended = true;
LogEnded(true);
refundAmount = (tokensPurchased - tokensAvailable) * pricePerToken;
tokensPurchased = tokensAvailable;
}
tokensAvailable -= tokensPurchased;
//Refund the difference
if (ended && refundAmount > 0) {
uint256 toRefund = refundAmount;
refundAmount = 0;
// reentry should not be possible
msg.sender.transfer(toRefund);
LogRefund(toRefund);
}
LogContribution(msg.value, tokensPurchased);
CanYaCoinToken.transfer(msg.sender, tokensPurchased);
multisig.transfer(msg.value - toRefund);
}
/// @dev Ends the crowdsale and withdraws any remaining tokens
/// @param _to Address to withdraw the tokens to
function withdrawTokens(address _to) onlyOwner public {
require(_to != address(0));
if (!ended) {
LogEnded(false);
}
ended = true;
CanYaCoinToken.transfer(_to, tokensAvailable);
}
}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,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","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":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalTokens","outputs":[{"name":"","type":"uint256"}],"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":"","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"},{"inputs":[],"payable":false,"type":"constructor"},{"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
6060604052341561000f57600080fd5b5b600160a060020a0333166000908152602081905260409020655af3107a400090555b5b6106d5806100426000396000f300606060405236156100b75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100bc578063095ea7b31461014757806318160ddd1461017d57806323b872dd146101a257806327e235e3146101de578063313ce5671461020f5780635c6581651461023457806370a082311461026b5780637e1c0c091461029c57806395d89b41146102c1578063a9059cbb1461034c578063dd62ed3e14610382575b600080fd5b34156100c757600080fd5b6100cf6103b9565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010c5780820151818401525b6020016100f3565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015257600080fd5b610169600160a060020a03600435166024356103f0565b604051901515815260200160405180910390f35b341561018857600080fd5b61019061045d565b60405190815260200160405180910390f35b34156101ad57600080fd5b610169600160a060020a0360043581169060243516604435610468565b604051901515815260200160405180910390f35b34156101e957600080fd5b610190600160a060020a0360043516610551565b60405190815260200160405180910390f35b341561021a57600080fd5b610190610563565b60405190815260200160405180910390f35b341561023f57600080fd5b610190600160a060020a0360043581169060243516610568565b60405190815260200160405180910390f35b341561027657600080fd5b610190600160a060020a0360043516610585565b60405190815260200160405180910390f35b34156102a757600080fd5b6101906105a4565b60405190815260200160405180910390f35b34156102cc57600080fd5b6100cf6105ae565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010c5780820151818401525b6020016100f3565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561035757600080fd5b610169600160a060020a03600435166024356105e5565b604051901515815260200160405180910390f35b341561038d57600080fd5b610190600160a060020a036004358116906024351661067c565b60405190815260200160405180910390f35b60408051908101604052600981527f43616e5961436f696e0000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b655af3107a40005b90565b600160a060020a0383166000908152602081905260408120548290108015906104b85750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b1561054657600160a060020a03808516600081815260208181526040808320805488900390556001825280832033861684528252808320805488900390559387168083529082905290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600161054a565b5060005b9392505050565b60006020819052908152604090205481565b600681565b600160209081526000928352604080842090915290825290205481565b600160a060020a0381166000908152602081905260409020545b919050565b655af3107a400081565b60408051908101604052600381527f43414e0000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03331660009081526020819052604081205482901061067257600160a060020a033381166000818152602081905260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001610457565b5060005b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a72305820eaca9ba2eaf742474bd39e89fd9527e98475fe283ea3c3e6b9860baa5e7a46910029
Deployed Bytecode
0x606060405236156100b75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100bc578063095ea7b31461014757806318160ddd1461017d57806323b872dd146101a257806327e235e3146101de578063313ce5671461020f5780635c6581651461023457806370a082311461026b5780637e1c0c091461029c57806395d89b41146102c1578063a9059cbb1461034c578063dd62ed3e14610382575b600080fd5b34156100c757600080fd5b6100cf6103b9565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010c5780820151818401525b6020016100f3565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015257600080fd5b610169600160a060020a03600435166024356103f0565b604051901515815260200160405180910390f35b341561018857600080fd5b61019061045d565b60405190815260200160405180910390f35b34156101ad57600080fd5b610169600160a060020a0360043581169060243516604435610468565b604051901515815260200160405180910390f35b34156101e957600080fd5b610190600160a060020a0360043516610551565b60405190815260200160405180910390f35b341561021a57600080fd5b610190610563565b60405190815260200160405180910390f35b341561023f57600080fd5b610190600160a060020a0360043581169060243516610568565b60405190815260200160405180910390f35b341561027657600080fd5b610190600160a060020a0360043516610585565b60405190815260200160405180910390f35b34156102a757600080fd5b6101906105a4565b60405190815260200160405180910390f35b34156102cc57600080fd5b6100cf6105ae565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010c5780820151818401525b6020016100f3565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561035757600080fd5b610169600160a060020a03600435166024356105e5565b604051901515815260200160405180910390f35b341561038d57600080fd5b610190600160a060020a036004358116906024351661067c565b60405190815260200160405180910390f35b60408051908101604052600981527f43616e5961436f696e0000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b655af3107a40005b90565b600160a060020a0383166000908152602081905260408120548290108015906104b85750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b1561054657600160a060020a03808516600081815260208181526040808320805488900390556001825280832033861684528252808320805488900390559387168083529082905290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600161054a565b5060005b9392505050565b60006020819052908152604090205481565b600681565b600160209081526000928352604080842090915290825290205481565b600160a060020a0381166000908152602081905260409020545b919050565b655af3107a400081565b60408051908101604052600381527f43414e0000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03331660009081526020819052604081205482901061067257600160a060020a033381166000818152602081905260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001610457565b5060005b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a72305820eaca9ba2eaf742474bd39e89fd9527e98475fe283ea3c3e6b9860baa5e7a46910029
Swarm Source
bzzr://eaca9ba2eaf742474bd39e89fd9527e98475fe283ea3c3e6b9860baa5e7a4691
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)