veda-banner veda-banner
English
USD
Popular
Other
INLOCK
INLOCK
ICO
Lending Platform That Enables Cryptocurrency Holders
Category: Platform, Business services, Banking
Founded: Sep 12, 2018
Country: Estonia
Sadly, you’ve exceeded the limit of adding to favorite.
The limit possible is 5
Increase the limit
Go to website

Information about ICO

Platform Ethereum
Accepted BTC, BCH, ETH, LTC
Start date Sep 15, 2018
End date Nov 12, 2018
Token price 1 ILK =
Released tokens 4 400 000 000
Soft cap
Hard cap
Minimal amount 1 000 ILK
Token ILK - 0.0100000000$
Periods
15.09.2018 12.11.2018
100.00%
Inlock (ILK)
Inlock (ILK)
Token
Ethereum
Utility
ERC-20
Platform: Ethereum
trade -
Main - token distribution
During the Whitelist potential Token purchasers are able to complete the KYC process in order to purchase the ILK Tokens. Every participants must provide their information to receive their Tokens onto their personal Ethereum wallets. The ILK token is fits into “Toll” style utility token definition. ILK token is an inseparable part of INCOME Locker platform; with this token we can provide a full transparent service where we are able to preserve the maximum value of our customers’ collateral. Our customers are able to get back their collateral without any cut after a successfully repaid loan contract.
Main - use of funds
Smart contract - INLOCK
/*
    Initial Coin Offering Proxy
    ico.sol
    2.0.0
*/
pragma solidity 0.4.24;

import "./safeMath.sol";
import "./owned.sol";
import "./token.sol";

contract Ico is Owned {
    /* Declarations */
    using SafeMath for uint256;
    /* Enumerations */
    enum phaseType {
        pause,
        privateSale1,
        privateSale2,
        sales,
        preFinish,
        finish
    }
    struct vesting_s {
        uint256 amount;
        uint256 startBlock;
        uint256 endBlock;
        uint256 claimedAmount;
    }
    /* Variables */
    mapping(address => bool) public KYC;
    mapping(address => bool) public transferRight;
    mapping(address => vesting_s) public vesting;
    phaseType public currentPhase;
    uint256   public currentRate;
    uint256   public currentRateM = 1e3;
    uint256   public privateSale1Hardcap = 4e14;
    uint256   public privateSale2Hardcap = 64e13;
    uint256   public thisBalance = 44e14;
    address   public offchainUploaderAddress;
    address   public setKYCAddress;
    address   public setRateAddress;
    address   public libAddress;
    Token     public token;
    /* Constructor */
    constructor(address _owner, address _libAddress, address _tokenAddress, address _offchainUploaderAddress,
        address _setKYCAddress, address _setRateAddress) Owned(_owner) public {
        currentPhase = phaseType.pause;
        libAddress = _libAddress;
        token = Token(_tokenAddress);
        offchainUploaderAddress = _offchainUploaderAddress;
        setKYCAddress = _setKYCAddress;
        setRateAddress = _setRateAddress;
    }
    /* Fallback */
    function () public payable {
        buy();
    }
    /* Externals */
    function changeLibAddress(address _libAddress) external forOwner {
        libAddress = _libAddress;
    }
    function changeOffchainUploaderAddress(address _offchainUploaderAddress) external forOwner {
        offchainUploaderAddress = _offchainUploaderAddress;
    }
    function changeKYCAddress(address _setKYCAddress) external forOwner {
        setKYCAddress = _setKYCAddress;
    }
    function changeSetRateAddress(address _setRateAddress) external forOwner {
        setRateAddress = _setRateAddress;
    }
    function setVesting(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock) external {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    function claimVesting() external {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    function setKYC(address[] _on, address[] _off) external {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    function setTransferRight(address[] _allow, address[] _disallow) external {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    function setCurrentRate(uint256 _currentRate) external {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    function setCurrentPhase(phaseType _phase) external {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    function offchainUpload(address[] _beneficiaries, uint256[] _rewards) external {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    function buy() public payable {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0)
            }
        }
    }
    /* Constants */
    function allowTransfer(address _owner) public view returns (bool _success, bool _allow) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x40)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x40)
            }
        }
    }
    function calculateReward(uint256 _input) public view returns (bool _success, uint256 _reward) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x40)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x40)
            }
        }
    }
    function calcVesting(address _owner) public view returns(bool _success, uint256 _reward) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x40)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x40)
            }
        }
    }
    /* Events */
    event Brought(address _owner, address _beneficiary, uint256 _input, uint256 _output);
    event VestingDefined(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock);
    event VestingClaimed(address _beneficiary, uint256 _amount);
}
view rawico.sol hosted with ❤ by GitHub
/*
    Initial Coin Offering Library
    icoLib.sol
    1.1.4
*/
pragma solidity 0.4.24;

