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

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Dec 5, 2023
1 parent 7a11f54 commit 45302ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions migrations/7_pol_migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ async function deployNewDepositManager(depositManagerProxy) {
return newDepositManager
}

async function migrateMatic(governance, depositManagerProxy, mintAmount) {
async function migrateMatic(governance, depositManager, mintAmount) {
// Mint MATIC to DepositManager.
const maticToken = await TestToken.at(contractAddresses.root.tokens.MaticToken)
let result = await maticToken.mint(depositManagerProxy.address, mintAmount)
let result = await maticToken.mint(depositManager.address, mintAmount)
console.log('MaticToken minted to DepositManager:', result.tx)

// Migrate MATIC.
result = await governance.update(
depositManagerProxy.address,
depositManagerProxy.migrateMatic(mintAmount).encodeABI()
depositManager.address,
depositManager.migrateMatic(mintAmount).encodeABI()
)
}

Expand All @@ -86,7 +86,7 @@ module.exports = async function(deployer, network, accounts) {

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

const newDepositManagerPOLBalance = await polToken.balanceOf(newDepositManager.address).call()
utils.assertBigNumberEquality(newDepositManagerPOLBalance, mintAmount)
Expand Down

0 comments on commit 45302ca

Please sign in to comment.