Blockwell

Fantom Token

ERC20

This contract is an ERC20 token.

Name Fantom Token
Symbol FTM
Decimals 18
Total Supply 2,132,239,133 FTM

About

Stats

Public Functions 36
Event Types 13
Code Size 20,626 bytes

AdminChange Event

Parameters help
_admin
address help
_status
bool help

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint help

IcoDateUpdated Event

Parameters help
id
uint help
unixts
uint help

OwnershipTransferProposed Event

Parameters help
_from
address help
_to
address help

OwnershipTransferred Event

Parameters help
_from
address help
_to
address help

RegisterContribution Event

Parameters help
account
address help
tokensIssued
uint help
ethContributed
uint help
ethReturned
uint help

RegisteredLockedTokens Event

Parameters help
account
address help
idx
uint help
tokens
uint help
term
uint help

TokenExchangeRequested Event

Parameters help
account
address help
tokens
uint help

TokensMinted Event

Parameters help
mintType
uint help
account
address help
tokens
uint help
term
uint help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint help

UpdatedTokensPerEth Event

Parameters help
tokensPerEth
uint help

WalletUpdated Event

Parameters help
newWallet
address help

Whitelisted Event

Parameters help
account
address help
countWhitelisted
uint 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 != address(0x0));
        emit OwnershipTransferProposed(owner, _newOwner);
        newOwner = _newOwner;
    }

acceptOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

addAdmin keyboard_arrow_up

Parameters help

Name Type
_a
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function addAdmin(address _a) public onlyOwner {
        require(isAdmin[_a] == false);
        isAdmin[_a] = true;
        emit AdminChange(_a, true);
    }

removeAdmin keyboard_arrow_up

Parameters help

Name Type
_a
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function removeAdmin(address _a) public onlyOwner {
        require(isAdmin[_a] == true);
        isAdmin[_a] = false;
        emit AdminChange(_a, false);
    }

setDateMainStart keyboard_arrow_up

Parameters help

Name Type
_unixts
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function setDateMainStart(uint _unixts) public onlyOwner checkDateOrder {
        require(now < _unixts && now < dateMainStart);
        dateMainStart = _unixts;
        emit IcoDateUpdated(1, _unixts);
    }

setDateMainEnd keyboard_arrow_up

Parameters help

Name Type
_unixts
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function setDateMainEnd(uint _unixts) public onlyOwner checkDateOrder {
        require(now < _unixts && now < dateMainEnd);
        dateMainEnd = _unixts;
        emit IcoDateUpdated(2, _unixts);
    }

isMainFirstDay keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function isMainFirstDay() public view returns (bool) {
        if (now > dateMainStart && now <= dateMainStart + 1 days) return true;
        return false;
    }

isMain keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function isMain() public view returns (bool) {
        if (now > dateMainStart && now < dateMainEnd) return true;
        return false;
    }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

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

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transfer(address _to, uint _amount) public returns (bool success) {
        require(tokensTradeable);
        require(_amount <= unlockedTokensInternal(msg.sender));
        return super.transfer(_to, _amount);
    }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferFrom(address _from, address _to, uint _amount) public returns (bool success) {
        require(tokensTradeable);
        require(_amount <= unlockedTokensInternal(_from));
        return super.transferFrom(_from, _to, _amount);
    }

approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function approve(address _spender, uint _amount) public returns (bool) {
        allowed[msg.sender][_spender] = _amount;
        emit Approval(msg.sender, _spender, _amount);
        return true;
    }

allowance keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

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

lockedTokens keyboard_arrow_up

Parameters help

Name Type
_account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function lockedTokens(address _account) public view returns (uint) {
        if (!mayHaveLockedTokens[_account]) return 0;
        return pNumberOfLockedTokens(_account);
    }

unlockedTokens keyboard_arrow_up

Parameters help

Name Type
_account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function unlockedTokens(address _account) public view returns (uint) {
        return balances[_account].sub(lockedTokens(_account));
    }

isAvailableLockSlot keyboard_arrow_up

Parameters help

Name Type
_account
address help
_term
uint help

Properties

Visibility help public
Mutability help view
Source Code
    function isAvailableLockSlot(address _account, uint _term) public view returns (bool) {
        if (!mayHaveLockedTokens[_account]) return true;
        if (_term < now) return true;
        uint[LOCK_SLOTS] storage term = lockTerm[_account];
        for (uint i; i < LOCK_SLOTS; i++) {
            if (term[i] < now || term[i] == _term) return true;
        }
        return false;
    }

setWallet keyboard_arrow_up

Parameters help

