Blockwell

CUBE

ERC20

This contract is an ERC20 token.

Name CUBE
Symbol AUTO
Decimals 18
Total Supply 7,200,000,000 AUTO

About link description

Cube Intelligence describes itself as a technology company that creates future transportation solutions. In line with the vision of Smart Cities, Cube Intelligence aims to develop mobility data services (CUBE Mobility), P2P vehicle sharing platforms (CUBE CAR), and self-driving valet parking solutions (CUBE AI). - CUBE Mobility uses blockchain technology to collect and analyze mobility data and provide incentives for eco-friendly traffic patterns. It has the control tower role of data transactions between users. Traffic data is connected to distributed storage devices, data access user identification, CUBE token for data delivery, and P2P (Person to Person) transactions. - CUBE CAR provides a P2P vehicle sharing a platform that aims to make it easier and more convenient for users to use, share and communicate with each other through mutual assessment of the owners and users of shared vehicles. It intends to offer a shared transportation platform. On May 15, 2019, Cube Car launched a ride-hailing service called 'Papa' in Korea. - CUBE AI is developing an autonomous valet parking (AVP) technology. Apart from sensors, CUBE AI also uses cameras to recognize objects. The Vehicle to Infrastructure (V2I) navigation feature is intended for future use in general vehicles, with a view towards reducing the time and stress that drivers experience when trying to park in underground parking lots.

Stats

Public Functions 49
Event Types 14
Code Size 24,578 bytes

Library Use

Uses SafeMath for uint256.

Burn Event

Parameters help
from
address help
value
uint256 help

ChangeConversionRate Event

Parameters help
from
uint256 help
to
uint256 help

ChangeFreezeTime Event

Parameters help
from
uint256 help
to
uint256 help

ChangeTokenName Event

Parameters help
who
address help

ChangeTokenSymbol Event

Parameters help
who
address help

ChangeTokenWalletAddress Event

Parameters help
from
address help
to
address help

ChangeTotalSupply Event

Parameters help
from
uint256 help
to
uint256 help

Freeze Event

Parameters help
_who
address help
_date
uint256 help

Melt Event

Parameters help
_who
address help

Mint Event

Parameters help
to
address help
value
uint256 help

Payable Event

Parameters help
who
address help
eth_amount
uint256 help

ProposalAdd Event

Parameters help
vote_id
uint help
generator
address help
descript
string help

ProposalEnd Event

Parameters help
vote_id
uint help
descript
string help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function transferOwnership(address newOwner) public onlyOwner {
        require(newOwner != 0x0);
        owner = newOwner;
    }

balanceOf keyboard_arrow_up

Parameters help

Name Type
token_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
    function balanceOf(address token_owner) public constant returns (uint balance) {
        return balance_of[token_owner];
    }

allowance keyboard_arrow_up

Parameters help

Name Type
_hoarder
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
    function allowance(
        address _hoarder,
        address _spender
    ) public constant returns (uint256) {
        return allowances[_hoarder][_spender];
    }

superApprove keyboard_arrow_up

Parameters help

Name Type
_hoarder
address help
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function superApprove(
        address _hoarder,
        address _spender,
        uint256 _value
    ) onlyOwner public returns(bool) {
        require(_hoarder != address(0));
        require(_spender != address(0));
        require(_value >= 0);
        allowances[_hoarder][_spender] = _value;
        return true;
    }

approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function approve(address _spender, uint256 _value) public returns (bool) {
        require(msg.sender != address(0));
        require(_spender != address(0));
        require(_value >= 0);
        allowances[msg.sender][_spender] = _value;
        return true;
    }

getAddressLength keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function getAddressLength() onlyOwner public constant returns (uint) {
        return address_list.length;
    }

getAddressIndex keyboard_arrow_up

Parameters help

Name Type
_address_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
    function getAddressIndex(uint _address_index) onlyOwner public constant returns (address _address) {
        _address = address_list[_address_index];
    }

getAllAddress keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function getAllAddress() onlyOwner public constant returns (address[]) {
        return address_list;
    }

getAddressExist keyboard_arrow_up

Parameters help

Name Type
_target
address help

Properties

Visibility help public
Mutability help constant
Source Code
    function getAddressExist(address _target) public constant returns (bool) {
        if (_target == address(0)) {
            return false;
        } else {
            return address_exist[_target];
        }
    }

mintToken keyboard_arrow_up

Parameters help

