-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add migration script for ronin-mainnet
- Loading branch information
Showing
4 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
script/20231205-deploy-upgrade-auction-and-deploy-rns-operation/20231205_MainnetConfig.s.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import { Network, RNSDeploy } from "script/RNSDeploy.s.sol"; | ||
|
||
abstract contract Config__Mainnet20231205 is RNSDeploy { | ||
function _buildMigrationConfig() internal view virtual override returns (Config memory config) { | ||
config = super._buildMigrationConfig(); | ||
if (_network == Network.RoninMainnet) { | ||
config.rnsOperationOwner = 0x1FF1edE0242317b8C4229fC59E64DD93952019ef; | ||
} else { | ||
revert("Missing config"); | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...de-auction-and-deploy-rns-operation/20231205_UpgradeRNSAuctionAndDeployRNSOperation.s.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import { ContractKey } from "foundry-deployment-kit/configs/ContractConfig.sol"; | ||
import { Network, Config__Mainnet20231205 } from "script/20231205-deploy-upgrade-auction-and-deploy-rns-operation/20231205_MainnetConfig.s.sol"; | ||
import { Migration__20231123_UpgradeAuctionClaimeUnbiddedNames as UpgradeAuctionScript } from "script/20231123-upgrade-auction-claim-unbidded-names/20231123_UpgradeAuctionClaimUnbiddedNames.s.sol"; | ||
import { RNSOperation, Migration__20231124_DeployRNSOperation as DeployRNSOperationScript } from "script/20231124-deploy-rns-operation/20231124_DeployRNSOperation.s.sol"; | ||
|
||
contract Migration__20231205_UpgradeRNSAuctionAndDeployRNSOperation is Config__Mainnet20231205 { | ||
function run() public trySetUp onMainnet { | ||
Config memory config = getConfig(); | ||
|
||
// upgrade rns auction contract | ||
new UpgradeAuctionScript().run(); | ||
// deploy rns operation contract | ||
new DeployRNSOperationScript().run(); | ||
|
||
RNSOperation rnsOperation = RNSOperation(_config.getAddressFromCurrentNetwork(ContractKey.RNSOperation)); | ||
|
||
// transfer owner ship for RNSOperation | ||
vm.broadcast(rnsOperation.owner()); | ||
rnsOperation.transferOwnership(config.rnsOperationOwner); | ||
|
||
assertTrue(rnsOperation.owner() == config.rnsOperationOwner); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters