#StackBounty: #solidity #web3js #parity #mapping #query Error: Couldn't decode bytes32 from ABI: 0x The size doesn't match

Bounty: 50

I am querying a mapping via a web3 call like this:

var Web3 = require('web3'); 
const web3 = new Web3(new Web3.providers.HttpProvider('https://kovan.infura.io/key...'));
var contractABI = new web3.eth.Contract([...abi...], contractAddress);
var orderValue = '15';
contractABI.methods.orders(web3.utils.toHex(orderValue)).call(function(err, result) {
        if (!err) {
            callback(result);
        } else {
            callback(err);
        }
    });

If orderValue is > 15 then I get the following error:

Error: Couldn’t decode bytes32 from ABI: 0x The size doesn’t match.

If orderValue is <= 15 (e.g. 10) then I get the following error:

throw new Error(‘Given parameter bytes has an invalid length: “‘+
value + ‘”‘);

Error: Given parameter bytes has an invalid length: “0xa”

the mapping in the smart contract looks as follows:

struct Order {
    bytes32 orderId;
    uint32 orderAmount;
}
mapping(bytes32 => Order) public orders;

If if query orders with Parity I am getting some values back. What am I doing wrong?


Get this bounty!!!

#StackBounty: #solidity #web3js #parity #mapping #query Error: Couldn't decode bytes32 from ABI: 0x The size doesn't match

Bounty: 50

I am querying a mapping via a web3 call like this:

var Web3 = require('web3'); 
const web3 = new Web3(new Web3.providers.HttpProvider('https://kovan.infura.io/key...'));
var contractABI = new web3.eth.Contract([...abi...], contractAddress);
var orderValue = '15';
contractABI.methods.orders(web3.utils.toHex(orderValue)).call(function(err, result) {
        if (!err) {
            callback(result);
        } else {
            callback(err);
        }
    });

If orderValue is > 15 then I get the following error:

Error: Couldn’t decode bytes32 from ABI: 0x The size doesn’t match.

If orderValue is <= 15 (e.g. 10) then I get the following error:

throw new Error(‘Given parameter bytes has an invalid length: “‘+
value + ‘”‘);

Error: Given parameter bytes has an invalid length: “0xa”

the mapping in the smart contract looks as follows:

struct Order {
    bytes32 orderId;
    uint32 orderAmount;
}
mapping(bytes32 => Order) public orders;

If if query orders with Parity I am getting some values back. What am I doing wrong?


Get this bounty!!!

#StackBounty: #solidity #web3js #parity #mapping #query Error: Couldn't decode bytes32 from ABI: 0x The size doesn't match

Bounty: 50

I am querying a mapping via a web3 call like this:

var Web3 = require('web3'); 
const web3 = new Web3(new Web3.providers.HttpProvider('https://kovan.infura.io/key...'));
var contractABI = new web3.eth.Contract([...abi...], contractAddress);
var orderValue = '15';
contractABI.methods.orders(web3.utils.toHex(orderValue)).call(function(err, result) {
        if (!err) {
            callback(result);
        } else {
            callback(err);
        }
    });

If orderValue is > 15 then I get the following error:

Error: Couldn’t decode bytes32 from ABI: 0x The size doesn’t match.

If orderValue is <= 15 (e.g. 10) then I get the following error:

throw new Error(‘Given parameter bytes has an invalid length: “‘+
value + ‘”‘);

Error: Given parameter bytes has an invalid length: “0xa”

the mapping in the smart contract looks as follows:

struct Order {
    bytes32 orderId;
    uint32 orderAmount;
}
mapping(bytes32 => Order) public orders;

If if query orders with Parity I am getting some values back. What am I doing wrong?


Get this bounty!!!

#StackBounty: #solidity #web3js #parity #mapping #query Error: Couldn't decode bytes32 from ABI: 0x The size doesn't match

Bounty: 50

I am querying a mapping via a web3 call like this:

var Web3 = require('web3'); 
const web3 = new Web3(new Web3.providers.HttpProvider('https://kovan.infura.io/key...'));
var contractABI = new web3.eth.Contract([...abi...], contractAddress);
var orderValue = '15';
contractABI.methods.orders(web3.utils.toHex(orderValue)).call(function(err, result) {
        if (!err) {
            callback(result);
        } else {
            callback(err);
        }
    });

If orderValue is > 15 then I get the following error:

Error: Couldn’t decode bytes32 from ABI: 0x The size doesn’t match.

