From 4f9ca1e7caee2b3f7d64dbaf930cd95f64e4a382 Mon Sep 17 00:00:00 2001 From: leovct Date: Tue, 5 Dec 2023 13:12:10 +0100 Subject: [PATCH] chore: update mint amounts --- migrations/7_pol_migration.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/migrations/7_pol_migration.js b/migrations/7_pol_migration.js index c48c45f7..700cd417 100644 --- a/migrations/7_pol_migration.js +++ b/migrations/7_pol_migration.js @@ -73,23 +73,27 @@ async function migrateMatic(governance, depositManager, mintAmount) { module.exports = async function(deployer, _, _) { deployer.then(async() => { + const oneEther = web3.utils.toBN('10').pow(web3.utils.toBN('18')) + // Deploy contracts. console.log('> Deploying POL token contracts...') - const oneEther = web3.utils.toBN('10').pow(web3.utils.toBN('18')) - const mintAmount = oneEther.mul(web3.utils.toBN('100')).toString() // 100 ethers + const polTokenAmountInMigrationContract = oneEther.mul(web3.utils.toBN('1000000000000000000')).toString() + const { polToken, polygonMigration } = await deployPOLToken(governance, polTokenAmountInMigrationContract) console.log('\n> Updating DepositManager...') const governance = await Governance.at(contractAddresses.root.GovernanceProxy) - const { polToken, polygonMigration } = await deployPOLToken(governance, mintAmount) + + const depositManagerProxy = await DepositManagerProxy.at(contractAddresses.root.DepositManagerProxy) const newDepositManager = await deployNewDepositManager(depositManagerProxy) // Migrate MATIC. console.log('\n> Migrating MATIC to POL...') - await migrateMatic(governance, newDepositManager, mintAmount) + const maticAmountToMintAndMigrateInDepositManager = oneEther.mul(web3.utils.toBN('1000000000')).toString() // 100 ethers + await migrateMatic(governance, newDepositManager, maticAmountToMintAndMigrateInDepositManager) const newDepositManagerPOLBalance = await polToken.balanceOf(newDepositManager.address).call() - utils.assertBigNumberEquality(newDepositManagerPOLBalance, mintAmount) + utils.assertBigNumberEquality(newDepositManagerPOLBalance, maticAmountToMintAndMigrateInDepositManager) // Update contract addresses. contractAddresses.root.NewDepositManager = newDepositManager.address