From f33480dbdba3afe4862e01cc94f709e75d4ad18a Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 25 Jun 2024 12:03:39 +0700 Subject: [PATCH] script: prevent reverting at the start of the script --- script/20231024-upgrade-domain-price/20231024_Config.s.sol | 2 +- script/Migration.s.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/20231024-upgrade-domain-price/20231024_Config.s.sol b/script/20231024-upgrade-domain-price/20231024_Config.s.sol index 0b602d51..6c77ea26 100644 --- a/script/20231024-upgrade-domain-price/20231024_Config.s.sol +++ b/script/20231024-upgrade-domain-price/20231024_Config.s.sol @@ -9,7 +9,7 @@ abstract contract Config__20231024 is Migration { ISharedArgument.SharedParameter memory param = abi.decode(rawArgs, (ISharedArgument.SharedParameter)); - if (network() == DefaultNetwork.RoninTestnet.key()) { + if (network() == DefaultNetwork.RoninTestnet.key() || network() == DefaultNetwork.LocalHost.key()) { param.rnsDomainPrice.overrider = param.rnsDomainPrice.domainPriceOperators[0]; } else if (network() == DefaultNetwork.RoninMainnet.key()) { revert("Missing param"); diff --git a/script/Migration.s.sol b/script/Migration.s.sol index 22d60fae..e4c73c36 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -16,7 +16,7 @@ abstract contract Migration is BaseMigration { function _sharedArguments() internal view virtual override returns (bytes memory rawArgs) { ISharedArgument.SharedParameter memory param; - if (network() == DefaultNetwork.RoninTestnet.key()) { + if (network() == DefaultNetwork.RoninTestnet.key() || network() == DefaultNetwork.LocalHost.key()) { address defaultAdmin = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; address defaultPauser = defaultAdmin; address defaultOperator = defaultAdmin;