import "./ico.sol";

contract IcoLib is Ico {
    /* Constructor */
    constructor(address _owner, address _libAddress, address _tokenAddress, address _offchainUploaderAddress, address _setKYCAddress, address _setRateAddress)
        Ico(_owner, _libAddress, _tokenAddress, _offchainUploaderAddress, _setKYCAddress, _setRateAddress) public {}
    /* Externals */
    function setVesting(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock) external forOwner {
        require( _beneficiary != 0x00 );
        thisBalance = thisBalance.add( vesting[_beneficiary].amount.sub(vesting[_beneficiary].claimedAmount) );
        if ( _amount == 0 ) {
            delete vesting[_beneficiary];
            emit VestingDefined(_beneficiary, 0, 0, 0);
        } else {
            require( _endBlock > _startBlock );
            vesting[_beneficiary] = vesting_s(
                _amount,
                _startBlock,
                _endBlock,
                0
            );
            thisBalance = thisBalance.sub( _amount );
            emit VestingDefined(_beneficiary, _amount, _startBlock, _endBlock);
        }
    }
    function claimVesting() external {
        uint256 _reward;
        bool    _subResult;
        ( _subResult, _reward ) = calcVesting(msg.sender);
        require( _subResult && _reward > 0 );
        vesting[msg.sender].claimedAmount = vesting[msg.sender].claimedAmount.add(_reward);
        require( token.transfer(msg.sender, _reward) );
    }
    function setKYC(address[] _on, address[] _off) external {
        uint256 i;
        require( msg.sender == setKYCAddress );
        for ( i=0 ; i<_on.length ; i++ ) {
            KYC[_on[i]] = true;
        }
        for ( i=0 ; i<_off.length ; i++ ) {
            delete KYC[_off[i]];
        }
    }
    function setTransferRight(address[] _allow, address[] _disallow) external forOwner {
        uint256 i;
        for ( i=0 ; i<_allow.length ; i++ ) {
            transferRight[_allow[i]] = true;
        }
        for ( i=0 ; i<_disallow.length ; i++ ) {
            delete transferRight[_disallow[i]];
        }
    }
    function setCurrentRate(uint256 _currentRate) external {
        require( msg.sender == setRateAddress );
        require( _currentRate >= currentRateM );
        currentRate = _currentRate;
    }
    function setCurrentPhase(phaseType _phase) external forOwner {
        currentPhase = _phase;
    }
    function offchainUpload(address[] _beneficiaries, uint256[] _rewards) external {
        uint256 i;
        uint256 _totalReward;
        require( msg.sender == offchainUploaderAddress );
        require( currentPhase != phaseType.pause && currentPhase != phaseType.finish );
        require( _beneficiaries.length ==  _rewards.length );
        for ( i=0 ; i<_rewards.length ; i++ ) {
            _totalReward = _totalReward.add(_rewards[i]);
            emit Brought(msg.sender, _beneficiaries[i], 0, _rewards[i]);
        }
        thisBalance = thisBalance.sub(_totalReward);
        if ( currentPhase == phaseType.privateSale1 ) {
            privateSale1Hardcap = privateSale1Hardcap.sub(_totalReward);
        } else if ( currentPhase == phaseType.privateSale2 ) {
            privateSale2Hardcap = privateSale2Hardcap.sub(_totalReward);
        }
        token.bulkTransfer(_beneficiaries, _rewards);
    }
    function buy() public payable {
        uint256 _reward;
        bool    _subResult;
        require( currentPhase == phaseType.privateSale2 || currentPhase == phaseType.sales || currentPhase == phaseType.preFinish );
        require( KYC[msg.sender] );
        ( _subResult, _reward ) = calculateReward(msg.value);
        require( _reward > 0 && _subResult );
        thisBalance = thisBalance.sub(_reward);
        require( owner.send(msg.value) );
        if ( currentPhase == phaseType.privateSale1 ) {
            privateSale1Hardcap = privateSale1Hardcap.sub(_reward);
        } else if ( currentPhase == phaseType.privateSale2 ) {
            privateSale2Hardcap = privateSale2Hardcap.sub(_reward);
        }
        require( token.transfer(msg.sender, _reward) );
        emit Brought(msg.sender, msg.sender, msg.value, _reward);
    }
    /* Constants */
    function allowTransfer(address _owner) public view returns (bool _success, bool _allow) {
        return ( true, _owner == address(this) || transferRight[_owner] || currentPhase == phaseType.preFinish  || currentPhase == phaseType.finish );
    }
    function calculateReward(uint256 _input) public view returns (bool _success, uint256 _reward) {
        uint256 _amount;
        _success = true;
        if ( currentRate == 0 || _input == 0 ) {
            return;
        }
        _amount = _input.mul(1e8).mul(currentRate).div(1e18).div(currentRateM);
        if ( _amount == 0 ) {
            return;
        }
        if ( currentPhase == phaseType.privateSale1 ) {
            if        ( _amount >=  25e11 ) {
                _reward = _amount.mul(142).div(100);
            } else if ( _amount >=  10e11 ) {
                _reward = _amount.mul(137).div(100);
            } else if ( _amount >=   2e11 ) {
                _reward = _amount.mul(133).div(100);
            }
            if ( _reward > 0 && privateSale1Hardcap < _reward ) {
                _reward = 0;
            }
        } else if ( currentPhase == phaseType.privateSale2 ) {
            if        ( _amount >= 125e11 ) {
                _reward = _amount.mul(129).div(100);
            } else if ( _amount >= 100e11 ) {
                _reward = _amount.mul(124).div(100);
            }
            if ( _reward > 0 && privateSale2Hardcap < _reward ) {
                _reward = 0;
            }
        } else if ( currentPhase == phaseType.sales ) {
            if        ( _amount >=  10e11 ) {
                _reward = _amount.mul(117).div(100);
            } else if ( _amount >=   2e11 ) {
                _reward = _amount.mul(112).div(100);
            } else {
                _reward = _amount.mul(109).div(100);
            }
        } else if ( currentPhase == phaseType.preFinish ) {
            if        ( _amount >=   1e11 ) {
                _reward = _amount;
            }
        }
        if ( thisBalance < _reward ) {
            _reward = 0;
        }
    }
    function calcVesting(address _owner) public view returns(bool _success, uint256 _reward) {
        vesting_s memory _vesting = vesting[_owner];
        if ( _vesting.amount == 0 || block.number < _vesting.startBlock ) {
            return ( true, 0 );
        }
        _reward = _vesting.amount.mul( block.number.sub(_vesting.startBlock) ).div( _vesting.endBlock.sub(_vesting.startBlock) );
        if ( _reward > _vesting.amount ) {
            _reward = _vesting.amount;
        }
        if ( _reward <= _vesting.claimedAmount ) {
            return ( true, 0 );
        }
        return ( true, _reward.sub(_vesting.claimedAmount) );
    }
}
view rawicoLib.sol hosted with ❤ by GitHub
/*
    Multi owner wallet for Inlock token
    multiOwnerWallet.sol
    1.2.0
*/
pragma solidity 0.4.24;

import "./token.sol";
import "./safeMath.sol";

contract MultiOwnerWallet {
    /* Declarations */
    using SafeMath for uint256;
    /* Structures */
    struct action_s {
        address origin;
        uint256 voteCounter;
        uint256 startBlock;
        mapping(address => uint256) voters;
    }
    /* Variables */
    mapping(address => bool) public owners;
    mapping(bytes32 => action_s) public actions;
    uint256 public actionVotedRate;
    uint256 public ownerCounter;
    Token public token;
    /* Constructor */
    constructor(address _tokenAddress, uint256 _actionVotedRate, address[] _owners) public {
        uint256 i;
        token = Token(_tokenAddress);
        require( _actionVotedRate <= 100 );
        actionVotedRate = _actionVotedRate;
        for ( i=0 ; i<_owners.length ; i++ ) {
            owners[_owners[i]] = true;
        }
        ownerCounter = _owners.length;
    }
    /* Fallback */
    function () public {
        revert();
    }
    /* Externals */
    function transfer(address _to, uint256 _amount) external returns (bool _success) {
        bytes32 _hash;
        bool    _subResult;
        _hash = keccak256(address(token), 'transfer', _to, _amount);
        if ( actions[_hash].origin == 0x00 ) {
            emit newTransferAction(_hash, _to, _amount, msg.sender);
        }
        if ( doVote(_hash) ) {
            _subResult = token.transfer(_to, _amount);
            require( _subResult );
        }
        return true;
    }
    function revokeTransferAction(address _to, uint256 _amount) external returns (bool _success) {
        revokeAction(keccak256(address(token), 'transfer', _to, _amount));
        return true;
    }
    function bulkTransfer(address[] _to, uint256[] _amount) external returns (bool _success) {
        bytes32 _hash;
        bool    _subResult;
        _hash = keccak256(address(token), 'bulkTransfer', _to, _amount);
        if ( actions[_hash].origin == 0x00 ) {
            emit newBulkTransferAction(_hash, _to, _amount, msg.sender);
        }
        if ( doVote(_hash) ) {
            _subResult = token.bulkTransfer(_to, _amount);
            require( _subResult );
        }
        return true;
    }
    function revokeBulkTransferAction(address[] _to, uint256[] _amount) external returns (bool _success) {
        revokeAction(keccak256(address(token), 'bulkTransfer', _to, _amount));
        return true;
    }
    function changeTokenAddress(address _tokenAddress) external returns (bool _success) {
        bytes32 _hash;
        _hash = keccak256(address(token), 'changeTokenAddress', _tokenAddress);
        if ( actions[_hash].origin == 0x00 ) {
            emit newChangeTokenAddressAction(_hash, _tokenAddress, msg.sender);
        }
        if ( doVote(_hash) ) {
            token = Token(_tokenAddress);
        }
        return true;
    }
    function revokeChangeTokenAction(address _tokenAddress) external returns (bool _success) {
        revokeAction(keccak256(address(token), 'changeTokenAddress', _tokenAddress));
        return true;
    }
    function addNewOwner(address _owner) external returns (bool _success) {
        bytes32 _hash;
        require( ! owners[_owner] );
        _hash = keccak256(address(token), 'addNewOwner', _owner);
        if ( actions[_hash].origin == 0x00 ) {
            emit newAddNewOwnerAction(_hash, _owner, msg.sender);
        }
        if ( doVote(_hash) ) {
            ownerCounter = ownerCounter.add(1);
            owners[_owner] = true;
        }
        return true;
    }
    function revokeAddNewOwnerAction(address _owner) external returns (bool _success) {
        revokeAction(keccak256(address(token), 'addNewOwner', _owner));
        return true;
    }
    function delOwner(address _owner) external returns (bool _success) {
        bytes32 _hash;
        require( owners[_owner] );
        _hash = keccak256(address(token), 'delOwner', _owner);
        if ( actions[_hash].origin == 0x00 ) {
            emit newDelOwnerAction(_hash, _owner, msg.sender);
        }
        if ( doVote(_hash) ) {
            ownerCounter = ownerCounter.sub(1);
            owners[_owner] = false;
        }
        return true;
    }
    function revokeDelOwnerAction(address _owner) external returns (bool _success) {
        revokeAction(keccak256(address(token), 'delOwner', _owner));
        return true;
    }
    function revokeActionByHash(bytes32 _hash) external returns (bool _success) {
        revokeAction(_hash);
        return true;
    }
    /* Constants */
    function selfBalance() public view returns (uint256 _balance) {
        return token.balanceOf(address(this));
    }
    function balanceOf(address _owner) public view returns (uint256 _balance) {
        return token.balanceOf(_owner);
    }
    function hasVoted(bytes32 _hash, address _owner) public view returns (bool _voted) {
        return actions[_hash].origin != 0x00 && actions[_hash].voters[_owner] == actions[_hash].startBlock;
    }
    /* Internals */
    function doVote(bytes32 _hash) internal returns (bool _voted) {
        require( owners[msg.sender] );
        if ( actions[_hash].origin == 0x00 ) {
            actions[_hash].origin = msg.sender;
            actions[_hash].voteCounter = 1;
            actions[_hash].startBlock = block.number;
        } else if ( ( actions[_hash].voters[msg.sender] != actions[_hash].startBlock ) && actions[_hash].origin != msg.sender ) {
            actions[_hash].voters[msg.sender] = actions[_hash].startBlock;
            actions[_hash].voteCounter = actions[_hash].voteCounter.add(1);
            emit vote(_hash, msg.sender);
        }
        if ( actions[_hash].voteCounter.mul(100).div(ownerCounter) >= actionVotedRate ) {
            _voted = true;
            emit votedAction(_hash);
            delete actions[_hash];
        }
    }
    function revokeAction(bytes32 _hash) internal {
        require( actions[_hash].origin == msg.sender );
        delete actions[_hash];
        emit revokedAction(_hash);
    }
    /* Events */
    event newTransferAction(bytes32 _hash, address _to, uint256 _amount, address _origin);
    event newBulkTransferAction(bytes32 _hash, address[] _to, uint256[] _amount, address _origin);
    event newChangeTokenAddressAction(bytes32 _hash, address _tokenAddress, address _origin);
    event newAddNewOwnerAction(bytes32 _hash, address _owner, address _origin);
    event newDelOwnerAction(bytes32 _hash, address _owner, address _origin);
    event vote(bytes32 _hash, address _voter);
    event revokedAction(bytes32 _hash);
    event votedAction(bytes32 _hash);
}
view rawmultiOwnerWallet.sol hosted with ❤ by GitHub
/*
    Token Proxy
    token.sol
    1.0.1
*/
pragma solidity 0.4.24;

