Skip to content

Instantly share code, notes, and snippets.

@alexroan
Created March 22, 2020 22:12
Show Gist options
  • Save alexroan/3d86e9000a185301ea840d49e7e9f7c9 to your computer and use it in GitHub Desktop.
Save alexroan/3d86e9000a185301ea840d49e7e9f7c9 to your computer and use it in GitHub Desktop.
truffle-multiple-migrations-4.js
const MyERC20 = artifacts.require("MyERC20");
const Exchange = artifacts.require("Exchange");
module.exports = async function(deployer) {
// deploy MyERC20 and store return value
let erc20 = await deployer.deploy(MyERC20);
// deploy the Exchange and pass erc20
deployer.deploy(Exchange, erc20);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment