I've been reading a few articles and StackExchange posts (e.g. What are truffle migrations?) about Truffle Migrations, but I still don't get it: why do we need them?

It seems they do only one thing (correct me if I'm wrong): store a number in a contract so we know which (version of) the contracts we already deployed.

Thing is, deploying a contract and making transactions isn't cheap: it means spending Ether and also increasing the size of the blockchain forever. It seems like a heavy cost for just storing an integer we could store locally for example.

So I'm wondering: did I miss other features offered by Truffle migrations? Why don't we store that information locally (or somewhere else)?

  • 2
    That are questions you should make to Truffle developers. I'd use Truffle only for development/testing cycle and for production I'd use my own scripts. – Ismael Sep 20 '19 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.