Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Truffle Quick Start Guide

You're reading from   Truffle Quick Start Guide Learn the fundamentals of Ethereum development

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781789132540
Length 170 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Nikhil Bhaskar Nikhil Bhaskar
Author Profile Icon Nikhil Bhaskar
Nikhil Bhaskar
Arrow right icon
View More author details
Toc

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime