Skip to content

Commit

Permalink
fix: remove fun para
Browse files Browse the repository at this point in the history
  • Loading branch information
ethyla committed Jul 22, 2024
1 parent 4b2c7b4 commit 49bae81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/root/depositManager/DepositManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ contract DepositManager is DepositManagerStorage, IDepositManager, ERC721Holder
}

// new: governance function to migrate MATIC to POL
function migrateMatic(uint256) external onlyGovernance {
function migrateMatic() external onlyGovernance {
IERC20 matic = IERC20(registry.contractMap(keccak256("matic")));
_migrateMatic(matic.balanceOf(address(this)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ contract UpgradeStake_DepositManager_Mainnet is Script {
// STEP 7
// call mapToken on the Registry to map POL to the PoS native gas token address (1010)
bytes memory payloadMapToken7 = abi.encodeCall(
governance.update.selector, (address(registry), abi.encodeCall(registry.mapToken, (address(polToken), nativeGasTokenAddress, false)))
governance.update, (address(registry), abi.encodeCall(registry.mapToken, (address(polToken), nativeGasTokenAddress, false)))
);

console.log("Send payloadMapToken7 to: ", address(governance));
Expand All @@ -177,9 +177,8 @@ contract UpgradeStake_DepositManager_Mainnet is Script {

// STEP 9
// call migrateMatic on the new DepositManager, migrating all MATIC
uint256 amount = maticToken.balanceOf(address(depositManagerProxy));
bytes memory payloadMigrateMatic9 =
abi.encodeCall(governance.update, (address(depositManagerProxy), abi.encodeCall(depositManagerProxy.migrateMatic, (amount / 2))));
abi.encodeCall(governance.update, (address(depositManagerProxy), abi.encodeCall(depositManagerProxy.migrateMatic, ())));

console.log("Send payloadMigrateMatic9 to: ", address(governance));
console.logBytes(payloadMigrateMatic9);
Expand Down

0 comments on commit 49bae81

Please sign in to comment.