Name Type
to
address help
token_amount
uint256 help
freeze_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function mintToken(
        address to,
        uint256 token_amount,
        uint256 freeze_timestamp
    ) onlyOwner public returns (bool) {
        require(token_amount > 0);
        require(balance_of[token_wallet_address] >= token_amount);
        require(balance_of[to] + token_amount > balance_of[to]);
        uint256 token_plus_bonus = 0;
        uint sale_number = 0;

        var(sale_info, isSale) = nowSaleInfo();
        if (isSale) {
            sale_number = sale_info.sale_number;
            uint8 bonus_rate = sale_info.bonus_rate;
            token_plus_bonus = addBonus(token_amount, bonus_rate);
            require(checkSaleCanSell(sale_number, token_plus_bonus) == true);
            addSaleSold(sale_number, token_plus_bonus);
        } else if (open_free) {
            token_plus_bonus = token_amount;
        } else {
            require(open_free == true);
        }

        balance_of[token_wallet_address] -= token_plus_bonus;
        balance_of[to] += token_plus_bonus;

        uint256 _freeze = 0;
        if (freeze_timestamp >= 0) {
            _freeze = freeze_timestamp;
        }

        freezeTo(to, now + _freeze); // FreezeToken.sol
        Transfer(0x0, to, token_plus_bonus);
        addAddress(to);
        return true;
    }

superMint keyboard_arrow_up

Parameters help

Name Type
to
address help
token_amount
uint256 help
freeze_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function superMint(
        address to,
        uint256 token_amount,
        uint256 freeze_timestamp
    ) onlyOwner public returns(bool) {
        require(token_amount > 0);
        require(balance_of[token_wallet_address] >= token_amount);
        require(balance_of[to] + token_amount > balance_of[to]);

        balance_of[token_wallet_address] -= token_amount;
        balance_of[to] += token_amount;

        uint256 _freeze = 0;
        if (freeze_timestamp >= 0) {
            _freeze = freeze_timestamp;
        }

        freezeTo(to, now + _freeze);
        Transfer(0x0, to, token_amount);
        Mint(to, token_amount);
        addAddress(to);
        return true;
    }

transfer keyboard_arrow_up

Parameters help

Name Type
to
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function transfer(address to, uint256 value) public {
        _transfer(msg.sender, to, value);
    }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function transferFrom(
        address _from,
        address _to,
        uint256 _amount
    ) public {
        require(msg.sender != address(0));
        require(_from != address(0));
        require(_amount <= allowances[_from][msg.sender]);
        _transfer(_from, _to, _amount);
        allowances[_from][msg.sender] -= _amount;
    }

transferOpen keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferOpen() onlyOwner public {
        transfer_close = false;
    }

transferClose keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferClose() onlyOwner public {
        transfer_close = true;
    }

getProposalLength keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function getProposalLength() public constant returns (uint) {
        return Proposals.length;
    }

getProposalIndex keyboard_arrow_up

Parameters help

Name Type
_proposal_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
    function getProposalIndex(uint _proposal_index) public constant returns (
        address generator,
        string descript,
        uint256 start_timestamp,
        uint256 end_timestamp,
        bool executed,
        uint256 voting_count,
        uint256 total_weight,
        uint256 voting_cut,
        uint256 threshold
    ) {
        generator = Proposals[_proposal_index].generator;
        descript = Proposals[_proposal_index].descript;
        start_timestamp = Proposals[_proposal_index].start_timestamp;
        end_timestamp = Proposals[_proposal_index].end_timestamp;
        executed = Proposals[_proposal_index].executed;
        voting_count = Proposals[_proposal_index].voting_count;
        total_weight = Proposals[_proposal_index].total_weight;
        voting_cut = Proposals[_proposal_index].voting_cut;
        threshold = Proposals[_proposal_index].threshold;
    }

getProposalVoterList keyboard_arrow_up

Parameters help

Name Type
_proposal_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
    function getProposalVoterList(uint _proposal_index) public constant returns (address[]) {
        return Proposals[_proposal_index].voter_address;
    }

newVote keyboard_arrow_up

Parameters help

Name Type
who
address help
descript
string help
start_timestamp
uint256 help
end_timestamp
uint256 help
voting_cut
uint256 help
threshold
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function newVote(
        address who,
        string descript,
        uint256 start_timestamp,
        uint256 end_timestamp,
        uint256 voting_cut,
        uint256 threshold
    ) onlyOwner public returns (uint256) {
        if (Proposals.length >= 1) {
            require(Proposals[vote_id].end_timestamp < start_timestamp);
            require(Proposals[vote_id].executed == true);
        }

        vote_id = Proposals.length;
        Proposal storage p = Proposals[Proposals.length++];
        p.generator = who;
        p.descript = descript;
        p.start_timestamp = start_timestamp;
        p.end_timestamp = end_timestamp;
        p.executed = false;
        p.voting_cut = voting_cut;
        p.threshold = threshold;

        p.voting_count = 0;
        delete p.voter_address;
        ProposalAdd(vote_id, who, descript);
        return vote_id;
    }

