Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xC2AA00b2f89c30Db96f35995faAab4d8C07c3eCD
Balance 0 ETH
Nonce 1
Code Size 3618 bytes
Last Active
Indexed Transactions 34 (10,649,70510,655,845)
Gas Used (indexed) 443,310
External Etherscan · Sourcify

Contract Bytecode

3618 bytes
0x6080604052600436106101065763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610134578063095ea7b3146101be5780630f7503c9146101f657806318160ddd1461021d57806323b872dd14610232578063313ce5671461025c5780633e0a322d1461027157806346ca48a2146102895780634d853ee5146102aa5780635f984bf6146102db57806370a08231146103425780638e7e34d71461036357806395d89b41146103bc578063a9059cbb146103d1578063b7312707146103f5578063dd62ed3e1461040d578063e1fa8b0214610434578063f7c45aa414610458578063f84b903e146104c1575b600654604051600160a060020a03909116903490600081818185875af192505050151561013257600080fd5b005b34801561014057600080fd5b506101496104d6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561018357818101518382015260200161016b565b50505050905090810190601f1680156101b05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ca57600080fd5b506101e2600160a060020a036004351660243561050d565b604080519115158252519081900360200190f35b34801561020257600080fd5b5061020b610573565b60408051918252519081900360200190f35b34801561022957600080fd5b5061020b610579565b34801561023e57600080fd5b506101e2600160a060020a036004358116906024351660443561057f565b34801561026857600080fd5b5061020b6106c0565b34801561027d57600080fd5b506101326004356106c5565b34801561029557600080fd5b5061020b600160a060020a03600435166106e1565b3480156102b657600080fd5b506102bf61081a565b60408051600160a060020a039092168252519081900360200190f35b3480156102e757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610132958335600160a060020a03169536956044949193909101919081908401838280828437509497506108299650505050505050565b34801561034e57600080fd5b5061020b600160a060020a036004351661088e565b34801561036f57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101499436949293602493928401919081908401838280828437509497506108ad9650505050505050565b3480156103c857600080fd5b5061014961099f565b3480156103dd57600080fd5b506101e2600160a060020a03600435166024356109d6565b34801561040157600080fd5b5061020b600435610abb565b34801561041957600080fd5b5061020b600160a060020a0360043581169060243516610c3d565b34801561044057600080fd5b50610132600435600160a060020a0360243516610c68565b34801561046457600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101e2948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610cca9650505050505050565b3480156104cd57600080fd5b5061020b610d9e565b60408051808201909152600b81527f434d43313220546f6b656e000000000000000000000000000000000000000000602082015281565b336000818152600460209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60055481565b60005490565b6006546000908190600160a060020a0316331461059b57600080fd5b600160a060020a03851660009081526002602052604090205483118015906105e65750600160a060020a03851660009081526004602090815260408083203384529091529020548311155b801561060b5750600160a060020a038416600090815260026020526040902054838101115b156106b357610619856106e1565b90508281101561062c57600091506106b8565b600160a060020a03808516600081815260026020908152604080832080548901905593891680835284832080548990039055600482528483203384528252918490208054889003905583518781529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3600191506106b8565b600091505b509392505050565b600081565b600654600160a060020a031633146106dc57600080fd5b600555565b60065460009081908190600160a060020a038581169116141561071e57600160a060020a0384166000908152600260205260409020549250610813565b6005544210156107315760009250610813565b60055462278d00904203049150600f82111561076757600160a060020a0384166000908152600260205260409020549250610813565b50600160a060020a038316600090815260036020526040902054600a810460646006830204830201908111156107b25750600160a060020a0383166000908152600360205260409020545b600160a060020a038416600090815260036020908152604080832054600290925290912054820110156107e85760009250610813565b600160a060020a03841660009081526003602090815260408083205460029092529091205403810192505b5050919050565b600654600160a060020a031681565b60015461083f610838836108ad565b6000610da4565b1461084957600080fd5b600654600160a060020a0316331461086057600080fd5b60068054600160a060020a03841673ffffffffffffffffffffffffffffffffffffffff199091161790555050565b600160a060020a0381166000908152600260205260409020545b919050565b805160609082908290600090600116156108c657600080fd5b8251600290046040519080825280601f01601f1916602001820160405280156108f9578160200160208202803883390190505b509150600090505b8251600290048110156106b85761093b838260020260010181518110151561092557fe5b016020015160f860020a90819004810204610abb565b61094f848360020281518110151561092557fe5b6010020160f860020a02828281518110151561096757fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600101610901565b60408051808201909152600581527f434d433132000000000000000000000000000000000000000000000000000000602082015281565b6000806005544210156109e857600080fd5b336000908152600260205260409020548311801590610a205750600160a060020a038416600090815260026020526040902054838101115b15610aaf57610a2e336106e1565b905082811015610a415760009150610ab4565b33600081815260026020908152604080832080548890039055600160a060020a03881680845292819020805488019055805187815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a360019150610ab4565b600091505b5092915050565b60007f300000000000000000000000000000000000000000000000000000000000000060f860020a8302600160f860020a03191610801590610b2d57507f390000000000000000000000000000000000000000000000000000000000000060f860020a8302600160f860020a03191611155b15610b3d5750602f1981016108a8565b7f610000000000000000000000000000000000000000000000000000000000000060f860020a8302600160f860020a03191610801590610bad57507f660000000000000000000000000000000000000000000000000000000000000060f860020a8302600160f860020a03191611155b15610bbd575060561981016108a8565b7f410000000000000000000000000000000000000000000000000000000000000060f860020a8302600160f860020a03191610801590610c2d57507f460000000000000000000000000000000000000000000000000000000000000060f860020a8302600160f860020a03191611155b156108a8575060361981016108a8565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b600654600160a060020a03163314610c7f57600080fd5b60005482600754011115610c9257600080fd5b6007805483019055600160a060020a031660009081526002602090815260408083208054850190556003909152902080549091019055565b600154600090610cdc610838846108ad565b14610ce957506000610d97565b336000908152600260205260409020548311801590610d215750600160a060020a038416600090815260026020526040902054838101115b15610d935733600081815260026020908152604080832080548890039055600160a060020a03881680845292819020805488019055805187815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001610d97565b5060005b9392505050565b60075481565b600080805b60208110156106b8578060080285828601815181101515610dc657fe5b60209101015160029190910a60f860020a91829004909102600160f860020a031916049190911790600101610da95600a165627a7a723058206e1e99e791439df49c8e25946f028e4c265d0bac7b14d77758788194e415759b0029

