ERC-20
Overview
Max Total Supply
15,000,000 COGNX
Holders
936
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:
COGNXToken
Compiler Version
v0.4.16+commit.d7661dd9
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-10-31 */ pragma solidity ^0.4.16; // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/issues/20 contract TokenERC20 { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ // total amount of tokens uint256 public totalSupply; // Send _value amount of tokens to address _to /// @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) returns (bool success); // Send _value amount of tokens from address _from to address _to /// @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) returns (bool success); // Allow _spender to withdraw from your account, multiple times, up to the _value amount. // If this function is called again it overwrites the current allowance with _value. // this function is required for some DEX functionality /// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) returns (bool success); // Returns the amount which _spender is still allowed to withdraw from _owner /// @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 returns (uint256 remaining); // Get the account balance of another account with address _owner /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance); // Triggered when tokens are transferred. /// @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 event Transfer(address indexed _from, address indexed _to, uint256 _value); // Triggered whenever approve(address _spender, uint256 _value) is called. event Approval(address indexed _owner, address indexed _spender, uint256 _value); } interface TokenNotifier { function receiveApproval(address from, uint256 _amount, address _token, bytes _data); } /** * @title SafeMath (from https://github.com/OpenZeppelin/zeppelin-solidity/blob/4d91118dd964618863395dcca25a50ff137bf5b6/contracts/math/SafeMath.sol) * @dev Math operations with safety checks that throw on error */ contract SafeMath { function safeMul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function safeSub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract StandardToken is TokenERC20, SafeMath { // Balances for each account mapping (address => uint256) balances; // Owner of account approves the transfer of an amount to another account mapping (address => mapping (address => uint256)) allowed; // Transfer the balance from owner's account to another account function transfer(address _to, uint256 _value) returns (bool success) { require(balances[msg.sender] >= _value); balances[msg.sender] = safeSub(balances[msg.sender], _value); balances[_to] = safeAdd(balances[_to], _value); Transfer(msg.sender, _to, _value); return true; } // 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; function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { uint256 allowance = allowed[_from][msg.sender]; require(balances[_from] >= _value && allowance >= _value); balances[_to] = safeAdd(balances[_to], _value); balances[_from] = safeSub(balances[_from], _value); allowed[_from][msg.sender] = safeSub(allowed[_from][msg.sender], _value); Transfer(_from, _to, _value); return true; } // Allow _spender to withdraw from your account, multiple times, up to the _value amount. // If this function is called again it overwrites the current allowance with _value. function approve(address _spender, uint256 _value) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } // Balance of a specific account function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } // Returns the amount which _spender is still allowed to withdraw from _owner based on the approve function function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } //final implementation contract COGNXToken is StandardToken { uint8 public constant decimals = 18; string public constant name = 'COGNX'; string public constant symbol = 'COGNX'; string public constant version = '1.0.0'; uint256 public totalSupply = 15000000 * 10 ** uint256(decimals); //Constructor function COGNXToken() public { balances[msg.sender] = totalSupply; } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this. //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)); return true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"","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":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"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":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":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","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"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","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
60606040526a0c685fa11e01ec6f000000600355341561001e57600080fd5b5b600354600160a060020a0333166000908152600160205260409020555b5b6109a08061004c6000396000f300606060405236156100935763ffffffff60e060020a60003504166306fdde038114610098578063095ea7b31461012357806318160ddd1461015957806323b872dd1461017e578063313ce567146101ba57806354fd4d50146101e357806370a082311461026e57806395d89b4114610098578063a9059cbb1461032a578063cae9ca5114610360578063dd62ed3e146103d9575b600080fd5b34156100a357600080fd5b6100ab610410565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100e85780820151818401525b6020016100cf565b50505050905090810190601f1680156101155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561012e57600080fd5b610145600160a060020a0360043516602435610447565b604051901515815260200160405180910390f35b341561016457600080fd5b61016c6104b4565b60405190815260200160405180910390f35b341561018957600080fd5b610145600160a060020a03600435811690602435166044356104ba565b604051901515815260200160405180910390f35b34156101c557600080fd5b6101cd610608565b60405160ff909116815260200160405180910390f35b34156101ee57600080fd5b6100ab61060d565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100e85780820151818401525b6020016100cf565b50505050905090810190601f1680156101155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561027957600080fd5b61016c600160a060020a0360043516610644565b60405190815260200160405180910390f35b34156100a357600080fd5b6100ab610410565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100e85780820151818401525b6020016100cf565b50505050905090810190601f1680156101155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033557600080fd5b610145600160a060020a036004351660243561069a565b604051901515815260200160405180910390f35b341561036b57600080fd5b61014560048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061077495505050505050565b604051901515815260200160405180910390f35b34156103e457600080fd5b61016c600160a060020a0360043581169060243516610916565b60405190815260200160405180910390f35b60408051908101604052600581527f434f474e58000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60035481565b600160a060020a0380841660008181526002602090815260408083203390951683529381528382205492825260019052918220548390108015906104fe5750828110155b151561050957600080fd5b600160a060020a03841660009081526001602052604090205461052c9084610943565b600160a060020a03808616600090815260016020526040808220939093559087168152205461055b908461095d565b600160a060020a0380871660009081526001602090815260408083209490945560028152838220339093168252919091522054610598908461095d565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191505b509392505050565b601281565b60408051908101604052600581527f312e302e30000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0381166000908152600160205260409020545b919050565b60408051908101604052600581527f434f474e58000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a033316600090815260016020526040812054829010156106c057600080fd5b600160a060020a0333166000908152600160205260409020546106e3908361095d565b600160a060020a0333811660009081526001602052604080822093909355908516815220546107129083610943565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b600160a060020a03338116600081815260026020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a03166040517f72656365697665417070726f76616c28616464726573732c75696e743235362c81527f616464726573732c6279746573290000000000000000000000000000000000006020820152602e01604051809103902060e060020a9004338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001828051906020019080838360005b838110156108b65780820151818401525b60200161089d565b50505050905090810190601f1680156108e35780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f192505050151561090b57600080fd5b5060015b9392505050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60008282018381101561095257fe5b8091505b5092915050565b60008282111561096957fe5b508082035b929150505600a165627a7a723058204ed60375a6bf959bd2542899066fa73355cfb69f857f8d3c4b107d9403000b640029
Deployed Bytecode
0x606060405236156100935763ffffffff60e060020a60003504166306fdde038114610098578063095ea7b31461012357806318160ddd1461015957806323b872dd1461017e578063313ce567146101ba57806354fd4d50146101e357806370a082311461026e57806395d89b4114610098578063a9059cbb1461032a578063cae9ca5114610360578063dd62ed3e146103d9575b600080fd5b34156100a357600080fd5b6100ab610410565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100e85780820151818401525b6020016100cf565b50505050905090810190601f1680156101155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561012e57600080fd5b610145600160a060020a0360043516602435610447565b604051901515815260200160405180910390f35b341561016457600080fd5b61016c6104b4565b60405190815260200160405180910390f35b341561018957600080fd5b610145600160a060020a03600435811690602435166044356104ba565b604051901515815260200160405180910390f35b34156101c557600080fd5b6101cd610608565b60405160ff909116815260200160405180910390f35b34156101ee57600080fd5b6100ab61060d565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100e85780820151818401525b6020016100cf565b50505050905090810190601f1680156101155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561027957600080fd5b61016c600160a060020a0360043516610644565b60405190815260200160405180910390f35b34156100a357600080fd5b6100ab610410565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100e85780820151818401525b6020016100cf565b50505050905090810190601f1680156101155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033557600080fd5b610145600160a060020a036004351660243561069a565b604051901515815260200160405180910390f35b341561036b57600080fd5b61014560048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061077495505050505050565b604051901515815260200160405180910390f35b34156103e457600080fd5b61016c600160a060020a0360043581169060243516610916565b60405190815260200160405180910390f35b60408051908101604052600581527f434f474e58000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60035481565b600160a060020a0380841660008181526002602090815260408083203390951683529381528382205492825260019052918220548390108015906104fe5750828110155b151561050957600080fd5b600160a060020a03841660009081526001602052604090205461052c9084610943565b600160a060020a03808616600090815260016020526040808220939093559087168152205461055b908461095d565b600160a060020a0380871660009081526001602090815260408083209490945560028152838220339093168252919091522054610598908461095d565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191505b509392505050565b601281565b60408051908101604052600581527f312e302e30000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0381166000908152600160205260409020545b919050565b60408051908101604052600581527f434f474e58000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a033316600090815260016020526040812054829010156106c057600080fd5b600160a060020a0333166000908152600160205260409020546106e3908361095d565b600160a060020a0333811660009081526001602052604080822093909355908516815220546107129083610943565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b600160a060020a03338116600081815260026020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a03166040517f72656365697665417070726f76616c28616464726573732c75696e743235362c81527f616464726573732c6279746573290000000000000000000000000000000000006020820152602e01604051809103902060e060020a9004338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001828051906020019080838360005b838110156108b65780820151818401525b60200161089d565b50505050905090810190601f1680156108e35780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f192505050151561090b57600080fd5b5060015b9392505050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60008282018381101561095257fe5b8091505b5092915050565b60008282111561096957fe5b508082035b929150505600a165627a7a723058204ed60375a6bf959bd2542899066fa73355cfb69f857f8d3c4b107d9403000b640029
Swarm Source
bzzr://4ed60375a6bf959bd2542899066fa73355cfb69f857f8d3c4b107d9403000b64
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.