If orderValue is <= 15 (e.g. 10) then I get the following error:

throw new Error(‘Given parameter bytes has an invalid length: “‘+
value + ‘”‘);

Error: Given parameter bytes has an invalid length: “0xa”

the mapping in the smart contract looks as follows:

struct Order {
    bytes32 orderId;
    uint32 orderAmount;
}
mapping(bytes32 => Order) public orders;

If if query orders with Parity I am getting some values back. What am I doing wrong?


Get this bounty!!!

#StackBounty: #solidity #web3js #parity #mapping #query Error: Couldn't decode bytes32 from ABI: 0x The size doesn't match

Bounty: 50

I am querying a mapping via a web3 call like this:

var Web3 = require('web3'); 
const web3 = new Web3(new Web3.providers.HttpProvider('https://kovan.infura.io/key...'));
var contractABI = new web3.eth.Contract([...abi...], contractAddress);
var orderValue = '15';
contractABI.methods.orders(web3.utils.toHex(orderValue)).call(function(err, result) {
        if (!err) {
            callback(result);
        } else {
            callback(err);
        }
    });

If orderValue is > 15 then I get the following error:

Error: Couldn’t decode bytes32 from ABI: 0x The size doesn’t match.

If orderValue is <= 15 (e.g. 10) then I get the following error:

Error: Given parameter bytes has an invalid length: “0xa”

the mapping in the smart contract looks as follows:

struct Order {
    bytes32 orderId;
    uint32 orderAmount;
}
mapping(bytes32 => Order) public orders;

If if query orders with Parity I am getting some values back. What am I doing wrong?


Get this bounty!!!

#StackBounty: #solidity #truffle #truffle-test #factory Contract factory function running out of gas during Truffle test

Bounty: 100

Using openzeppelin library and truffle I am trying to make a Contract Factory that creates ERC20 tokens. I prefer to test it with Truffle using solidity and not javascript.

Here is the code from the Contract

    pragma solidity ^0.4.24;

import "zos-lib/contracts/migrations/Migratable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";

contract TokenFactory is Migratable {

    address[] public deployedTokens;

    function createToken(string name, string symbol) public {
        address newToken = new Token(name,symbol,msg.sender);
        deployedTokens.push(newToken);            
    }

    function getDeployedTokens() public view returns (address[]) {
        return deployedTokens;
    }

}

contract Token is StandardToken, Ownable {
    string public name = ""; 
    string public symbol = "";
    uint public decimals = 2;
    uint public INITIAL_SUPPLY = 10000 * (10 ** decimals);

    constructor(string _name, string _symbol, address creator) {
        owner = creator;        
        name = _name;
        symbol = _symbol;
        totalSupply_ = INITIAL_SUPPLY;
    }    
}

and the Test

pragma solidity ^0.4.24;

import "truffle/Assert.sol";
import "truffle/DeployedAddresses.sol";
import "../contracts/TokenFactory.sol";

contract TestTokenFactory {

    TokenFactory tk = TokenFactory(DeployedAddresses.TokenFactory());

    function testChildContractDeployed() public {

        tk.createToken("xxx","sym");
        address[] memory deployedTokens = tk.getDeployedTokens();
        Assert.equal(deployedTokens.length, 1, "Contact is not deployed");

    }

}

my truffle.js

'use strict';

module.exports = {
  networks: {
    local: {
      host: 'localhost',
      port: 7545,
      gas: 6000000,
      gasPrice:1,
      network_id: '*'
    }
  }
};

and the error after running truffle test --network local

1) TestTokenFactory
“before all” hook: prepare suite:
Error: VM Exception while processing transaction: out of gas


Get this bounty!!!

#StackBounty: #solidity #populus Populus: Contract fails due to solidity gas limit

Bounty: 50

  • platform darwin — Python 2.7.12, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
  • plugins: populus==2.0.1
  • OS: Mac OS X

I believe I face with this error due to Solidity compiler’s default gas limit that is 3,000,000.

[Q] How could I increase my solidity compiler’s gas limit due to this error, or another gas limit that populus reads from?

in estimate_gas -> does it exceed gas limit? When I remove some function inside my contract the error gets fixed. I guess there is a gas limit for populus to deploy the contract, is it possible to extend it? If yes how?

Error:

========================================== FAILURES ==========================================
________________________________________ test_receipt ________________________________________

