-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from eztierney/master-minter-deploy
Add migration to deploy master minter
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var MasterMinter = artifacts.require('./MasterMinter.sol'); | ||
var FiatToken = artifacts.require('./FiatTokenProxy.sol') | ||
|
||
module.exports = function(deployer, network, accounts) { | ||
|
||
if( network == "development" || network == "coverage") { | ||
// Change these if deploying for real, these are deterministic | ||
// address from ganache | ||
var minterOwner = "0x3e5e9111ae8eb78fe1cc3bb8915d5d461f3ef9a9"; | ||
var fiatToken = FiatToken.address; | ||
} | ||
console.log("deploying MasterMinter for fiat token at " + fiatToken); | ||
deployer.deploy(MasterMinter, fiatToken) | ||
.then( function(mm) { | ||
console.log("master minter deployed at " + mm.address) | ||
console.log("reassigning owner to " + minterOwner); | ||
return mm.transferOwnership(minterOwner); | ||
}) | ||
.then(function(ownerTransferred) { | ||
console.log("All done.") | ||
}); | ||
} |