import "./safeMath.sol";
import "./owned.sol";
import "./tokenDB.sol";
import "./ico.sol";

contract Token is Owned {
    /* Declarations */
    using SafeMath for uint256;
    /* Variables */
    string  public name = "Inlock token";
    string  public symbol = "ILK";
    uint8   public decimals = 8;
    uint256 public totalSupply = 44e14;
    address public libAddress;
    TokenDB public db;
    Ico public ico;
    /* Constructor */
    constructor(address _owner, address _libAddress, address _dbAddress, address _icoAddress) Owned(_owner) public {
        libAddress = _libAddress;
        db = TokenDB(_dbAddress);
        ico = Ico(_icoAddress);
        emit Mint(_icoAddress, totalSupply);
    }
    /* Fallback */
    function () public { revert(); }
    /* Externals */
    function changeLibAddress(address _libAddress) external forOwner {
        libAddress = _libAddress;
    }
    function changeDBAddress(address _dbAddress) external forOwner {
        db = TokenDB(_dbAddress);
    }
    function changeIcoAddress(address _icoAddress) external forOwner {
        ico = Ico(_icoAddress);
    }
    function approve(address _spender, uint256 _value) external returns (bool _success) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x20)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x20)
            }
        }
    }
    function transfer(address _to, uint256 _amount) external returns (bool _success) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x20)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x20)
            }
        }
    }
    function bulkTransfer(address[] _to, uint256[] _amount) external returns (bool _success) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x20)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x20)
            }
        }
    }
    function transferFrom(address _from, address _to, uint256 _amount) external returns (bool _success) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x20)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x20)
            }
        }
    }
    /* Constants */
    function allowance(address _owner, address _spender) public view returns (uint256 _remaining) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x20)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x20)
            }
        }
    }
    function balanceOf(address _owner) public view returns (uint256 _balance) {
        address _trg = libAddress;
        assembly {
            let m := mload(0x20)
            calldatacopy(m, 0, calldatasize)
            let success := delegatecall(gas, _trg, m, calldatasize, m, 0x20)
            switch success case 0 {
                revert(0, 0)
            } default {
                return(m, 0x20)
            }
        }
    }
    /* Events */
    event AllowanceUsed(address indexed _spender, address indexed _owner, uint256 indexed _value);
    event Mint(address indexed _addr, uint256 indexed _value);
    event Approval(address indexed _owner, address indexed _spender, uint _value);
    event Transfer(address indexed _from, address indexed _to, uint _value);
}
view rawtoken.sol hosted with ❤ by GitHub
/*
    Token database
    tokenDB.sol
    2.1.2
*/
pragma solidity 0.4.24;

