Reader small image

You're reading from  Truffle Quick Start Guide

Product typeBook
Published inJun 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781789132540
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Nikhil Bhaskar
Nikhil Bhaskar
author image
Nikhil Bhaskar

Nikhil Bhaskar is the founder and CEO of Ulixir Inca newly founded tech company that builds decentralized and traditional software. He completed B9lab's Ethereum Developer Course, and he is now a certified Ethereum developer. Aside from running Ulixir, he spends his time traveling and eating. He is a bit of a digital nomad; this year, he's lived in five countries and plans to live in six more before the year ends.
Read more about Nikhil Bhaskar

Right arrow

Common migration pitfalls

A common mistake is to have a misconfigured truffle.js file. Ensure that for each network you plan to deploy to, there should be a corresponding entry in the networks object, stating the following information:

networks: {
network_name: {
network_id: <number>
host: <string>,
port: <number>,
gas: <number>
}
}

How do we know what is the correct gas limit? Well, you have to play with this a little.

Every transaction you make has a gas cost. A migration is a transaction, too, and thus has a gas cost. When attemmpting to migrate your contract, you may run into this error:

exceeds block gas limit

Every transaction you send has a gas limit. Try to decrease the amount of gas specified.

Another error you may encounter is the following:

insufficient funds for gas * price + value

This means the total cost of the transaction exceeds...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Truffle Quick Start Guide
Published in: Jun 2018Publisher: PacktISBN-13: 9781789132540

Author (1)

author image
Nikhil Bhaskar

Nikhil Bhaskar is the founder and CEO of Ulixir Inca newly founded tech company that builds decentralized and traditional software. He completed B9lab's Ethereum Developer Course, and he is now a certified Ethereum developer. Aside from running Ulixir, he spends his time traveling and eating. He is a bit of a digital nomad; this year, he's lived in five countries and plans to live in six more before the year ends.
Read more about Nikhil Bhaskar