voteClose keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function voteClose() onlyOwner public {
        if (Proposals.length >= 1) {
            Proposals[vote_id].executed = true;
            ProposalEnd(vote_id, Proposals[vote_id].descript);
        }
    }

checkVote keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function checkVote() onlyOwner public {
        if ((Proposals.length >= 1) &&
            (Proposals[vote_id].end_timestamp < now)) {
            voteClose();
        }
    }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function totalSupply() public constant returns (uint) {
        return total_supply;
    }

changeTokenName keyboard_arrow_up

Parameters help

Name Type
newName
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeTokenName(string newName) onlyOwner public {
        name = newName;
        ChangeTokenName(msg.sender);
    }

changeTokenSymbol keyboard_arrow_up

Parameters help

Name Type
newSymbol
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeTokenSymbol(string newSymbol) onlyOwner public {
        symbol = newSymbol;
        ChangeTokenSymbol(msg.sender);
    }

changeConversionRate keyboard_arrow_up

Parameters help

Name Type
_conversion_rate
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function changeConversionRate(uint256 _conversion_rate) onlyOwner public {
        require(_conversion_rate > 0);
        uint256 pre_conversion_rate = conversion_rate;
        conversion_rate = _conversion_rate;
        ChangeConversionRate(pre_conversion_rate, conversion_rate);
    }

checkFreeze keyboard_arrow_up

Parameters help

Name Type
_sender
address help

Properties

Visibility help public
Mutability help constant
Source Code
    function checkFreeze(address _sender) public constant returns (bool) {
        if (now >= freezeDateOf[_sender]) {
            return false;
        } else {
            return true;
        }
    }

getSaleLength keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function getSaleLength() public constant returns(uint) {
        return sale_list.length;
    }

getSaleInfo keyboard_arrow_up

Parameters help

Name Type
_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
    function getSaleInfo(uint _index) public constant returns(
        uint sale_number,
        uint256 start_timestamp,
        uint256 end_timestamp,
        uint8 bonus_rate,
        uint256 sell_limit
    ) {
        sale_number = sale_list[_index].sale_number;
        start_timestamp = sale_list[_index].start_timestamp;
        end_timestamp = sale_list[_index].end_timestamp;
        bonus_rate = sale_list[_index].bonus_rate;
        sell_limit = sale_list[_index].sell_limit;
    }

getSaleSold keyboard_arrow_up

Parameters help

Name Type
_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
    function getSaleSold(uint _index) public constant returns(uint256) {
        return sale_sold[_index];
    }

newSale keyboard_arrow_up

Parameters help

Name Type
start_timestamp
uint256 help
end_timestamp
uint256 help
bonus_rate
uint8 help
sell_token_limit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function newSale(
        uint256 start_timestamp,
        uint256 end_timestamp,
        uint8 bonus_rate,
        uint256 sell_token_limit
    ) onlyOwner public {
        require(start_timestamp > 0);
        require(end_timestamp > 0);
        require(sell_token_limit > 0);

        uint256 sale_number = sale_list.length;
        for (uint i=0; i < sale_list.length; i++) {
            require(sale_list[i].end_timestamp < start_timestamp);
        }

        sale_list[sale_list.length++] = Sale({
            sale_number: sale_number,
            start_timestamp: start_timestamp,
            end_timestamp: end_timestamp,
            bonus_rate: bonus_rate,
            sell_limit: sell_token_limit
        });
        sale_sold[sale_sold.length++] = 0;
    }

changeSaleInfo keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
start_timestamp
uint256 help
end_timestamp
uint256 help
bonus_rate
uint8 help
sell_token_limit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeSaleInfo(
        uint256 _index,
        uint256 start_timestamp,
        uint256 end_timestamp,
        uint8 bonus_rate,
        uint256 sell_token_limit
    ) onlyOwner public returns(bool) {
        require(_index < sale_list.length);
        require(start_timestamp > 0);
        require(end_timestamp > 0);
        require(sell_token_limit > 0);

        sale_list[_index].start_timestamp = start_timestamp;
        sale_list[_index].end_timestamp = end_timestamp;
        sale_list[_index].bonus_rate = bonus_rate;
        sale_list[_index].sell_limit = sell_token_limit;
        return true;
    }

changeSaleStart keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
start_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeSaleStart(
        uint256 _index,
        uint256 start_timestamp
    ) onlyOwner public returns(bool) {
        require(_index < sale_list.length);
        require(start_timestamp > 0);
        sale_list[_index].start_timestamp = start_timestamp;
        return true;
    }

changeSaleEnd keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
end_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeSaleEnd(
        uint256 _index,
        uint256 end_timestamp
    ) onlyOwner public returns(bool) {
        require(_index < sale_list.length);
        require(end_timestamp > 0);
        sale_list[_index].end_timestamp = end_timestamp;
        return true;
    }