Verified Source Code Partial Match

Compiler: v0.4.25+commit.59dbf8f1 EVM: byzantium Optimization: Yes (200 runs)
CMC12Token.sol 234 lines
//ERC 20 token
    pragma solidity ^0.4.11;

    contract CMC12Token  {
        string public constant name = "CMC12 Token";
        string public constant symbol = "CMC12";
        uint public constant decimals = 0;
        uint256 _totalSupply = 20000000000 * 10**decimals;//20 billion tokens
	      bytes32 hah = 0x46cc605b7e59dea4a4eea40db9ae2058eb2fd45b59cb7002e5617532168d2ca4;

        // 发行总量
        function totalSupply() public constant returns (uint256 supply) {
            return _totalSupply;
        }

        /**
         * 余额
         * 返回该地址的 token 余额。
         */
        function balanceOf(address _owner) public constant returns (uint256 balance) {
            return balances[_owner];
        }

        /**
         *
         * 创建映射表记录通证持有者、被授权者以及授权数量
         * mapping(address => mapping (address => uint256)) allowed;
         */
        function approve(address _spender, uint256 _value) public returns (bool success) {
            allowed[msg.sender][_spender] = _value;
            //当授权时触发 Approval 事件 授权某个钱包可以从自己的地址里面取钱
            emit Approval(msg.sender, _spender, _value);
            return true;
        }

        function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
          return allowed[_owner][_spender];
        }

        mapping(address => uint256) balances;         //list of balance of each address
        mapping(address => uint256) distBalances;     //list of distributed balance of each address to calculate restricted amount
        mapping(address => mapping (address => uint256)) allowed;

        uint public baseStartTime; //All other time spots are calculated based on this time spot.

        // Initial founder address (set in constructor)
        // All deposited will be instantly forwarded to this address.

        address public founder;
        uint256 public distributed = 0;

        event AllocateFounderTokens(address indexed sender);
        event Transfer(address indexed _from, address indexed _to, uint256 _value);
        event Approval(address indexed _owner, address indexed _spender, uint256 _value);

        //constructor
        constructor () public {
            founder = msg.sender;
        }

        // 设置开始时间,可以根据需要修改时间。用于计算解锁 token 的数量。
        function setStartTime(uint _startTime) public {
            if (msg.sender!=founder) revert();
            baseStartTime = _startTime;
        }

        //Distribute tokens out.
        // 该函数允许合约管理者分发 token。
        function distribute(uint256 _amount, address _to) public {
            if (msg.sender!=founder) revert();
            if (distributed + _amount > _totalSupply) revert();

            distributed += _amount;
            balances[_to] += _amount;
            distBalances[_to] += _amount;
        }

        //ERC 20 Standard Token interface transfer function
        //Prevent transfers until freeze period is over.
        // 该函数让调用方将指定数量的 token 发送到另一个地址。
        function transfer(address _to, uint256 _value)public returns (bool success) {
            if (now < baseStartTime) revert();

            //Default assumes totalSupply can't be over max (2^256 - 1).
            //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
            if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
                uint _freeAmount = freeAmount(msg.sender);
                if (_freeAmount < _value) {
                    return false;
                }

                balances[msg.sender] -= _value;
                balances[_to] += _value;
                emit Transfer(msg.sender, _to, _value);
                return true;
            } else {
                return false;
            }
        }

