Token YouLive Coin

 

Overview [ERC-20]

Price
$0.00 @ 0.000000 Eth
Fully Diluted Market Cap
Max Total Supply:
10,000,000,000 UC

Holders:
17,141 (0.00%)

Transfers:
-

 
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

OVERVIEW

YouLive's vision is to build the truly decentralized live social platform through blockchain technology to enable real-time content sharing, social networking and circle building through community-based autonomy.

Market

Volume (24H):$59.58
Market Capitalization:$0.00
Circulating Supply:0.00 UC
Market Data Source: Coinmarketcap

# Exchange Pair Price  24H Volume % Volume
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MyToken

Compiler Version
v0.4.20+commit.3155dd80

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-03-03
*/

pragma solidity ^0.4.8;

interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }

contract MyToken {
    /* Public variables of the token */
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;
    uint256 public multiple;
    address public owner;
    
    struct locked_balances_info{
        uint amount;
        uint time;
    }
    mapping(address => locked_balances_info[]) public lockedBalanceOf;

    /* This creates an array with all balances */
    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);

    /* This generates a public event on the blockchain that will notify clients */
    event TransferAndLock(address indexed from, address indexed to, uint256 value, uint256 time);

    /* This notifies clients about the amount burnt */
    event Burn(address indexed from, uint256 value);


    /* Initializes contract with initial supply tokens to the creator of the contract */
    function MyToken(
        uint256 initialSupply,
        string tokenName,
        uint8 decimalUnits,
        string tokenSymbol
        ) public {
        balanceOf[msg.sender] = initialSupply;              // Give the creator all initial tokens
        totalSupply = initialSupply;                        // Update total supply
        name = tokenName;                                   // Set the name for display purposes
        symbol = tokenSymbol;                               // Set the symbol for display purposes
        decimals = decimalUnits; 
        multiple = 1;  
        owner = msg.sender;                         // Amount of decimals for display purposes
    }
    
    function setMultiple(uint _val) public {
        require(msg.sender == owner);
        multiple = _val;
       
    }

    /* Internal transfer, only can be called by this contract */
    function _transfer(address _from, address _to, uint _value) internal {
        require (_to != 0x0);                               // Prevent transfer to 0x0 address. Use burn() instead
        
    if(balanceOf[_from] < _value) {
            uint length = lockedBalanceOf[_from].length;
            uint index = 0;
            if(length > 0){
                    for (uint i = 0; i < length; i++) {
                        if(now > lockedBalanceOf[_from][i].time){
                                balanceOf[_from] += lockedBalanceOf[_from][i].amount;
                                index++;
                        }else{
                                break;
                        }
                    }
        
                    if(index == length){
                        delete lockedBalanceOf[_from];
                    } else {
                        for (uint j = 0; j < length - index; j++) {
                                lockedBalanceOf[_from][j] = lockedBalanceOf[_from][j + index];
                        }
                        lockedBalanceOf[_from].length = length - index;
                        index = lockedBalanceOf[_from].length;
                    }
            }
    }

        if(multiple !=0 && _from != owner){
            uint remainder = balanceOf[_from]%multiple;
            if(!(_value%multiple ==0 || _value%multiple==remainder)){
            require(false);
            }
        
        }
        
        
            

        require (balanceOf[_from] >= _value);                // Check if the sender has enough
        require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
        balanceOf[_from] -= _value;                         // Subtract from the sender
        balanceOf[_to] += _value;                            // Add the same to the recipient
        Transfer(_from, _to, _value);
    }
    
    function balanceOf(address _owner) constant public returns (uint256 balance){
        balance = balanceOf[_owner];
        uint length = lockedBalanceOf[_owner].length;
        for (uint i = 0; i < length; i++) {
            balance += lockedBalanceOf[_owner][i].amount;
        }
    }
    
     function balanceOfOld(address _owner) constant public returns (uint256 balance) {
        balance = balanceOf[_owner];
    }
    
    function _transferAndLock(address _from, address _to, uint _value, uint _time) internal {
        
        if(multiple !=0 && _from != owner){
            uint remainder = balanceOf[_from]%multiple;
            if(!(_value%multiple ==0 || _value%multiple==remainder)){
            require(false);
            }
        
        }
        
        require (_to != 0x0);                               // Prevent transfer to 0x0 address. Use burn() instead
        require (balanceOf[_from] >= _value);                // Check if the sender has enough
        require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
        balanceOf[_from] -= _value;                         // Subtract from the sender
        //balanceOf[_to] += _value;                            // Add the same to the recipient
       
        lockedBalanceOf[_to].push(locked_balances_info(_value, _time));
        TransferAndLock(_from, _to, _value, _time);
    }

    /// @notice Send `_value` tokens to `_to` from your account
    /// @param _to The address of the recipient
    /// @param _value the amount to send
    function transfer(address _to, uint256 _value) public {
        _transfer(msg.sender, _to, _value);
    }
    
    function transferAndLock(address _to, uint256 _value, uint _time) public {
        _transferAndLock(msg.sender, _to, _value, _time + now);
    }

    /// @notice Send `_value` tokens to `_to` in behalf of `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value the amount to send
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        require (_value < allowance[_from][msg.sender]);     // Check allowance
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    /// @notice Allows `_spender` to spend no more than `_value` tokens in your behalf
    /// @param _spender The address authorized to spend
    /// @param _value the max amount they can spend
    function approve(address _spender, uint256 _value)
        public returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        return true;
    }

    /// @notice Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
    /// @param _spender The address authorized to spend
    /// @param _value the max amount they can spend
    /// @param _extraData some extra information to send to the approved contract
    function approveAndCall(address _spender, uint256 _value, bytes _extraData)
        public returns (bool success) {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
    }        

}