web3 = <web3.main.Web3 object at 0x1061af2d0>
accounts = ['0x82A978B3f5962A5b0957d9ee9eEf472EE55B42F1', '0x7d577a597B2742b498Cb5Cf0C26cDCD726d39E6e', '0xDCEceAF3fc5C0a63d195d6...1d7585Bd0577402861E5', '0x13cBB8D99C6C4e0f2728C7d72606e78A29C4E224', '0x77dB2BEBBA79Db42a978F896968f4afCE746ea1F', ...]
chain = <populus.chain.tester.TesterChain object at 0x105489b50>

    def test_receipt(web3, accounts, chain): #{
        web3._requestManager = web3.manager
        global blkArrayIndex;
        global runTime;
>       my_contract, _   = chain.provider.get_or_deploy_contract('eBlocBroker');

tests/test.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Library/Python/2.7/site-packages/populus/contracts/provider.py:143: in get_or_deploy_contract
    deploy_kwargs=deploy_kwargs,
/Library/Python/2.7/site-packages/populus/contracts/provider.py:121: in deploy_contract
    kwargs=deploy_kwargs,
/Library/Python/2.7/site-packages/web3/contract.py:311: in deploy
    txn_hash = cls.web3.eth.sendTransaction(deploy_transaction)
/Library/Python/2.7/site-packages/web3/eth.py:216: in sendTransaction
    get_buffered_gas_estimate(self.web3, transaction),
/Library/Python/2.7/site-packages/web3/utils/transactions.py:28: in get_buffered_gas_estimate
    gas_estimate = web3.eth.estimateGas(gas_estimate_transaction)
/Library/Python/2.7/site-packages/web3/eth.py:263: in estimateGas
    [transaction],
/Library/Python/2.7/site-packages/web3/manager.py:93: in request_blocking
    response = self._make_request(method, params)
/Library/Python/2.7/site-packages/web3/manager.py:76: in _make_request
    return request_func(method, params)
/Library/Python/2.7/site-packages/web3/middleware/attrdict.py:20: in middleware
    response = make_request(method, params)
/Library/Python/2.7/site-packages/web3/middleware/formatting.py:23: in middleware
    response = make_request(method, formatted_params)
/Library/Python/2.7/site-packages/web3/middleware/formatting.py:25: in middleware
    response = make_request(method, params)
/Library/Python/2.7/site-packages/web3/middleware/exception_handling.py:20: in middleware
    return make_request(method, params)
/Library/Python/2.7/site-packages/web3/providers/tester.py:86: in middleware
    return make_request(method, params)
/Library/Python/2.7/site-packages/web3/providers/tester.py:115: in make_request
    response = rpc_fn(*params)
/Library/Python/2.7/site-packages/testrpc/rpc.py:138: in eth_estimateGas
    return self.client.estimate_gas(**formatted_transaction)
/Library/Python/2.7/site-packages/testrpc/client/client.py:253: in estimate_gas
    txn_hash = self.send_transaction(*args, **kwargs)
/Library/Python/2.7/site-packages/testrpc/client/client.py:263: in send_transaction
    self._send_transaction(*args, **kwargs)
/Library/Python/2.7/site-packages/testrpc/client/client.py:58: in inner
    return client_method(self, *args, **kwargs)
/Library/Python/2.7/site-packages/testrpc/client/utils.py:104: in inner
    return fn(*bytes_args, **bytes_kwargs)
/Library/Python/2.7/site-packages/testrpc/client/client.py:225: in _send_transaction
    output = self.evm.send(sender=sender, to=to, value=value, evmdata=data)
/Library/Python/2.7/site-packages/ethereum/tester.py:338: in send
    return self._send(*args, **kwargs)["output"]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ethereum.tester.state object at 0x1061af590>
sender = 'x04HRxb2xa6pxadxe5@~xxfb(cxc5x1dxe9xfcxb9eBxa0qx86xfe:xedxa6xbbx8ax11m'
to = '', value = 0
evmdata = "```@R4x15ax00x0fW`x00x80xfd[C`x00x81x90UP3`x01`x00ax01x00nx81Tx81sxffxffxffxffxffxffxffxffxf...c3V[Px90V[x90Vx00xa1ebzzr0X Ksx04pt'-x02$\xbfx86x9cx0fxf8xfaxbfx97xdaxb8/xd6Xxc8|xadpxc6JQpCx00)"
funid = None, abi = None, profiling = 0

    def _send(self, sender, to, value, evmdata='', funid=None, abi=None,  # pylint: disable=too-many-arguments
              profiling=0):
        # pylint: disable=too-many-locals

        if funid is not None or abi is not None:
            raise Exception(
                'Send with funid+abi is deprecated. Please use the abi_contract mechanism'
            )

        start_time = time.time()
        gas_used = self.block.gas_used

        sendnonce = self.block.get_nonce(privtoaddr(sender))
        transaction = transactions.Transaction(sendnonce, gas_price, gas_limit, to, value, evmdata)
        self.last_tx = transaction
        transaction.sign(sender)
        recorder = None

        if profiling > 1:
            recorder = LogRecorder(
                disable_other_handlers=True,
                log_config=TRACE_LVL_MAP[3],
            )

        try:
            (success, output) = processblock.apply_transaction(self.block, transaction)

            if not success:
