Skip to content

Commit 923bd7b

Browse files
committed
chore: removed traces of Neo in many scripts and filenames
1 parent e9f8a0a commit 923bd7b

10 files changed

+22
-57
lines changed

contracts/deploy/00-home-chain-arbitration-mainnet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { changeCurrencyRate } from "./utils/klerosCoreHelper";
66
import { HomeChains, isSkipped, isDevnet, PNK, ETH } from "./utils";
77
import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
88
import { deployERC20AndFaucet, deployERC721 } from "./utils/deployTokens";
9-
import { ChainlinkRNG, DisputeKitClassic, KlerosCore, RNGWithFallback } from "../typechain-types";
9+
import { DisputeKitClassic, KlerosCore, RNGWithFallback } from "../typechain-types";
1010

1111
const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
1212
const { ethers, deployments, getNamedAccounts, getChainId } = hre;

contracts/deploy/00-home-chain-arbitration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { changeCurrencyRate } from "./utils/klerosCoreHelper";
66
import { HomeChains, isSkipped, isDevnet, PNK, ETH, Courts } from "./utils";
77
import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
88
import { deployERC20AndFaucet } from "./utils/deployTokens";
9-
import { ChainlinkRNG, DisputeKitClassic, KlerosCore, RNGWithFallback } from "../typechain-types";
9+
import { DisputeKitClassic, KlerosCore, RNGWithFallback } from "../typechain-types";
1010

1111
const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
1212
const { ethers, deployments, getNamedAccounts, getChainId } = hre;

contracts/deploy/change-sortition-module-rng.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { HardhatRuntimeEnvironment } from "hardhat/types";
22
import { DeployFunction } from "hardhat-deploy/types";
3-
import { HomeChains, isMainnet, isSkipped } from "./utils";
3+
import { HomeChains, isSkipped } from "./utils";
44
import { ethers } from "hardhat";
5-
import { ChainlinkRNG, SortitionModule, SortitionModuleNeo } from "../typechain-types";
5+
import { ChainlinkRNG, SortitionModule } from "../typechain-types";
66

77
const task: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
88
const { getNamedAccounts, getChainId } = hre;
@@ -13,15 +13,7 @@ const task: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
1313
console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer);
1414

1515
const chainlinkRng = await ethers.getContract<ChainlinkRNG>("ChainlinkRNG");
16-
17-
let sortitionModule: SortitionModule | SortitionModuleNeo;
18-
if (isMainnet(hre.network)) {
19-
console.log("Using SortitionModuleNeo");
20-
sortitionModule = await ethers.getContract<SortitionModuleNeo>("SortitionModuleNeo");
21-
} else {
22-
console.log("Using SortitionModule");
23-
sortitionModule = await ethers.getContract<SortitionModule>("SortitionModule");
24-
}
16+
const sortitionModule = await ethers.getContract<SortitionModule>("SortitionModule");
2517

2618
console.log(`chainlinkRng.changeConsumer(${sortitionModule.target})`);
2719
await chainlinkRng.changeConsumer(sortitionModule.target);

contracts/deploy/upgrade-all.ts

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types";
33
import { prompt, print } from "gluegun";
44
import { deployUpgradable } from "./utils/deployUpgradable";
55
import { HomeChains, isSkipped } from "./utils";
6-
import { getContractNames, getContractNamesFromNetwork } from "../scripts/utils/contracts";
6+
import { getContractNamesFromNetwork } from "../scripts/utils/contracts";
77

88
const { bold } = print.colors;
99

@@ -36,21 +36,7 @@ const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment)
3636
try {
3737
print.highlight(`🔍 Validating upgrade of ${bold(contractName)}`);
3838

39-
const contractNameWithoutNeo = contractName.replace(/Neo.*$/, "");
4039
let compareStorageOptions = { contract: contractName } as any;
41-
if (hre.network.name === "arbitrum") {
42-
switch (contractName) {
43-
case "KlerosCoreNeo":
44-
case "SortitionModuleNeo":
45-
compareStorageOptions = { deployedArtifact: `${contractName}_Implementation`, contract: contractName };
46-
break;
47-
default:
48-
compareStorageOptions = {
49-
deployedArtifact: `${contractName}_Implementation`,
50-
contract: contractNameWithoutNeo,
51-
};
52-
}
53-
}
5440
await hre.run("compare-storage", compareStorageOptions);
5541
print.newline();
5642
print.highlight(`💣 Upgrading ${bold(contractName)}`);
@@ -65,25 +51,12 @@ const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment)
6551
}
6652
print.info(`Upgrading ${contractName}...`);
6753