import "./safeMath.sol";
import "./owned.sol";

contract TokenDB is Owned {
    /* Declarations */
    using SafeMath for uint256;
    /* Structures */
    struct balances_s {
        uint256 amount;
        bool valid;
    }
    /* Variables */
    mapping(address => mapping(address => uint256)) public allowance;
    mapping(address => balances_s) public balances;
    address public tokenAddress;
    address public oldDBAddress;
    /* Constructor */
    constructor(address _owner, address _tokenAddress, address _icoAddress, address _oldDBAddress) Owned(_owner) public {
        if ( _oldDBAddress == 0x00  && _icoAddress != 0x00 ) {
            balances[_icoAddress].amount = 44e14;
        }
        oldDBAddress = _oldDBAddress;
        tokenAddress = _tokenAddress;
    }
    /* Externals */
    function changeTokenAddress(address _tokenAddress) external forOwner {
        tokenAddress = _tokenAddress;
    }
    function transfer(address _from, address _to, uint256 _amount) external forToken returns(bool _success) {
        uint256 _senderBalance = _getBalance(_from);
        uint256 _receiverBalance = _getBalance(_to);
        balances[_from].amount = _senderBalance.sub(_amount);
        balances[_to].amount = _receiverBalance.add(_amount);
        return true;
    }
    function bulkTransfer(address _from, address[] _to, uint256[] _amount) external forToken returns(bool _success) {
        uint256 _senderBalance = _getBalance(_from);
        uint256 _receiverBalance;
        uint256 i;
        for ( i=0 ; i<_to.length ; i++ ) {
            _receiverBalance = _getBalance(_to[i]);
            _senderBalance = _senderBalance.sub(_amount[i]);
            balances[_to[i]].amount = _receiverBalance.add(_amount[i]);
        }
        balances[_from].amount = _senderBalance;
        return true;
    }
    function setAllowance(address _owner, address _spender, uint256 _amount) external forToken returns(bool _success) {
        allowance[_owner][_spender] = _amount;
        return true;
    }
    /* Constants */
    function getAllowance(address _owner, address _spender) public view returns(bool _success, uint256 _remaining) {
        return ( true, allowance[_owner][_spender] );
    }
    function balanceOf(address _owner) public view returns(bool _success, uint256 _balance) {
        return ( true, _getBalance(_owner) );
    }
    /* Internals */
    function _getBalance(address _owner) internal returns(uint256 _balance) {
        if ( ( ! balances[_owner].valid ) && oldDBAddress != 0x00 ) {
            bool _subResult;
            ( _subResult, _balance ) = TokenDB(oldDBAddress).balanceOf(_owner);
            balances[_owner].amount = _balance;
            balances[_owner].valid = true;
        }
        return balances[_owner].amount;
    }
    /* Modifiers */
    modifier forToken {
        require( msg.sender == tokenAddress );
        _;
    }
}
view rawtokenDB.sol hosted with ❤ by GitHub
/*
    Token Library
    tokenLib.sol
    1.1.0
*/
pragma solidity 0.4.24;

