Blockwell

Crypto20

ERC20

This contract is an ERC20 token.

Name Crypto20
Symbol C20
Decimals 18
Total Supply 40,656,082 C20

About link description

CRYPTO20 (C20) is a cryptocurrency token and operates on the Ethereum platform. CRYPTO20 has a current supply of 40,656,081.98 with 40,355,202.559 in circulation. The last known price of CRYPTO20 is $0.708856 USD and is up 3.90% over the last 24 hours. It is currently trading on 4 active market(s) with $108.86 traded over the last 24 hours. More information can be found at https://crypto20.com/.

Stats

Public Functions 29
Event Types 10
Code Size 17,419 bytes

AddLiquidity Event

Parameters help
ethAmount
uint256 help

AllocatePresale Event

Parameters help
participant
address help
amountTokens
uint256 help

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Buy Event

Parameters help
participant
address help
beneficiary
address help
ethValue
uint256 help
amountTokens
uint256 help

PriceUpdate Event

Parameters help
numerator
uint256 help
denominator
uint256 help

RemoveLiquidity Event

Parameters help
ethAmount
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

Whitelist Event

Parameters help
participant
address help

Withdraw Event

Parameters help
participant
address help
amountTokens
uint256 help
etherAmount
uint256 help

WithdrawRequest Event

Parameters help
participant
address help
amountTokens
uint256 help

Price Event

Members
numerator
uint256 help
denominator
uint256 help

Withdrawal Event

Members
tokens
uint256 help
time
uint256 help

Functions Expand All Collapse All

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transfer(address _to, uint256 _value) isTradeable returns (bool success) {
        return super.transfer(_to, _value);
    }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function transferFrom(address _from, address _to, uint256 _value) isTradeable returns (bool success) {
        return super.transferFrom(_from, _to, _value);
    }

approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

One or more of the following:
Source Code
    function approve(address _spender, uint256 _value) onlyPayloadSize(2) returns (bool success) {
        require((_value == 0) || (allowed[msg.sender][_spender] == 0));
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);

        return true;
    }

allowance keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

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

changeApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_oldValue
uint256 help
_newValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
    function changeApproval(address _spender, uint256 _oldValue, uint256 _newValue) onlyPayloadSize(3) returns (bool success) {
        require(allowed[msg.sender][_spender] == _oldValue);
        allowed[msg.sender][_spender] = _newValue;
        Approval(msg.sender, _spender, _newValue);

        return true;
    }

setVestingContract keyboard_arrow_up

Parameters help

Name Type
vestingContractInput
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function setVestingContract(address vestingContractInput) external onlyFundWallet {
        require(vestingContractInput != address(0));
        vestingContract = vestingContractInput;
        whitelist[vestingContract] = true;
        vestingSet = true;
    }

updatePrice keyboard_arrow_up

Parameters help

Name Type
newNumerator
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function updatePrice(uint256 newNumerator) external onlyManagingWallets {
        require(newNumerator > 0);
        require_limited_change(newNumerator);
        // either controlWallet command is compliant or transaction came from fundWallet
        currentPrice.numerator = newNumerator;
        // maps time to new Price (if not during ICO)
        prices[previousUpdateTime] = currentPrice;
        previousUpdateTime = now;
        PriceUpdate(newNumerator, currentPrice.denominator);
    }

updatePriceDenominator keyboard_arrow_up

Parameters help

Name Type
newDenominator
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updatePriceDenominator(uint256 newDenominator) external onlyFundWallet {
        require(block.number > fundingEndBlock);
        require(newDenominator > 0);
        currentPrice.denominator = newDenominator;
        // maps time to new Price
        prices[previousUpdateTime] = currentPrice;
        previousUpdateTime = now;
        PriceUpdate(currentPrice.numerator, newDenominator);
    }

allocatePresaleTokens keyboard_arrow_up

Parameters help

Name Type
participant
address help
amountTokens
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function allocatePresaleTokens(address participant, uint amountTokens) external onlyFundWallet {
        require(block.number < fundingEndBlock);
        require(participant != address(0));
        whitelist[participant] = true; // automatically whitelist accepted presale
        allocateTokens(participant, amountTokens);
        Whitelist(participant);
        AllocatePresale(participant, amountTokens);
    }

verifyParticipant keyboard_arrow_up

Parameters help

Name Type
participant
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function verifyParticipant(address participant) external onlyManagingWallets {
        whitelist[participant] = true;
        Whitelist(participant);
    }

buy keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
    function buy() external payable {
        buyTo(msg.sender);
    }

buyTo keyboard_arrow_up

Parameters help

Name Type
participant
address help

Properties

Visibility help public
Mutability help payable

Modifiers help

onlyWhitelist checks for the following:

Requirements help

Source Code
    function buyTo(address participant) public payable onlyWhitelist {
        require(!halted);
        require(participant != address(0));
        require(msg.value >= minAmount);
        require(block.number >= fundingStartBlock && block.number < fundingEndBlock);
        uint256 icoDenominator = icoDenominatorPrice();
        uint256 tokensToBuy = safeMul(msg.value, currentPrice.numerator) / icoDenominator;
        allocateTokens(participant, tokensToBuy);
        // send ether to fundWallet
        fundWallet.transfer(msg.value);
        Buy(msg.sender, participant, msg.value, tokensToBuy);
    }

