Skip to content

Commit

Permalink
refactor: Update migration config
Browse files Browse the repository at this point in the history
  • Loading branch information
DeFiFoFum committed Oct 12, 2021
1 parent 8ba8c45 commit ae02cbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion deploy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function getNetworkConfig(network, accounts) {
console.log(`Deploying with BSC testnet config.`)
return {
bananaAddress: '0x4Fb99590cA95fc3255D9fA66a1cA46c43C34b09a',
admin: '0xb5e1Ec9861D7c1C99cB3d79dd602cC6122F0d7dc' // Apeguru
gnanaAddress: '0x9407026d236DEAE22CC1F3c419A9e47CBfCFE9E5',
// admin: '0xb5e1Ec9861D7c1C99cB3d79dd602cC6122F0d7dc' // Apeguru
admin: '0xE375D169F8f7bC18a544a6e5e546e63AD7511581', // Tastic
}
} else if (['development'].includes(network)) {
console.log(`Deploying with development config.`)
Expand Down
10 changes: 7 additions & 3 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@ const { getNetworkConfig } = require('../deploy.config')

module.exports = async function(deployer, network, accounts) {
console.log(network)
let { bananaAddress } = getNetworkConfig(network, accounts);
let { bananaAddress, gnanaAddress } = getNetworkConfig(network, accounts);
const initialSupply = '3000000000000000000000000000'

if (!bananaAddress) {
await deployer.deploy(MockBEP20, 'BANANA-Develop', 'BANANA', '1000000000000000000000000');
bananaAddress = MockBEP20.address
}

await deployer.deploy(GoldenBanana, initialSupply);
await deployer.deploy(Treasury, bananaAddress, GoldenBanana.address);
if (!gnanaAddress) {
await deployer.deploy(GoldenBanana, initialSupply);
gnanaAddress = GoldenBanana.address;
}

await deployer.deploy(Treasury, bananaAddress, gnanaAddress);

const goldenBanana = await GoldenBanana.deployed();
await goldenBanana.excludeAccount(Treasury.address);
Expand Down

0 comments on commit ae02cbf

Please sign in to comment.