import "./token.sol";
import "./tokenDB.sol";

contract TokenLib is Token {
    /* Constructor */
    constructor(address _owner, address _libAddress, address _dbAddress, address _icoAddress) Token(_owner, _libAddress, _dbAddress, _icoAddress) public {}
    /* Externals */
    function approve(address _spender, uint256 _amount) external returns (bool _success) {
        _approve(_spender, _amount);
        return true;
    }
    function transfer(address _to, uint256 _amount) external returns (bool _success) {
        _transfer(msg.sender, _to, _amount);
        return true;
    }
    function bulkTransfer(address[] _to, uint256[] _amount) external returns (bool _success) {
        uint256 i;
        bool    _subResult;
        bool    _allowed;
        require( _to.length == _amount.length );
        ( _subResult, _allowed ) = ico.allowTransfer(msg.sender);
        require( _subResult && _allowed );
        require( db.bulkTransfer(msg.sender, _to, _amount) );
        for ( i=0 ; i<_to.length ; i++ ) {
            require( _amount[i] > 0 );
            require( _to[i] != 0x00 );
            require( msg.sender != _to[i] );
            emit Transfer(msg.sender, _to[i], _amount[i]);
        }
        return true;
    }
    function transferFrom(address _from, address _to, uint256 _amount) external returns (bool _success) {
        bool    _subResult;
        uint256 _reamining;
        if ( _from != msg.sender ) {
            (_subResult, _reamining) = db.getAllowance(_from, msg.sender);
            require( _subResult );
            _reamining = _reamining.sub(_amount);
            require( db.setAllowance(_from, msg.sender, _reamining) );
            emit AllowanceUsed(msg.sender, _from, _amount);
        }
        _transfer(_from, _to, _amount);
        return true;
    }
    /* Constants */
    function allowance(address _owner, address _spender) public view returns (uint256 _remaining) {
        bool _subResult;
        (_subResult, _remaining) = db.getAllowance(_owner, _spender);
        require( _subResult );
    }
    function balanceOf(address _owner) public view returns (uint256 _balance) {
        bool _subResult;
        (_subResult, _balance) = db.balanceOf(_owner);
        require( _subResult );
    }
    /* Internals */
    function _transfer(address _from, address _to, uint256 _amount) internal {
        bool _subResult;
        bool _allowed;
        require( _amount > 0 );
        require( _from != 0x00 && _to != 0x00 );
        ( _subResult, _allowed ) = ico.allowTransfer(_from);
        require( _subResult && _allowed );
        require( db.transfer(_from, _to, _amount) );
        emit Transfer(_from, _to, _amount);
    }
    function _approve(address _spender, uint256 _amount) internal {
        require( msg.sender != _spender );
        require( db.setAllowance(msg.sender, _spender, _amount) );
        emit Approval(msg.sender, _spender, _amount);
    }
}
Bitcoin
(-1.12%)
Ethereum
(-0.86%)
Ripple
(-1.61%)
Bitcoin Cash
(0.03%)
Litecoin
(-0.95%)
Binance Coin
(-2.46%)
Tether
(0.00%)
EOS
(-0.96%)
Bitcoin SV
(-0.73%)
Monero
(-1.89%)
Stellar
(-0.75%)
Cardano
(-1.22%)
UNUS SED LEO
(0.52%)
Tron
(-1.13%)
OKB
(-0.34%)
Dash
(0.06%)
ChainLink
(-2.77%)
Ethereum Classic
(-3.47%)
IOTA
(-0.32%)
Tezos
(0.07%)
Support Center
Tracking of cryptocurrency markets has become even more convenient with our application.
Neironix Mobile App
Download for FREE
Download App
Create account
Sign in
Contact technical support
If you have any problems with the system, please describe the problem in the form below, or send your question to: support@neironix.io