>               raise TransactionFailed()
E               TransactionFailed

/Library/Python/2.7/site-packages/ethereum/tester.py:296: TransactionFailed
------------------------------------- Captured log call --------------------------------------
rpc.py                     129 INFO     eth_blockNumber
============================ 1 failed, 4 warnings in 1.41 seconds ============================


Get this bounty!!!

#StackBounty: #solidity #contract-development #contract-design #remix redirecting value received to another erc20 wallet

Bounty: 50

How can I redirect any value/tokens sent to an ERC20 wallet, to another wallet?

I heard of a new method of stealing currencies and would like to know how it works in practice. Basically, the bad guy spreads the privatekey everywhere on the web and funds the associated wallet with some tokens. Victims will then try to empty the wallet through the privatekey but the wallet has no GAS and any GAS sent to it is redirected to another wallet.
So all the thief has to do, is to spread the privatekey around and wait for victims to take the bait.

How would a contract like this look like?


Get this bounty!!!

#StackBounty: #solidity #remix #ethereumjs #truffle-migration Gas related issue at the time of contract migration

Bounty: 50

Error: The contract code couldn’t be stored, please check your gas amount.
(I also tried to add gas in truffle.js but didn’t get any success)

pragma solidity ^0.4.21;


contract Ownable {
  address public owner;
  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
  function constuctor() public {
    owner = msg.sender;
  }
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }
}

// ######################################################################

library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a / b;
    return c;
  }
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

// ######################################################################

contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

// ######################################################################

contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  uint256 totalSupply_;

  function totalSupply() public view returns (uint256) {
    return totalSupply_;
  }

  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);
    emit Transfer(msg.sender, _to, _value);
    return true;
  }

  function balanceOf(address _owner) public view returns (uint256 balance) {
    return balances[_owner];
  }

}

// ######################################################################

contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

// ######################################################################

contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) internal allowed;

  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);
    emit Transfer(_from, _to, _value);
    return true;
  }

  function approve(address _spender, uint256 _value) public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    emit Approval(msg.sender, _spender, _value);
    return true;
  }

  function allowance(address _owner, address _spender) public view returns (uint256) {
    return allowed[_owner][_spender];
  }

  function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  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);
    }
    emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

// ######################################################################

contract DeveloperToken is StandardToken {
  string public constant name = "DeveloperToken";
  string public constant symbol = "DEV";
  uint256 public constant decimals = 18;
}

// ######################################################################

contract DeveloperCrowdsale is Ownable {
  using SafeMath for uint256;

  // ============= Token Distribution ================
  uint256 public maxTokens = 100000000 *(10 ** 18);
  uint256 public tokensForEcosystem = 80000000 *(10 ** 18);
  uint256 public tokensForBounty = 4000000 *(10 ** 18);
  uint256 public totalTokensForSale = 15000000 *(10 ** 18);
  uint256 public tokenForAirdrop = 1000000 *(10 ** 18);

  ERC20 public token;

  address public wallet;

  uint256 public rate;

  uint256 public weiRaised;

  uint256 public cap;
  uint256 public goal;

  // start and end timestamps where investments are allowed (both inclusive)
  uint256 public startTime;
  uint256 public endTime;

  bool public mintingFinished = false;

  mapping(address => uint256) balances;

  event Mint(address indexed to, uint256 amount);
  event MintFinished();
  event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);

  function constuctor() public {
    rate = 1000;
    wallet = msg.sender;
    token = new DeveloperToken();
    startTime = 1527186660000;  // new Date('05/25/2018 00:01').getTime();
    endTime = 1529951340000; //  new Date('06/25/2018 23:59').getTime();
    cap = 42500 *(10 ** 18);
    goal = 7500 *(10 ** 18);
  }

  function () external payable {
    uint256 tokensThatWillBeMintedAfterPurchase = msg.value.mul(rate);
    require(token.totalSupply() + tokensThatWillBeMintedAfterPurchase < totalTokensForSale);
    buyTokens(msg.sender);
  }

  // ====================== Crowdsale Price Management =================
  function setCrowdsalePrice() public onlyOwner {
      if (weiRaised <= 2500000 *(10 ** 18)) {
        setCurrentRate(1000);
      } else if (weiRaised <= 5000000 *(10 ** 18)) {
        setCurrentRate(500);
      } else if (weiRaised <= 10000000 *(10 ** 18)) {
        setCurrentRate(333);
      } else if (weiRaised <= 15000000 *(10 ** 18)) {
        setCurrentRate(250);
      }
  }

  // Change the current rate
  function setCurrentRate(uint256 _rate) private {
      rate = _rate;
  }

  function buyTokens(address _beneficiary) public payable {
    require(validPurchase());

    uint256 weiAmount = msg.value;

    // calculate token amount to be created
    uint256 tokens = _getTokenAmount(weiAmount);

    // update state
    weiRaised = weiRaised.add(weiAmount);

    _processPurchase(_beneficiary, tokens);
    emit TokenPurchase(msg.sender, _beneficiary, weiAmount, tokens);

    _forwardFunds();
  }

  function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal {
    token.transfer(_beneficiary, _tokenAmount);

  }

  function _processPurchase(address _beneficiary, uint256 _tokenAmount) internal {
    _deliverTokens(_beneficiary, _tokenAmount);
  }

  function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) {
    return _weiAmount.mul(rate);
  }

  function _forwardFunds() internal {
    token.totalSupply() + msg.value.mul(rate);
    wallet.transfer(msg.value);
  }

  // Finish: Mint Extra Tokens as needed before finalizing the Crowdsale.
  function finish(address _airdrop, address _ecosystemFund, address _bountyFund) public onlyOwner {
    require(!mintingFinished);
    require(hasEnded());
    uint256 alreadyMinted = token.totalSupply();
    require(alreadyMinted < maxTokens);

    uint256 unsoldTokens = totalTokensForSale - alreadyMinted;
    if (unsoldTokens > 0) {
      tokensForEcosystem = tokensForEcosystem + unsoldTokens;
    }

    token.totalSupply().add(tokensForEcosystem);
    token.totalSupply().add(tokensForBounty);
    token.totalSupply().add(tokenForAirdrop);

    balances[_airdrop].add(tokenForAirdrop);
    balances[_ecosystemFund].add(tokensForEcosystem);
    balances[_bountyFund].add(tokensForBounty);
    mintingFinished = true ;
  }

  // @return true if the transaction can buy tokens
  function validPurchase() internal view returns (bool) {
    bool withinCap = weiRaised.add(msg.value) <= cap;
    bool withinPeriod = now >= startTime && now <= endTime;
    bool nonZeroPurchase = msg.value != 0;
    return withinPeriod && nonZeroPurchase && withinCap;
  }

  // @return true if crowdsale event has ended
  function hasEnded() public view returns (bool) {
    bool capReached = weiRaised >= cap;
    return now > endTime || capReached;
  }

}

This is my migration file :

var BasicToken =  artifacts.require("./BasicToken.sol");
var ERC20 =  artifacts.require("./ERC20.sol");
var ERC20Basic =  artifacts.require("./ERC20Basic.sol");
var Ownable =  artifacts.require("./Ownable.sol");
var SafeMath = artifacts.require("./SafeMath.sol");
var StandardToken =  artifacts.require("./StandardToken.sol");
var DeveloperToken =  artifacts.require("./DeveloperToken.sol");
var DeveloperCrowdsale =  artifacts.require("./DeveloperCrowdsale.sol");


module.exports = function(deployer) {
  deployer.deploy(SafeMath);
  deployer.link(SafeMath, BasicToken);
  deployer.deploy(BasicToken);

  deployer.deploy(ERC20);
  deployer.deploy(ERC20Basic);
  deployer.deploy(Ownable);
  deployer.deploy(StandardToken);
  deployer.deploy(DeveloperToken);
  deployer.link(SafeMath, DeveloperCrowdsale);
  deployer.deploy(DeveloperCrowdsale);

};

This is my truffle.js :

module.exports = {
    networks: {
         development: {
              host: "localhost",
              port: 8545,
              network_id: "*" // Match any network id
            }
       }
};


Get this bounty!!!