Your contract migration files will use thedeployerobject to stage the deployment tasks for your contracts. You can write your deployment tasks synchronously, as shown in the following example, and they'll be executed in the correct order in which they are specified:
deployer.deploy(Contract1);deployer.deploy(Contract2);
First, the deployer will deploy theContract1contract, and only then it will deploy theContract2contract.
Other than thedeployerobject, there are other optional objects can also be used, such asnetworkandaccounts. Let's look at thenetworkobject.
Get Mastering Blockchain Programming with Solidity now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.