68-
switch (contractName) {
69-
case "DisputeKitClassicNeo":
70-
case "DisputeResolverNeo":
71-
await deployUpgradable(deployments, contractName, {
72-
contract: contractName,
73-
newImplementation: contractNameWithoutNeo,
74-
initializer,
75-
from: deployer,
76-
args, // Warning: do not reinitialize existing state variables, only the new ones
77-
});
78-
break;
79-
default:
80-
await deployUpgradable(deployments, contractName, {
81-
newImplementation: contractName,
82-
initializer,
83-
from: deployer,
84-
args, // Warning: do not reinitialize existing state variables, only the new ones
85-
});
86-
}
54+
await deployUpgradable(deployments, contractName, {
55+
newImplementation: contractName,
56+
initializer,
57+
from: deployer,
58+
args, // Warning: do not reinitialize existing state variables, only the new ones
59+
});
8760
print.info(`Verifying ${contractName} on Etherscan...`);
8861
await hre.run("etherscan-verify", { contractName: `${contractName}_Implementation` });
8962
} catch (err) {

contracts/deploy/utils/klerosCoreHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { KlerosCore, KlerosCoreNeo, KlerosCoreRuler, KlerosCoreUniversity } from "../../typechain-types";
1+
import { KlerosCore, KlerosCoreRuler, KlerosCoreUniversity } from "../../typechain-types";
22
import { BigNumberish, toBigInt } from "ethers";
33

44
export const changeCurrencyRate = async (
5-
core: KlerosCore | KlerosCoreNeo | KlerosCoreRuler | KlerosCoreUniversity,
5+
core: KlerosCore | KlerosCoreRuler | KlerosCoreUniversity,
66
erc20: string,
77
accepted: boolean,
88
rateInEth: BigNumberish,

contracts/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@
9191
"docbuild": "scripts/docPreprocess.sh && forge doc --build --out dist && scripts/docPostprocess.sh",
9292
"populate:courts:devnet": "hardhat populate:courts --from v2_devnet --network arbitrumSepoliaDevnet",
9393
"populate:courts:testnet": "hardhat populate:courts --from v2_testnet --network arbitrumSepolia",
94-
"populate:courts:mainnetNeo": "hardhat populate:courts --core-type neo --from v2_mainnet_neo --network arbitrum",
95-
"populate:policiesUris": "scripts/setPoliciesURIs.sh config/policies.v2.{devnet,testnet,mainnet-neo}.json",
94+
"populate:courts:mainnet": "hardhat populate:courts --from v2_mainnet --network arbitrum",
95+
"populate:policiesUris": "scripts/setPoliciesURIs.sh config/policies.v2.{devnet,testnet,mainnet}.json",
9696
"populate:policies:devnet": "hardhat populate:policy-registry --from v2_devnet --network arbitrumSepoliaDevnet",
9797
"populate:policies:testnet": "hardhat populate:policy-registry --from v2_testnet --network arbitrumSepolia",
98-
"populate:policies:mainnetNeo": "hardhat populate:policy-registry --from v2_mainnet_neo --network arbitrum",
98+
"populate:policies:mainnet": "hardhat populate:policy-registry --from v2_mainnet --network arbitrum",
9999
"release:patch": "scripts/publish.sh patch",
100100
"release:minor": "scripts/publish.sh minor",
101101
"release:major": "scripts/publish.sh major",

contracts/scripts/generateDeploymentsMarkdown.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ function generate() { #deploymentDir #explorerUrl
2828
done
2929
}
3030

31-
echo "### V2 Neo (prelaunch)"
31+
echo "### V2 Mainnet"
3232
echo "#### Arbitrum One"
3333
echo
3434
generate "$SCRIPT_DIR/../deployments/arbitrum" "https://arbiscan.io/address/" | grep -v 'DAI\|WETH\|PNKFaucet'
3535
echo
36-
echo "### Official Testnet"
36+
echo "### V2 Testnet"
3737
echo "#### Arbitrum Sepolia"
3838
echo
3939
generate "$SCRIPT_DIR/../deployments/arbitrumSepolia" "https://sepolia.arbiscan.io/address/"
@@ -47,7 +47,7 @@ echo
4747
generate "$SCRIPT_DIR/../deployments/chiado" "https://gnosis-chiado.blockscout.com/address/"
4848
echo
4949

50-
echo "### Devnet"
50+
echo "### V2 Devnet (unstable)"
5151
echo "#### Arbitrum Sepolia"
5252
echo
5353
generate "$SCRIPT_DIR/../deployments/arbitrumSepoliaDevnet" "https://sepolia.arbiscan.io/address/"

contracts/scripts/storage-layout.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types";
44
task("storage-layout", "Prints the storage layout of a contract").setAction(
55
async ({}, hre: HardhatRuntimeEnvironment) => {
66
await hre.run("compile");
7-
const buildInfo = await hre.artifacts.getBuildInfo(`src/arbitration/KlerosCoreNeo.sol:KlerosCoreNeo`);
8-
console.log(buildInfo.output.contracts["src/arbitration/KlerosCoreNeo.sol"]["KlerosCoreNeo"].storageLayout);
7+
const buildInfo = await hre.artifacts.getBuildInfo(`src/arbitration/KlerosCore.sol:KlerosCore`);
8+
console.log(buildInfo.output.contracts["src/arbitration/KlerosCore.sol"]["KlerosCore"].storageLayout);
99
}
1010
);

0 commit comments

Comments
 (0)