Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
118,545,571.228 CREDOICO
Holders
1,539
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
3,752 CREDOICOValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CredoIco
Compiler Version
v0.4.8+commit.60cc1668
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-07-25 */ pragma solidity ^0.4.8; // The implementation for the Credo ICO smart contract was inspired by // the Ethereum token creation tutorial, the FirstBlood token, and the BAT token. /////////////// // SAFE MATH // /////////////// contract SafeMath { function assert(bool assertion) internal { if (!assertion) { throw; } } // assert no longer needed once solidity is on 0.4.10 function safeAdd(uint256 x, uint256 y) internal returns(uint256) { uint256 z = x + y; assert((z >= x) && (z >= y)); return z; } function safeSubtract(uint256 x, uint256 y) internal returns(uint256) { assert(x >= y); uint256 z = x - y; return z; } function safeMult(uint256 x, uint256 y) internal returns(uint256) { uint256 z = x * y; assert((x == 0)||(z/x == y)); return z; } } //////////////////// // STANDARD TOKEN // //////////////////// contract Token { uint256 public totalSupply; function balanceOf(address _owner) constant returns (uint256 balance); function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(address _from, address _to, uint256 _value) returns (bool success); function approve(address _spender, uint256 _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /* ERC 20 token */ contract StandardToken is Token { function transfer(address _to, uint256 _value) returns (bool success) { if (balances[msg.sender] >= _value && _value > 0) { balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } else { return false; } } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) { balances[_to] += _value; balances[_from] -= _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; } ///////////////////// // CREDO ICO TOKEN // ///////////////////// contract CredoIco is StandardToken, SafeMath { // Descriptive properties string public constant name = "Credo ICO Token"; string public constant symbol = "CREDOICO"; uint256 public constant decimals = 18; string public version = "1.0"; // Account for ether proceed. address public etherProceedsAccount; // These params specify the start, end, min, and max of the sale. bool public isFinalized; uint256 public fundingStartBlock; uint256 public fundingEndBlock; uint256 public constant tokenCreationCap = 375200000 * 10**decimals; uint256 public constant tokenCreationMin = 938000 * 10**decimals; // Setting the exchange rate for the first part of the ICO. uint256 public constant credoEthExchangeRate = 3752; // Events for logging refunds and token creation. event LogRefund(address indexed _to, uint256 _value); event CreateCredoIco(address indexed _to, uint256 _value); // constructor function CredoIco(address _etherProceedsAccount, uint256 _fundingStartBlock, uint256 _fundingEndBlock) { isFinalized = false; etherProceedsAccount = _etherProceedsAccount; fundingStartBlock = _fundingStartBlock; fundingEndBlock = _fundingEndBlock; totalSupply = 0; } function createTokens() payable external { if (isFinalized) throw; if (block.number < fundingStartBlock) throw; if (block.number > fundingEndBlock) throw; if (msg.value == 0) throw; uint256 tokens = safeMult(msg.value, credoEthExchangeRate); uint256 checkedSupply = safeAdd(totalSupply, tokens); if (tokenCreationCap < checkedSupply) throw; totalSupply = checkedSupply; balances[msg.sender] += tokens; CreateCredoIco(msg.sender, tokens); } function finalize() external { if (isFinalized) throw; if (msg.sender != etherProceedsAccount) throw; if (totalSupply < tokenCreationMin) throw; if (block.number <= fundingEndBlock && totalSupply != tokenCreationCap) throw; isFinalized = true; if (!etherProceedsAccount.send(this.balance)) throw; } function refund() external { if (isFinalized) throw; if (block.number <= fundingEndBlock) throw; if (totalSupply >= tokenCreationMin) throw; uint256 credoVal = balances[msg.sender]; if (credoVal == 0) throw; balances[msg.sender] = 0; totalSupply = safeSubtract(totalSupply, credoVal); uint256 ethVal = credoVal / credoEthExchangeRate; LogRefund(msg.sender, ethVal); if (!msg.sender.send(ethVal)) throw; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"","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":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"credoEthExchangeRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenCreationCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fundingEndBlock","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":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"createTokens","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"tokenCreationMin","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fundingStartBlock","outputs":[{"name":"","type":"uint256"}],"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":true,"inputs":[],"name":"etherProceedsAccount","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_etherProceedsAccount","type":"address"},{"name":"_fundingStartBlock","type":"uint256"},{"name":"_fundingEndBlock","type":"uint256"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"LogRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"CreateCredoIco","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
60a0604052600360608190527f312e3000000000000000000000000000000000000000000000000000000000006080908152815460008390527f312e30000000000000000000000000000000000000000000000000000000000683557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b602060026001841615610100026000190190931692909204601f01919091048101918391906100d3565b828001600101855582156100d3579182015b828111156100d35782518255916020019190600101906100b8565b5b506100f49291505b808211156100f057600081556001016100dc565b5090565b50503461000057604051606080610d4b8339810160409081528151602083015191909201515b60048054600160a860020a031916600160a060020a03851617905560058290556006819055600080555b5050505b610bf4806101576000396000f300606060405236156100f65763ffffffff60e060020a60003504166306fdde0381146100fb578063095ea7b31461018857806318160ddd146101b857806323b872dd146101d7578063313ce5671461020d5780634bb278f31461022c57806354fd4d501461023b578063590e1ae3146102c85780636e083bc7146102d75780636f7920fd146102f657806370a08231146103155780638d4e40831461034057806391b43d131461036157806395d89b4114610380578063a9059cbb1461040d578063b44272631461043d578063c039daf614610447578063d648a64714610466578063dd62ed3e14610485578063f3333e7f146104b6575b610000565b34610000576101086104df565b60408051602080825283518183015283519192839290830191850190808383821561014e575b80518252602083111561014e57601f19909201916020918201910161012e565b505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576101a4600160a060020a0360043516602435610516565b604080519115158252519081900360200190f35b34610000576101c5610581565b60408051918252519081900360200190f35b34610000576101a4600160a060020a0360043581169060243516604435610587565b604080519115158252519081900360200190f35b34610000576101c561067d565b60408051918252519081900360200190f35b3461000057610239610682565b005b3461000057610108610753565b60408051602080825283518183015283519192839290830191850190808383821561014e575b80518252602083111561014e57601f19909201916020918201910161012e565b505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102396107e1565b005b34610000576101c56108ee565b60408051918252519081900360200190f35b34610000576101c56108f4565b60408051918252519081900360200190f35b34610000576101c5600160a060020a0360043516610904565b60408051918252519081900360200190f35b34610000576101a4610923565b604080519115158252519081900360200190f35b34610000576101c5610933565b60408051918252519081900360200190f35b3461000057610108610939565b60408051602080825283518183015283519192839290830191850190808383821561014e575b80518252602083111561014e57601f19909201916020918201910161012e565b505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576101a4600160a060020a0360043516602435610970565b604080519115158252519081900360200190f35b610239610a1c565b005b34610000576101c5610af6565b60408051918252519081900360200190f35b34610000576101c5610b04565b60408051918252519081900360200190f35b34610000576101c5600160a060020a0360043581169060243516610b0a565b60408051918252519081900360200190f35b34610000576104c3610b37565b60408051600160a060020a039092168252519081900360200190f35b60408051808201909152600f81527f437265646f2049434f20546f6b656e0000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60005481565b600160a060020a0383166000908152600160205260408120548290108015906105d75750600160a060020a0380851660009081526002602090815260408083203390941683529290522054829010155b80156105e35750600082115b1561067157600160a060020a03808416600081815260016020908152604080832080548801905588851680845281842080548990039055600283528184203390961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001610675565b5060005b5b9392505050565b601281565b60045460a060020a900460ff161561069957610000565b60045433600160a060020a039081169116146106b457610000565b60005469c6a114f6b701b64000009010156106ce57610000565b60065443111580156106ee57506000546b01365bb0c17df2acc400000014155b156106f857610000565b6004805474ff0000000000000000000000000000000000000000191660a060020a1790819055604051600160a060020a039182169130163180156108fc02916000818181858888f19350505050151561075057610000565b5b565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107d95780601f106107ae576101008083540402835291602001916107d9565b820191906000526020600020905b8154815290600101906020018083116107bc57829003601f168201915b505050505081565b600454600090819060a060020a900460ff16156107fd57610000565b600654431161080b57610000565b60005469c6a114f6b701b6400000901061082457610000565b600160a060020a033316600090815260016020526040902054915081151561084b57610000565b600160a060020a0333166000908152600160205260408120819055546108719083610b46565b6000555060408051610ea883048082529151600160a060020a033316917fb6c0eca8138e097d71e2dd31e19a1266487f0553f170b7260ffe68bcbe9ff8a7919081900360200190a2604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015156108e957610000565b5b5050565b610ea881565b6b01365bb0c17df2acc400000081565b600160a060020a0381166000908152600160205260409020545b919050565b60045460a060020a900460ff1681565b60065481565b60408051808201909152600881527f435245444f49434f000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120548290108015906109995750600082115b15610a0d57600160a060020a03338116600081815260016020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350600161057b565b50600061057b565b5b92915050565b600454600090819060a060020a900460ff1615610a3857610000565b600554431015610a4757610000565b600654431115610a5657610000565b341515610a6257610000565b610a6e34610ea8610b64565b9150610a7c60005483610b90565b90506b01365bb0c17df2acc400000081901015610a9857610000565b6000818155600160a060020a033316808252600160209081526040928390208054860190558251858152925191927fd7ef4a04aefa1b36e780ca009cdffba0abcc167f6eb3239a475e738586585338929081900390910190a25b5050565b69c6a114f6b701b640000081565b60055481565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b600454600160a060020a031681565b60006000610b5683851015610bb8565b5050808203805b5092915050565b6000828202610b85841580610b80575083858381156100005704145b610bb8565b8091505b5092915050565b6000828201610b85848210801590610b805750838210155b610bb8565b8091505b5092915050565b801515610bc457610000565b5b505600a165627a7a72305820123314378ad61d631e9cbea23008e96bf47e26ec663339416a4e52d79d8d44990029000000000000000000000000cc2de4acf7af057f51fc8b4f9fd7a6a09d5a2b0d00000000000000000000000000000000000000000000000000000000003e390600000000000000000000000000000000000000000000000000000000004053a3
Deployed Bytecode
0x606060405236156100f65763ffffffff60e060020a60003504166306fdde0381146100fb578063095ea7b31461018857806318160ddd146101b857806323b872dd146101d7578063313ce5671461020d5780634bb278f31461022c57806354fd4d501461023b578063590e1ae3146102c85780636e083bc7146102d75780636f7920fd146102f657806370a08231146103155780638d4e40831461034057806391b43d131461036157806395d89b4114610380578063a9059cbb1461040d578063b44272631461043d578063c039daf614610447578063d648a64714610466578063dd62ed3e14610485578063f3333e7f146104b6575b610000565b34610000576101086104df565b60408051602080825283518183015283519192839290830191850190808383821561014e575b80518252602083111561014e57601f19909201916020918201910161012e565b505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576101a4600160a060020a0360043516602435610516565b604080519115158252519081900360200190f35b34610000576101c5610581565b60408051918252519081900360200190f35b34610000576101a4600160a060020a0360043581169060243516604435610587565b604080519115158252519081900360200190f35b34610000576101c561067d565b60408051918252519081900360200190f35b3461000057610239610682565b005b3461000057610108610753565b60408051602080825283518183015283519192839290830191850190808383821561014e575b80518252602083111561014e57601f19909201916020918201910161012e565b505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102396107e1565b005b34610000576101c56108ee565b60408051918252519081900360200190f35b34610000576101c56108f4565b60408051918252519081900360200190f35b34610000576101c5600160a060020a0360043516610904565b60408051918252519081900360200190f35b34610000576101a4610923565b604080519115158252519081900360200190f35b34610000576101c5610933565b60408051918252519081900360200190f35b3461000057610108610939565b60408051602080825283518183015283519192839290830191850190808383821561014e575b80518252602083111561014e57601f19909201916020918201910161012e565b505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576101a4600160a060020a0360043516602435610970565b604080519115158252519081900360200190f35b610239610a1c565b005b34610000576101c5610af6565b60408051918252519081900360200190f35b34610000576101c5610b04565b60408051918252519081900360200190f35b34610000576101c5600160a060020a0360043581169060243516610b0a565b60408051918252519081900360200190f35b34610000576104c3610b37565b60408051600160a060020a039092168252519081900360200190f35b60408051808201909152600f81527f437265646f2049434f20546f6b656e0000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60005481565b600160a060020a0383166000908152600160205260408120548290108015906105d75750600160a060020a0380851660009081526002602090815260408083203390941683529290522054829010155b80156105e35750600082115b1561067157600160a060020a03808416600081815260016020908152604080832080548801905588851680845281842080548990039055600283528184203390961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001610675565b5060005b5b9392505050565b601281565b60045460a060020a900460ff161561069957610000565b60045433600160a060020a039081169116146106b457610000565b60005469c6a114f6b701b64000009010156106ce57610000565b60065443111580156106ee57506000546b01365bb0c17df2acc400000014155b156106f857610000565b6004805474ff0000000000000000000000000000000000000000191660a060020a1790819055604051600160a060020a039182169130163180156108fc02916000818181858888f19350505050151561075057610000565b5b565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107d95780601f106107ae576101008083540402835291602001916107d9565b820191906000526020600020905b8154815290600101906020018083116107bc57829003601f168201915b505050505081565b600454600090819060a060020a900460ff16156107fd57610000565b600654431161080b57610000565b60005469c6a114f6b701b6400000901061082457610000565b600160a060020a033316600090815260016020526040902054915081151561084b57610000565b600160a060020a0333166000908152600160205260408120819055546108719083610b46565b6000555060408051610ea883048082529151600160a060020a033316917fb6c0eca8138e097d71e2dd31e19a1266487f0553f170b7260ffe68bcbe9ff8a7919081900360200190a2604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015156108e957610000565b5b5050565b610ea881565b6b01365bb0c17df2acc400000081565b600160a060020a0381166000908152600160205260409020545b919050565b60045460a060020a900460ff1681565b60065481565b60408051808201909152600881527f435245444f49434f000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120548290108015906109995750600082115b15610a0d57600160a060020a03338116600081815260016020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350600161057b565b50600061057b565b5b92915050565b600454600090819060a060020a900460ff1615610a3857610000565b600554431015610a4757610000565b600654431115610a5657610000565b341515610a6257610000565b610a6e34610ea8610b64565b9150610a7c60005483610b90565b90506b01365bb0c17df2acc400000081901015610a9857610000565b6000818155600160a060020a033316808252600160209081526040928390208054860190558251858152925191927fd7ef4a04aefa1b36e780ca009cdffba0abcc167f6eb3239a475e738586585338929081900390910190a25b5050565b69c6a114f6b701b640000081565b60055481565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b600454600160a060020a031681565b60006000610b5683851015610bb8565b5050808203805b5092915050565b6000828202610b85841580610b80575083858381156100005704145b610bb8565b8091505b5092915050565b6000828201610b85848210801590610b805750838210155b610bb8565b8091505b5092915050565b801515610bc457610000565b5b505600a165627a7a72305820123314378ad61d631e9cbea23008e96bf47e26ec663339416a4e52d79d8d44990029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000cc2de4acf7af057f51fc8b4f9fd7a6a09d5a2b0d00000000000000000000000000000000000000000000000000000000003e390600000000000000000000000000000000000000000000000000000000004053a3
-----Decoded View---------------
Arg [0] : _etherProceedsAccount (address): 0xCC2De4Acf7aF057f51FC8B4f9fd7a6A09D5A2B0D
Arg [1] : _fundingStartBlock (uint256): 4077830
Arg [2] : _fundingEndBlock (uint256): 4215715
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000cc2de4acf7af057f51fc8b4f9fd7a6a09d5a2b0d
Arg [1] : 00000000000000000000000000000000000000000000000000000000003e3906
Arg [2] : 00000000000000000000000000000000000000000000000000000000004053a3
Swarm Source
bzzr://123314378ad61d631e9cbea23008e96bf47e26ec663339416a4e52d79d8d4499
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.