Reading Assignment: Truffle Migrations


#1

Welcome to this assignment. Please answer the following questions from the lecture. Feel free to ask questions here as well if you need the help.

  1. What are migrations?
  2. What does the function artifacts.require() do?
  3. Take a look at the Migrations.sol contract, what does it do?
  4. What function should we run when we want to deploy a contract from inside the migrations file?

#2
  1. Migrations are javascript file that helps in deploying the contracts.
  2. It helps us in interacting with the contracts. We spcify the name of the contract in artifacts.require()
  3. It helps in using the migrations feature of the truffle. This contract is deployed initially as first migration and is not updated again.
  4. deployer.deploy()

#3

1. What are migrations?
Migrations are JavaScript files that help you deploy contracts to the Ethereum network.

2. What does the function artifacts.require() do?
This function requires the name of the contract in order to interact with it.

3. Take a look at the Migrations.sol contract, what does it do?
It allows migrations to be set and upgraded by the owner of the contract while keeping record of the last completed migration.

4. What function should we run when we want to deploy a contract from inside the migrations file?
We should run a deployer function.

deployer.deploy(A);


#4
  1. Migrations are js files used to configure parameters to deploy contracts to the Ethereum network.

  2. The function artifacts.require() tells truffle which contract to deploy.

  3. The Migrations.sol contract sets the owner of the contracts being migrated, sets restrictions so only the owner can upgrade, sets the signature of the last completed migration

  4. We use the deployer function to deploy the configured artifacts and optional parameters