Skip to content

Commit

Permalink
script: upgrate controller and deploy rns commission mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
tringuyenskymavis committed Jul 4, 2024
1 parent 4b9a596 commit 8ae0ed0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import { RNSAuction, RNSAuctionDeploy } from "script/contracts/RNSAuctionDeploy.s.sol";
import {
RONRegistrarController, RONRegistrarControllerDeploy
} from "script/contracts/RONRegistrarControllerDeploy.s.sol";
import { Contract } from "script/utils/Contract.sol";
import { RNSCommission, RNSCommissionDeploy } from "script/contracts/RNSCommissionDeploy.s.sol";
import { Migration } from "script/Migration.s.sol";

contract Migration__20240407_UpgradeControllerAndDeployRNSCommissionMainnet is Migration {
RONRegistrarController private _controller;
RNSCommission private _rnsCommission;

function run() public {
_controller = RONRegistrarController(_upgradeProxy(Contract.RONRegistrarController.key()));
_rnsCommission = new RNSCommissionDeploy().run();
}
}
16 changes: 16 additions & 0 deletions script/Migration.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,22 @@ abstract contract Migration is BaseMigration {
param.rnsUnified.protectedSettler = temporaryAdmin;
param.rnsUnified.gracePeriod = 90 days;
param.rnsUnified.baseTokenURI = "https://metadata-rns.roninchain.com/ronin/";

// RNSCommission
param.rnsCommission.admin = temporaryAdmin;
param.rnsCommission.commissionSetters = new address[](1);
param.rnsCommission.commissionSetters[0] = temporaryAdmin;

param.rnsCommission.allowedSenders = new address[](2);

param.rnsCommission.treasuryCommission = new INSCommission.Commission[](2);
param.rnsCommission.treasuryCommission[0].recipient = payable(0xFf43f5Ef28EcB7c1f219751fc793deB40ef07A53);
param.rnsCommission.treasuryCommission[0].ratio = 70_00;
param.rnsCommission.treasuryCommission[0].name = "Sky Mavis";

param.rnsCommission.treasuryCommission[1].recipient = payable(0x22cEfc91E9b7c0f3890eBf9527EA89053490694e);
param.rnsCommission.treasuryCommission[1].ratio = 30_00;
param.rnsCommission.treasuryCommission[1].name = "Ronin";
} else {
revert("Missing param");
}
Expand Down

0 comments on commit 8ae0ed0

Please sign in to comment.