-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script: prepare script + param for RNSCommission deploy
- Loading branch information
1 parent
c39ea0f
commit 3ccf07c
Showing
4 changed files
with
55 additions
and
0 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
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
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,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import { RNSCommission } from "@rns-contracts/RNSCommission.sol"; | ||
import { ISharedArgument, Migration } from "script/Migration.s.sol"; | ||
import { Contract } from "script/utils/Contract.sol"; | ||
import { RONRegistrarController, RONRegistrarControllerDeploy } from "./RONRegistrarControllerDeploy.s.sol"; | ||
import { Contract } from "script/utils/Contract.sol"; | ||
import { RNSAuction, RNSAuctionDeploy } from "./RNSAuctionDeploy.s.sol"; | ||
|
||
contract RNSCommissionDeploy is Migration { | ||
function _defaultArguments() internal virtual override returns (bytes memory args) { | ||
ISharedArgument.RNSCommissionParam memory param = config.sharedArguments().rnsCommission; | ||
address[] memory allowedSenders; | ||
allowedSenders = new address[](2); | ||
allowedSenders[0] = param.allowedSenders[0] == address(0) | ||
? address(RNSAuction(loadContract(Contract.RNSAuction.key()))) | ||
: param.allowedSenders[0]; | ||
allowedSenders[1] = param.allowedSenders[1] == address(0) | ||
? address(RONRegistrarController(loadContract(Contract.RONRegistrarController.key()))) | ||
: param.allowedSenders[1]; | ||
|
||
args = abi.encodeCall(RNSCommission.initialize, (param.admin, param.treasuryCommission, allowedSenders)); | ||
} | ||
|
||
function run() public virtual returns (RNSCommission) { | ||
return RNSCommission(_deployProxy(Contract.RNSCommission.key())); | ||
} | ||
} |
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