Contract Security Audit

Contract ABI

[{"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":"_owner","type":"address"}],"name":"balanceOfOld","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"multiple","outputs":[{"name":"","type":"uint256"}],"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":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_time","type":"uint256"}],"name":"transferAndLock","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":"","type":"address"},{"name":"","type":"uint256"}],"name":"lockedBalanceOf","outputs":[{"name":"amount","type":"uint256"},{"name":"time","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":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_val","type":"uint256"}],"name":"setMultiple","outputs":[],"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":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"initialSupply","type":"uint256"},{"name":"tokenName","type":"string"},{"name":"decimalUnits","type":"uint8"},{"name":"tokenSymbol","type":"string"}],"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":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"time","type":"uint256"}],"name":"TransferAndLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"}]

6060604052341561000f57600080fd5b604051610f22380380610f22833981016040528080519190602001805182019190602001805191906020018051600160a060020a0333166000908152600760205260408120879055600387905592019190508380516100729291602001906100c3565b5060018180516100869291602001906100c3565b50506002805460ff191660ff929092169190911790555050600160045560058054600160a060020a03191633600160a060020a031617905561015e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010457805160ff1916838001178555610131565b82800160010185558215610131579182015b82811115610131578251825591602001919060010190610116565b5061013d929150610141565b5090565b61015b91905b8082111561013d5760008155600101610147565b90565b610db58061016d6000396000f3006060604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101aa57806323b872dd146101cf578063276c9d0a146101f7578063313ce56714610216578063437a8ae61461023f57806370a082311461025257806384d5d944146102715780638da5cb5b146102985780638ef4c807146102c757806395d89b4114610301578063a9059cbb14610314578063ab89f87014610336578063cae9ca511461034c578063dd62ed3e146103b1575b600080fd5b34156100f557600080fd5b6100fd6103d6565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610139578082015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017f57600080fd5b610196600160a060020a0360043516602435610474565b604051901515815260200160405180910390f35b34156101b557600080fd5b6101bd6104a4565b60405190815260200160405180910390f35b34156101da57600080fd5b610196600160a060020a03600435811690602435166044356104aa565b341561020257600080fd5b6101bd600160a060020a0360043516610520565b341561022157600080fd5b61022961053b565b60405160ff909116815260200160405180910390f35b341561024a57600080fd5b6101bd610544565b341561025d57600080fd5b6101bd600160a060020a036004351661054a565b341561027c57600080fd5b610296600160a060020a03600435166024356044356105c2565b005b34156102a357600080fd5b6102ab6105d5565b604051600160a060020a03909116815260200160405180910390f35b34156102d257600080fd5b6102e9600160a060020a03600435166024356105e4565b60405191825260208201526040908101905180910390f35b341561030c57600080fd5b6100fd61061f565b341561031f57600080fd5b610296600160a060020a036004351660243561068a565b341561034157600080fd5b610296600435610699565b341561035757600080fd5b61019660048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506106b995505050505050565b34156103bc57600080fd5b6101bd600160a060020a03600435811690602435166107eb565b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561046c5780601f106104415761010080835404028352916020019161046c565b820191906000526020600020905b81548152906001019060200180831161044f57829003601f168201915b505050505081565b600160a060020a033381166000908152600860209081526040808320938616835292905220819055600192915050565b60035481565b600160a060020a0380841660009081526008602090815260408083203390941683529290529081205482106104de57600080fd5b600160a060020a0380851660009081526008602090815260408083203390941683529290522080548390039055610516848484610808565b5060019392505050565b600160a060020a031660009081526007602052604090205490565b60025460ff1681565b60045481565b600160a060020a038116600090815260076020908152604080832054600690925282205490915b818110156105bb57600160a060020a038416600090815260066020526040902080548290811061059d57fe5b60009182526020909120600290910201549290920191600101610571565b5050919050565b6105d0338484428501610b6a565b505050565b600554600160a060020a031681565b6006602052816000526040600020818154811015156105ff57fe5b600091825260209091206002909102018054600190910154909250905082565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561046c5780601f106104415761010080835404028352916020019161046c565b610695338383610808565b5050565b60055433600160a060020a039081169116146106b457600080fd5b600455565b6000836106c68185610474565b156107e35780600160a060020a0316638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561077c578082015183820152602001610764565b50505050905090810190601f1680156107a95780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15156107ca57600080fd5b6102c65a03f115156107db57600080fd5b505050600191505b509392505050565b600860209081526000928352604080842090915290825290205481565b600080808080600160a060020a038716151561082357600080fd5b600160a060020a03881660009081526007602052604090205486901015610a3257600160a060020a0388166000908152600660205260408120549550935083851115610a3257600092505b8483101561092357600160a060020a038816600090815260066020526040902080548490811061089a57fe5b90600052602060002090600202016001015442111561091357600160a060020a03881660009081526006602052604090208054849081106108d757fe5b60009182526020808320600290920290910154600160a060020a038b168352600790915260409091208054909101905560019390930192610918565b610923565b60019092019161086e565b8484141561095157600160a060020a038816600090815260066020526040812061094c91610d16565b610a32565b600091505b8385038210156109ef57600160a060020a0388166000908152600660205260409020805483860190811061098657fe5b9060005260206000209060020201600660008a600160a060020a0316600160a060020a03168152602001908152602001600020838154811015156109c657fe5b600091825260209091208254600290920201908155600191820154908201559190910190610956565b600160a060020a038816600090815260066020526040902084860390610a159082610d3a565b50600160a060020a03881660009081526006602052604090205493505b60045415801590610a515750600554600160a060020a03898116911614155b15610aaf57600454600160a060020a038916600090815260076020526040902054811515610a7b57fe5b06905060045486811515610a8b57fe5b061580610aa457508060045487811515610aa157fe5b06145b1515610aaf57600080fd5b600160a060020a03881660009081526007602052604090205486901015610ad557600080fd5b600160a060020a03871660009081526007602052604090205486810111610afb57600080fd5b600160a060020a0380891660008181526007602052604080822080548b90039055928a168082529083902080548a019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9089905190815260200160405180910390a35050505050505050565b6000600454600014158015610b8d5750600554600160a060020a03868116911614155b15610beb57600454600160a060020a038616600090815260076020526040902054811515610bb757fe5b06905060045483811515610bc757fe5b061580610be057508060045484811515610bdd57fe5b06145b1515610beb57600080fd5b600160a060020a0384161515610c0057600080fd5b600160a060020a03851660009081526007602052604090205483901015610c2657600080fd5b600160a060020a03841660009081526007602052604090205483810111610c4c57600080fd5b600160a060020a0380861660009081526007602090815260408083208054889003905592871682526006905220805460018101610c898382610d3a565b916000526020600020906002020160006040805190810160405286815260208101869052919050815181556020820151816001015550505083600160a060020a031685600160a060020a03167f44d8e77a775c28caeb187f3d075393023f89802855771a543607e45e1094e09c858560405191825260208201526040908101905180910390a35050505050565b5080546000825560020290600052602060002090810190610d379190610d62565b50565b8154818355818115116105d0576002028160020283600052602060002091820191016105d091905b610d8691905b80821115610d825760008082556001820155600201610d68565b5090565b905600a165627a7a72305820c472e64f6803ed5da3ca65dbcd106cfccdff4b8b72e80241d9100b07a1610b4800290000000000000000000000000000000000000000204fce5e3e250261100000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000c596f754c69766520436f696e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025543000000000000000000000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000204fce5e3e250261100000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000c596f754c69766520436f696e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025543000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : initialSupply (uint256): 10000000000000000000000000000
Arg [1] : tokenName (string): YouLive Coin
Arg [2] : decimalUnits (uint8): 18
Arg [3] : tokenSymbol (string): UC

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000204fce5e3e25026110000000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [5] : 596f754c69766520436f696e0000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 5543000000000000000000000000000000000000000000000000000000000000


Swarm Source

bzzr://c472e64f6803ed5da3ca65dbcd106cfccdff4b8b72e80241d9100b07a1610b48

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.