Blockwell

DigitexFutures

ERC20

This contract is an ERC20 token.

Name DigitexFutures
Symbol DGTX
Decimals 18
Total Supply 1,000,000,000 DGTX

About link description

Digitex Futures is a commission-free cryptocurrency futures exchange with a rapid-fire one-click trading ladder and high leverage. Traders can buy and sell perpetual swap futures contracts on Bitcoin against the US Dollar and pay no transaction fees on any trades. The company will be adding extra markets such as Ethereum and Litecoin soon after the mainnet launch on April 27. Commission-free trading is made possible by using its own cryptocurrency, called the DGTX token, as the native currency of the futures exchange. Instead of covering costs by charging transaction fees on trades, Digitex meets the operational costs of running the futures exchange by creating and selling a small number of new DGTX tokens each year.

Stats

Public Functions 23
Event Types 12
Code Size 67,433 bytes

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
burner
address help
value
uint256 help

DepositReleased Event

Parameters help

Finalized Event

Parameters help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Refunded Event

Parameters help
beneficiary
address help
weiAmount
uint256 help

RefundsDisabled Event

Parameters help

RefundsEnabled Event

Parameters help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
value
uint help
data
bytes help

newETHUSDPrice Event

Parameters help
price
string help

newOraclizeQuery Event

Parameters help
description
string help

Functions Expand All Collapse All

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 (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) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    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 (uint256) {
    return allowed[_owner][_spender];
  }

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) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[_from]);
    require(_value <= allowed[_from][msg.sender]);

    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
    Transfer(_from, _to, _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) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

increaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_addedValue
uint help

Properties

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

decreaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_subtractedValue
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
  function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
    uint oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint help
_data
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transfer(address _to, uint _value, bytes _data) returns (bool success) {
    //filtering if the target is a contract with bytecode inside it
    if (!super.transfer(_to, _value)) throw; // do a normal token transfer
    if (isContract(_to)) contractFallback(msg.sender, _to, _value, _data);
   Transfer(msg.sender, _to, _value, _data);
    return true;
  }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help
_data
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transferFrom(address _from, address _to, uint _value, bytes _data) returns (bool success) {
    if (!super.transferFrom(_from, _to, _value)) throw; // do a normal token transfer
    if (isContract(_to)) contractFallback(_from, _to, _value, _data);
    Transfer(_from, _to, _value, _data);
    return true;
  }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transfer(address _to, uint _value) returns (bool success) {
    return transfer(_to, _value, new bytes(0));
  }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transferFrom(address _from, address _to, uint _value) returns (bool success) {
    return transferFrom(_from, _to, _value, new bytes(0));
  }

burn keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function burn(uint256 _value) public {
        require(0 != _value);
        
        super.burn(_value);
        Transfer(msg.sender, 0, _value);
    }

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferOwnership(address newOwner) public onlyOwner {
        require(newOwner != address(0));
        uint256 localOwnerBalance = balances[owner];
        balances[newOwner] = balances[newOwner].add(localOwnerBalance);
        balances[owner] = 0;
        vault_wallet = newOwner;
        Transfer(owner, newOwner, localOwnerBalance);
        super.transferOwnership(newOwner);
    }

__callback keyboard_arrow_up

Parameters help

Name Type
myid
bytes32 help
result
string help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function __callback(bytes32 myid, string result) {
        require (msg.sender == oraclize_cbAddress());

        newETHUSDPrice(result);

        USDETH = parseInt(result, 0);
        if ((now < ICOendtime) && (totaltokensold < hardcapInTokens))
        {
            UpdateUSDETHPriceAfter(day); //update every 24 hours
        }
        
    }

__callback keyboard_arrow_up

Parameters help

Name Type
myid
bytes32 help
result
string help
proof
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
    function __callback(bytes32 myid, string result, bytes proof) {
    }

increaseSupply keyboard_arrow_up

Parameters help

Name Type
value
uint help
to
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function increaseSupply(uint value, address to) public onlyOwner returns (bool) {
        totalSupply = totalSupply.add(value);
        balances[to] = balances[to].add(value);
        Transfer(0, to, value);
        return true;
    }

finalize keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function finalize() public {
        require(!isFinalized);
        require(ICOendtime < now);
        finalization();
        Finalized();
        isFinalized = true;
    }

claimRefund keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function claimRefund() public {
        require(isFinalized);
        require(!goalReached());
        
        uint256 refundedTokens = balances[msg.sender];
        balances[owner] = balances[owner].add(refundedTokens);
        totaltokensold = totaltokensold.sub(refundedTokens);
        balances[msg.sender] = 0;
        
        Transfer(msg.sender, owner, refundedTokens);
        
        vault_refund(msg.sender);
    }

releaseUnclaimedFunds keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function releaseUnclaimedFunds() onlyOwner public {
        require(vault_state == State.Refunding && now >= refundDeadline);
        vault_releaseDeposit();
    }

goalReached keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function goalReached() public view returns (bool) {
        return totaltokensold >= softcapInTokens;
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
  function () payable {
       if (msg.sender != owner) {
          buy();
       }
  }

ICOactive keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
  function ICOactive() public view returns (bool success) {
      if (ICOstarttime < now && now < ICOendtime && totaltokensold < hardcapInTokens) {
          return true;
      }
      
      return false;
  }

buy keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
  function buy() payable {

      

      require (msg.value >= minimumInvestmentInWei && msg.value <= maximumInvestmentInWei);

      require (ICOactive());
      
      uint256 NumberOfTokensToGive = msg.value.mul(USDETH).mul(NumberOfTokensIn1USD);
     

      
      if(now <= ICOstarttime + week) {
          
          NumberOfTokensToGive = NumberOfTokensToGive.mul(120).div(100);
          
      } else if(now <= ICOstarttime + 2*week){
          
          NumberOfTokensToGive = NumberOfTokensToGive.mul(115).div(100);
          
      } else if(now <= ICOstarttime + 3*week){
          
          NumberOfTokensToGive = NumberOfTokensToGive.mul(110).div(100);
          
      } else{
          NumberOfTokensToGive = NumberOfTokensToGive.mul(105).div(100);
      }
      
      uint256 localTotaltokensold = totaltokensold;
      require(localTotaltokensold + NumberOfTokensToGive <= hardcapInTokens);
      totaltokensold = localTotaltokensold.add(NumberOfTokensToGive);
      
      address localOwner = owner;
      balances[msg.sender] = balances[msg.sender].add(NumberOfTokensToGive);
      balances[localOwner] = balances[localOwner].sub(NumberOfTokensToGive);
      Transfer(localOwner, msg.sender, NumberOfTokensToGive);
      
      saleWalletAddress.transfer(msg.value - msg.value * 96 / 100);
      
      if(!goalReached() && (RefundVault.State.Active == vault_state))
      {
          depositFunds();
      } else {
          if(RefundVault.State.Active == vault_state) {vault_releaseDeposit();}
          localOwner.transfer(msg.value * 96 / 100);
      }
  }