changeSaleBonusRate keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
bonus_rate
uint8 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeSaleBonusRate(
        uint256 _index,
        uint8 bonus_rate
    ) onlyOwner public returns(bool) {
        require(_index < sale_list.length);
        sale_list[_index].bonus_rate = bonus_rate;
        return true;
    }

changeSaleTokenLimit keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
sell_token_limit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeSaleTokenLimit(
        uint256 _index,
        uint256 sell_token_limit
    ) onlyOwner public returns(bool) {
        require(_index < sale_list.length);
        require(sell_token_limit > 0);
        sale_list[_index].sell_limit = sell_token_limit;
        return true;
    }

canSaleInfo keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
    function canSaleInfo() public view returns(
        uint sale_number,
        uint256 start_timestamp,
        uint256 end_timestamp,
        uint8 bonus_rate,
        uint256 sell_limit
    ) {
        var(sale_info, isSale) = nowSaleInfo();
        require(isSale == true);
        sale_number = sale_info.sale_number;
        start_timestamp = sale_info.start_timestamp;
        end_timestamp = sale_info.end_timestamp;
        bonus_rate = sale_info.bonus_rate;
        sell_limit = sale_info.sell_limit;
    }

mintTokenBulk keyboard_arrow_up

Parameters help

Name Type
_tos
address[] help
_amounts
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
    function mintTokenBulk(address[] _tos, uint256[] _amounts) onlyOwner public {
        require(_tos.length == _amounts.length);
        for (uint i=0; i < _tos.length; i++) {
            mintToken(_tos[i], _amounts[i], 0);
        }
    }

superMintBulk keyboard_arrow_up

Parameters help

Name Type
_tos
address[] help
_amounts
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
    function superMintBulk(address[] _tos, uint256[] _amounts) onlyOwner public {
        require(_tos.length == _amounts.length);
        for (uint i=0; i < _tos.length; i++) {
            superMint(_tos[i], _amounts[i], 0);
        }
    }

transferBulk keyboard_arrow_up

Parameters help

Name Type
tos
address[] help
values
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferBulk(address[] tos, uint256[] values) public {
        require(tos.length == values.length);
        for (uint i=0; i < tos.length; i++) {
            transfer(tos[i], values[i]);
        }
    }

burn keyboard_arrow_up

Parameters help

Name Type
_who
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function burn(address _who, uint256 _amount) onlyOwner public returns(bool) {
        require(_amount > 0);
        require(balanceOf(_who) >= _amount);
        balance_of[_who] -= _amount;
        total_supply -= _amount;
        Burn(_who, _amount);
        return true;
    }

additionalTotalSupply keyboard_arrow_up

Parameters help

Name Type
_addition
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function additionalTotalSupply(uint256 _addition) onlyOwner public returns(bool) {
        require(_addition > 0);
        uint256 change_total_supply = total_supply.add(_addition);
        balance_of[token_wallet_address] += _addition;
        changeTotalSupply(change_total_supply);
    }

tokenWalletChange keyboard_arrow_up

Parameters help

Name Type
newTokenWallet
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function tokenWalletChange(address newTokenWallet) onlyOwner public returns(bool) {
        require(newTokenWallet != address(0));
        uint256 token_wallet_amount = balance_of[token_wallet_address];
        balance_of[newTokenWallet] = token_wallet_amount;
        balance_of[token_wallet_address] = 0;
        changeTokenWallet(newTokenWallet);
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
    function () payable public {
        uint256 eth_amount = msg.value;
        msg.sender.transfer(eth_amount);
        Payable(msg.sender, eth_amount);
    }

tokenOpen keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function tokenOpen() onlyOwner public {
        open_free = true;
    }

tokenClose keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function tokenClose() onlyOwner public {
        open_free = false;
    }

freezeAddress keyboard_arrow_up

Parameters help

Name Type
_who
address help
_addTimestamp
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function freezeAddress(
        address _who,
        uint256 _addTimestamp
    ) onlyOwner public returns(bool) {
        freezeTo(_who, _addTimestamp);
        return true;
    }

meltAddress keyboard_arrow_up

Parameters help

Name Type
_who
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function meltAddress(
        address _who
    ) onlyOwner public returns(bool) {
        meltNow(_who);
        return true;
    }

voteAgree keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function voteAgree() public returns (bool) {
        address _voter = msg.sender;
        uint256 _balance = balanceOf(_voter);
        require(_balance > 0);
        return voting(_voter, _balance);
    }

superVoteAgree keyboard_arrow_up

Parameters help

Name Type
who
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function superVoteAgree(address who) onlyOwner public returns(bool) {
        require(who != address(0));
        uint256 _balance = balanceOf(who);
        require(_balance > 0);
        return voting(who, _balance);
    }