Name Type
_wallet
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function setWallet(address _wallet) public onlyOwner {
        require(_wallet != address(0x0));
        wallet = _wallet;
        emit WalletUpdated(_wallet);
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
    function () public payable {
        buyTokens();
    }

availableToMint keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function availableToMint() public view returns (uint) {
        return MAX_TOTAL_TOKEN_SUPPLY.sub(TOKEN_MAIN_CAP).sub(tokensMinted);
    }

firstDayTokenLimit keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function firstDayTokenLimit() public view returns (uint) {
        return ethToTokens(MAXIMUM_FIRST_DAY_CONTRIBUTION);
    }

ethToTokens keyboard_arrow_up

Parameters help

Name Type
_eth
uint help

Properties

Visibility help public
Mutability help view
Source Code
    function ethToTokens(uint _eth) public view returns (uint tokens) {
        tokens = _eth.mul(tokensPerEth);
    }

tokensToEth keyboard_arrow_up

Parameters help

Name Type
_tokens
uint help

Properties

Visibility help public
Mutability help view
Source Code
    function tokensToEth(uint _tokens) public view returns (uint eth) {
        eth = _tokens / tokensPerEth;
    }

addToWhitelist keyboard_arrow_up

Parameters help

Name Type
_account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAdmin checks for the following:
Source Code
    function addToWhitelist(address _account) public onlyAdmin {
        pWhitelist(_account);
    }

addToWhitelistMultiple keyboard_arrow_up

Parameters help

Name Type
_addresses
address[] help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAdmin checks for the following:
Source Code
    function addToWhitelistMultiple(address[] _addresses) public onlyAdmin {
        for (uint i; i < _addresses.length; i++) {
            pWhitelist(_addresses[i]);
        }
    }

updateTokensPerEth keyboard_arrow_up

Parameters help

Name Type
_tokens_per_eth
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateTokensPerEth(uint _tokens_per_eth) public onlyOwner {
        require(now < dateMainStart);
        tokensPerEth = _tokens_per_eth;
        emit UpdatedTokensPerEth(tokensPerEth);
    }

makeTradeable keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function makeTradeable() public {
        require(msg.sender == owner || now > dateMainEnd + 20 weeks);
        tokensTradeable = true;
    }

openMigrationPhase keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function openMigrationPhase() public onlyOwner {
        require(now > dateMainEnd);
        isMigrationPhaseOpen = true;
    }

mintTokens keyboard_arrow_up

Parameters help

Name Type
_mint_type
uint help
_account
address help
_tokens
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function mintTokens(uint _mint_type, address _account, uint _tokens) public onlyOwner {
        pMintTokens(_mint_type, _account, _tokens, 0);
    }

mintTokensMultiple keyboard_arrow_up

Parameters help

Name Type
_mint_type
uint help
_accounts
address[] help
_tokens
uint[] help

Properties

Visibility help public
Mutability help transaction
Source Code
    function mintTokensMultiple(uint _mint_type, address[] _accounts, uint[] _tokens) public onlyOwner {
        require(_accounts.length == _tokens.length);
        for (uint i; i < _accounts.length; i++) {
            pMintTokens(_mint_type, _accounts[i], _tokens[i], 0);
        }
    }

mintTokensLocked keyboard_arrow_up

Parameters help

Name Type
_mint_type
uint help
_account
address help
_tokens
uint help
_term
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function mintTokensLocked(uint _mint_type, address _account, uint _tokens, uint _term) public onlyOwner {
        pMintTokens(_mint_type, _account, _tokens, _term);
    }

mintTokensLockedMultiple keyboard_arrow_up

Parameters help

Name Type
_mint_type
uint help
_accounts
address[] help
_tokens
uint[] help
_terms
uint[] help

Properties

Visibility help public
Mutability help transaction
Source Code
    function mintTokensLockedMultiple(uint _mint_type, address[] _accounts, uint[] _tokens, uint[] _terms) public onlyOwner {
        require(_accounts.length == _tokens.length);
        require(_accounts.length == _terms.length);
        for (uint i; i < _accounts.length; i++) {
            pMintTokens(_mint_type, _accounts[i], _tokens[i], _terms[i]);
        }
    }

requestTokenExchangeMax keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function requestTokenExchangeMax() public {
        requestTokenExchange(unlockedTokensInternal(msg.sender));
    }

requestTokenExchange keyboard_arrow_up

Parameters help

Name Type
_tokens
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function requestTokenExchange(uint _tokens) public {
        require(isMigrationPhaseOpen);
        require(_tokens > 0 && _tokens <= unlockedTokensInternal(msg.sender));
        balances[msg.sender] = balances[msg.sender].sub(_tokens);
        tokensIssuedTotal = tokensIssuedTotal.sub(_tokens);
        emit Transfer(msg.sender, 0x0, _tokens);
        emit TokenExchangeRequested(msg.sender, _tokens);
    }

transferAnyERC20Token keyboard_arrow_up

Parameters help

Name Type
_token_address
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferAnyERC20Token(address _token_address, uint _amount) public onlyOwner returns (bool success) {
        return ERC20Interface(_token_address).transfer(owner, _amount);
    }

transferMultiple keyboard_arrow_up

Parameters help

Name Type
_addresses
address[] help
_amounts
uint[] help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferMultiple(address[] _addresses, uint[] _amounts) external {
        require(_addresses.length <= 100);
        require(_addresses.length == _amounts.length);

        // do the transfers
        for (uint j; j < _addresses.length; j++) {
            transfer(_addresses[j], _amounts[j]);
        }

    }