Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
chore: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Dec 1, 2023
1 parent 459b9de commit 7a11f54
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions migrations/7_pol_migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,17 @@ module.exports = async function(deployer, network, accounts) {
const depositManagerProxy = await DepositManagerProxy.at(contractAddresses.root.DepositManagerProxy)

// Deploy contracts.
console.log('Deploying POL token contracts...')
console.log('> Deploying POL token contracts...')
const mintAmount = web3.utils.toBN('10').pow(web3.utils.toBN('18')).toString()

console.log('\nUpdating DepositManager...')
console.log('\n> Updating DepositManager...')
const { polToken, polygonMigration } = await deployPOLToken(governance, mintAmount)
const newDepositManager = await deployNewDepositManager(depositManagerProxy)

// Migrate MATIC.
console.log('\n> Migrating MATIC to POL...')
await migrateMatic(governance, depositManagerProxy, mintAmount)

// Check that MATIC balance has been converted to POL
const newDepositManagerPOLBalance = await polToken.balanceOf(newDepositManager.address).call()
utils.assertBigNumberEquality(newDepositManagerPOLBalance, mintAmount)

Expand All @@ -94,5 +96,6 @@ module.exports = async function(deployer, network, accounts) {
contractAddresses.root.PolToken = polToken.address
contractAddresses.root.PolygonMigration = polygonMigration.address
utils.writeContractAddresses(contractAddresses)
console.log('\n> Contract addresses updated!')
})
}

0 comments on commit 7a11f54

Please sign in to comment.