I'm trying to migrate my contracts to rinkeby using truffle (truffle migrate --network rinkeby
), but it keeps telling me that I don't have enough funds:
Using network 'rinkeby'.
Running migration: 1_initial_migration.js Deploying Migrations...
... undefined Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: insufficient funds for gas * price + value
Here's my truffle.js:
module.exports = {
networks: {
rinkeby: {
network_id: 4,
host: '10.21.0.94',
port: 8545,
gas: 4000,
gasPrice: 200000,
from: "0x852c1e19114b1ff775c59a61b345cc839f3307fd"
}
}
};
The "from" address has 3ETH, this should be more than enough.
UPDATE: I tried to switch to a local light node running geth --networkid=4 --syncmode=light --datadir . --rpc --rpcapi="eth,web3,personal,net"
(on Windows), but still get either insufficient funds
or exceeds block gas limit
error.
truffle test
passes all tests.gas: 4000000
. And gasPrice is wrong too,gasPrice: 4000000000
.