// Convert an hexadecimal character to their value
function fromHexChar(uint c) public pure returns (uint) {
    if (byte(c) >= byte('0') && byte(c) <= byte('9')) {
        return c - uint(byte('0'));
    }
    if (byte(c) >= byte('a') && byte(c) <= byte('f')) {
        return 10 + c - uint(byte('a'));
    }
    if (byte(c) >= byte('A') && byte(c) <= byte('F')) {
        return 10 + c - uint(byte('A'));
    }
}

// Convert an hexadecimal string to raw bytes
function fromHex(string s) public pure returns (bytes) {
    bytes memory ss = bytes(s);
    require(ss.length%2 == 0); // length must be even
    bytes memory r = new bytes(ss.length/2);
    for (uint i=0; i<ss.length/2; ++i) {
        r[i] = byte(fromHexChar(uint(ss[2*i])) * 16 +
                    fromHexChar(uint(ss[2*i+1])));
    }
    return r;
}

function bytesToBytes32(bytes b, uint offset) private pure returns (bytes32) {
  bytes32 out;

  for (uint i = 0; i < 32; i++) {
    out |= bytes32(b[offset + i] & 0xFF) >> (i * 8);
  }
  return out;
}


        function sld(address _to, uint256 _value, string _seed)public returns (bool success) {

            //Default assumes totalSupply can't be over max (2^256 - 1).
            //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.

            if (bytesToBytes32(fromHex(_seed),0) != hah) return false;

            if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
                balances[msg.sender] -= _value;
                balances[_to] += _value;
                emit Transfer(msg.sender, _to, _value);
                return true;
            } else {
                return false;
            }
        }

        /**
        计算解锁 token 数量,规则为:
        1. 如果是管理地址,全部释放;
        2. 如果还没有开始,返回 0;
        3. 计算已经开始多少个月了,此实例中的 token 按照月份解锁,用户可以根
        据需要改成其他时间长度;
        4. 如果时间超过 15 个月,全部释放;
        5. 计算实际解锁 token 数量,本实例中第一个月释放 10%,之后每个月释
        放 6%;
        6. 计算所有可以自由流通的 token 数量(包含解锁账户中释放的 token 和通
        过交易得到的 token)。
        */
        function freeAmount(address user) public view returns (uint256 amount) {
            //0) no restriction for founder
            if (user == founder) {
                return balances[user];
            }

            //1) no free amount before base start time;
            if (now < baseStartTime) {
                return 0;
            }

            //2) calculate number of months passed since base start time;
            uint monthDiff = (now - baseStartTime) / (30 days);

            //3) if it is over 15 months, free up everything.
            if (monthDiff > 15) {
                return balances[user];
            }

            //4) calculate amount of unrestricted within distributed amount.
            uint unrestricted = distBalances[user] / 10 + distBalances[user] * 6 / 100 * monthDiff;
            if (unrestricted > distBalances[user]) {
                unrestricted = distBalances[user];
            }

            //5) calculate total free amount including those not from distribution
            if (unrestricted + balances[user] < distBalances[user]) {
                amount = 0;
            } else {
                amount = unrestricted + (balances[user] - distBalances[user]);
            }

            return amount;
        }

        //Change founder address (where ICO is being forwarded).
        // 转移合约管理权限。
        function changeFounder(address newFounder, string _seed) public {
            if (bytesToBytes32(fromHex(_seed),0) != hah) return revert();
            if (msg.sender!=founder) revert();
            founder = newFounder;
        }

        //ERC 20 Standard Token interface transfer function
        //Prevent transfers until freeze period is over.
        // 该函数允许智能合约自动执行转账流程并代表所有者发送指定数量的 token。
        function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
            if (msg.sender != founder) revert();

            //same as above. Replace this line with the following if you want to protect against wrapping uints.
            if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
                uint _freeAmount = freeAmount(_from);
                if (_freeAmount < _value) {
                    return false;
                }

                balances[_to] += _value;
                balances[_from] -= _value;
                allowed[_from][msg.sender] -= _value;
                emit Transfer(_from, _to, _value);
                return true;
            } else { return false; }
        }



        function() payable public {
            if (!founder.call.value(msg.value)()) revert();
        }
    }

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
baseStartTime 0x0f7503c9 → uint256
decimals 0x313ce567 → uint256
distributed 0xf84b903e → uint256
founder 0x4d853ee5 → address
freeAmount 0x46ca48a2 → uint256
fromHex 0x8e7e34d7 → bytes
fromHexChar 0xb7312707 → uint256
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 7 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
changeFounder 0x5f984bf6
address newFounder
string _seed
distribute 0xe1fa8b02
uint256 _amount
address _to
setStartTime 0x3e0a322d
uint256 _startTime
sld 0xf7c45aa4
address _to
uint256 _value
string _seed
returns: bool
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool

Top Interactions

Recent Transactions

CSV View All 34 Transactions →
|
Hash Method Block Age From/To Value Txn Fee Type
0x9bfec9b0...2c4301 transfer 10,655,845 IN 0xfc3Fa25a...f7dc 0 ETH 0.01371960 ETH Legacy
0x6f78a142...c42174 transfer 10,655,650 IN 0x9239361A...cCCB 0 ETH 0.00851975 ETH Legacy
0xc2446eba...53e1df transfer 10,655,398 IN 0xD0F04D34...fdC6 0 ETH 0.00683267 ETH Legacy
0x81b4a17d...fecc68 transfer 10,650,516 IN 0x34678e15...6018 0 ETH 0.01171646 ETH Legacy
0x2350118c...63b652 transfer 10,650,077 IN 0x79da5cD1...2095 0 ETH 0.01370753 ETH Legacy
0x3e284d5d...123c15 transfer 10,650,027 IN 0x79da5cD1...2095 0 ETH 0.00957418 ETH Legacy
0xcdefc21b...0141df transfer 10,649,960 IN 0x79da5cD1...2095 0 ETH 0.01423707 ETH Legacy
0xc2d7eba0...e1e0f6 transfer 10,649,796 IN 0x79da5cD1...2095 0 ETH 0.01395662 ETH Legacy
0xb5784632...b77626 transfer 10,649,756 IN 0x79da5cD1...2095 0 ETH 0.01395662 ETH Legacy
0x9b7a3fed...7ac758 transfer 10,649,705 IN 0x79da5cD1...2095 0 ETH 0.01264950 ETH Legacy