icoDenominatorPrice keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function icoDenominatorPrice() public constant returns (uint256) {
        uint256 icoDuration = safeSub(block.number, fundingStartBlock);
        uint256 denominator;
        if (icoDuration < 2880) { // #blocks = 24*60*60/30 = 2880
            return currentPrice.denominator;
        } else if (icoDuration < 80640 ) { // #blocks = 4*7*24*60*60/30 = 80640
            denominator = safeMul(currentPrice.denominator, 105) / 100;
            return denominator;
        } else {
            denominator = safeMul(currentPrice.denominator, 110) / 100;
            return denominator;
        }
    }

requestWithdrawal keyboard_arrow_up

Parameters help

Name Type
amountTokensToWithdraw
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function requestWithdrawal(uint256 amountTokensToWithdraw) external isTradeable onlyWhitelist {
        require(block.number > fundingEndBlock);
        require(amountTokensToWithdraw > 0);
        address participant = msg.sender;
        require(balanceOf(participant) >= amountTokensToWithdraw);
        require(withdrawals[participant].tokens == 0); // participant cannot have outstanding withdrawals
        balances[participant] = safeSub(balances[participant], amountTokensToWithdraw);
        withdrawals[participant] = Withdrawal({tokens: amountTokensToWithdraw, time: previousUpdateTime});
        WithdrawRequest(participant, amountTokensToWithdraw);
    }

withdraw keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function withdraw() external {
        address participant = msg.sender;
        uint256 tokens = withdrawals[participant].tokens;
        require(tokens > 0); // participant must have requested a withdrawal
        uint256 requestTime = withdrawals[participant].time;
        // obtain the next price that was set after the request
        Price price = prices[requestTime];
        require(price.numerator > 0); // price must have been set
        uint256 withdrawValue = safeMul(tokens, price.denominator) / price.numerator;
        // if contract ethbal > then send + transfer tokens to fundWallet, otherwise give tokens back
        withdrawals[participant].tokens = 0;
        if (this.balance >= withdrawValue)
            enact_withdrawal_greater_equal(participant, withdrawValue, tokens);
        else
            enact_withdrawal_less(participant, withdrawValue, tokens);
    }

checkWithdrawValue keyboard_arrow_up

Parameters help

Name Type
amountTokensToWithdraw
uint256 help

Properties

Visibility help public
Mutability help constant
Source Code
    function checkWithdrawValue(uint256 amountTokensToWithdraw) constant returns (uint256 etherValue) {
        require(amountTokensToWithdraw > 0);
        require(balanceOf(msg.sender) >= amountTokensToWithdraw);
        uint256 withdrawValue = safeMul(amountTokensToWithdraw, currentPrice.denominator) / currentPrice.numerator;
        require(this.balance >= withdrawValue);
        return withdrawValue;
    }

addLiquidity keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
    function addLiquidity() external onlyManagingWallets payable {
        require(msg.value > 0);
        AddLiquidity(msg.value);
    }

removeLiquidity keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function removeLiquidity(uint256 amount) external onlyManagingWallets {
        require(amount <= this.balance);
        fundWallet.transfer(amount);
        RemoveLiquidity(amount);
    }

changeFundWallet keyboard_arrow_up

Parameters help

Name Type
newFundWallet
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function changeFundWallet(address newFundWallet) external onlyFundWallet {
        require(newFundWallet != address(0));
        fundWallet = newFundWallet;
    }

changeControlWallet keyboard_arrow_up

Parameters help

Name Type
newControlWallet
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeControlWallet(address newControlWallet) external onlyFundWallet {
        require(newControlWallet != address(0));
        controlWallet = newControlWallet;
    }

changeWaitTime keyboard_arrow_up

Parameters help

Name Type
newWaitTime
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function changeWaitTime(uint256 newWaitTime) external onlyFundWallet {
        waitTime = newWaitTime;
    }

updateFundingStartBlock keyboard_arrow_up

Parameters help

Name Type
newFundingStartBlock
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateFundingStartBlock(uint256 newFundingStartBlock) external onlyFundWallet {
        require(block.number < fundingStartBlock);
        require(block.number < newFundingStartBlock);
        fundingStartBlock = newFundingStartBlock;
    }

updateFundingEndBlock keyboard_arrow_up

Parameters help

Name Type
newFundingEndBlock
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateFundingEndBlock(uint256 newFundingEndBlock) external onlyFundWallet {
        require(block.number < fundingEndBlock);
        require(block.number < newFundingEndBlock);
        fundingEndBlock = newFundingEndBlock;
    }

halt keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function halt() external onlyFundWallet {
        halted = true;
    }

unhalt keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function unhalt() external onlyFundWallet {
        halted = false;
    }

enableTrading keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function enableTrading() external onlyFundWallet {
        require(block.number > fundingEndBlock);
        tradeable = true;
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
    function() payable {
        require(tx.origin == msg.sender);
        buyTo(msg.sender);
    }

claimTokens keyboard_arrow_up

Parameters help

Name Type
_token
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function claimTokens(address _token) external onlyFundWallet {
        require(_token != address(0));
        Token token = Token(_token);
        uint256 balance = token.balanceOf(this);
        token.transfer(fundWallet, balance);
     }