Skip to content

Instantly share code, notes, and snippets.

@Renaenys
Created January 15, 2019 06:50
Show Gist options
  • Save Renaenys/b9cc2a2f08b7b85fe86b219727c9702f to your computer and use it in GitHub Desktop.
Save Renaenys/b9cc2a2f08b7b85fe86b219727c9702f to your computer and use it in GitHub Desktop.
Deploy
const DesigniaCoinCrowdsale = artifacts.require('./DesigniaCoinCrowdsale.sol');
const DesigniaCoin = artifacts.require('./DesigniaCoin.sol');
module.exports = function(deployer, network, accounts) {
const openingTime = web3.eth.getBlock('latest').timestamp + 10; // two secs in the future
const closingTime = openingTime + 86400 * 365; // 365 days
const rate = new web3.BigNumber(1000);
const wallet = accounts[1];
return deployer
.then(() => {
return deployer.deploy(DesigniaCoin);
})
.then(() => {
return deployer.deploy(
DesigniaCoinCrowdsale,
openingTime,
closingTime,
rate,
wallet,
DesigniaCoin.address
);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment