Skip to content

Commit daa8bf9

Browse files
committed
chore: removed traces of Neo in more scripts
1 parent 923bd7b commit daa8bf9

13 files changed

+50
-79
lines changed

contracts/deployments/contractsEthers.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ import {
9292
KlerosCoreUniversity__factory,
9393
SortitionModuleUniversity,
9494
SortitionModuleUniversity__factory,
95-
KlerosCoreNeo,
96-
KlerosCoreNeo__factory,
97-
SortitionModuleNeo,
98-
SortitionModuleNeo__factory,
9995
} from "../typechain-types";
10096
import { type ContractConfig, type DeploymentName, deployments, getAddress } from "./utils";
10197

@@ -171,8 +167,8 @@ function getCommonFactories(
171167

172168
export const getContracts = async (provider: ethers.Provider, deployment: DeploymentName) => {
173169
const { chainId } = deployments[deployment];
174-
let klerosCore: KlerosCore | KlerosCoreNeo | KlerosCoreUniversity;
175-
let sortition: SortitionModule | SortitionModuleNeo | SortitionModuleUniversity;
170+
let klerosCore: KlerosCore | KlerosCoreUniversity;
171+
let sortition: SortitionModule | SortitionModuleUniversity;
176172
let commonFactories: CommonFactories;
177173

178174
switch (deployment) {
@@ -247,9 +243,9 @@ export const getContracts = async (provider: ethers.Provider, deployment: Deploy
247243
chainId
248244
);
249245
break;
250-
case "mainnetNeo":
251-
klerosCore = KlerosCoreNeo__factory.connect(getAddress(mainnetCoreConfig, chainId), provider);
252-
sortition = SortitionModuleNeo__factory.connect(getAddress(mainnetSortitionConfig, chainId), provider);
246+
case "mainnet":
247+
klerosCore = KlerosCore__factory.connect(getAddress(mainnetCoreConfig, chainId), provider);
248+
sortition = SortitionModule__factory.connect(getAddress(mainnetSortitionConfig, chainId), provider);
253249
commonFactories = getCommonFactories(
254250
{
255251
dkClassicConfig: mainnetDkcConfig,

contracts/deployments/contractsViem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
203203
},
204204
});
205205

206-
case "mainnetNeo":
206+
case "mainnet":
207207
return getCommonConfigs({
208208
chainId,
209209
configs: {

contracts/deployments/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const deployments = {
1010
testnet: {
1111
chainId: arbitrumSepolia.id,
1212
},
13-
mainnetNeo: {
13+
mainnet: {
1414
chainId: arbitrum.id,
1515
},
1616
} as const;

contracts/scripts/changeOwner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const { bold } = print.colors;
77

88
task("change-owner", "Changes the owner for all the contracts")
99
.addPositionalParam("newOwner", "The address of the new owner")
10-
.addOptionalParam("coreType", "The type of core to use between base, neo, university (default: base)", Cores.BASE)
10+
.addOptionalParam("coreType", "The type of core to use between base, university (default: base)", Cores.BASE)
1111
.setAction(async (taskArgs, hre) => {
1212
const newOwner = taskArgs.newOwner;
1313
if (!isAddress(newOwner)) {
@@ -27,7 +27,7 @@ task("change-owner", "Changes the owner for all the contracts")
2727

2828
const coreType = Cores[taskArgs.coreType.toUpperCase() as keyof typeof Cores];
2929
if (coreType === undefined) {
30-
console.error("Invalid core type, must be one of base, neo, university");
30+
console.error("Invalid core type, must be one of base, university");
3131
return;
3232
}
3333
console.log("Using core type %s", coreType);

contracts/scripts/generateDeploymentArtifact.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5-
if [[ $# < 2 ]]
5+
if [[ $# -lt 2 ]]
66
then
77
echo "usage: $(basename $0) network address"
88
exit 1

contracts/scripts/generateDeploymentsMarkdown.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ IGNORED_ARTIFACTS=(
1515
function generate() { #deploymentDir #explorerUrl
1616
deploymentDir=$1
1717
explorerUrl=$2
18+
# shellcheck disable=SC2068
1819
for f in $(ls -1 $deploymentDir/*.json 2>/dev/null | grep -v ${IGNORED_ARTIFACTS[@]/#/-e } | sort); do
1920
contractName=$(basename $f .json)
2021
address=$(cat $f | jq -r .address)

contracts/scripts/keeperBot.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
DisputeKitGatedShutter,
77
DisputeKitShutter,
88
SortitionModule,
9-
SortitionModuleNeo,
109
} from "../typechain-types";
1110
import env from "./utils/env";
1211
import loggerFactory from "./utils/logger";
@@ -49,7 +48,7 @@ const getContracts = async () => {
4948
throw new Error("University is not supported yet");
5049
}
5150
const contracts = await getContractsForCoreType(hre, coreType);
52-
return { ...contracts, sortition: contracts.sortition as SortitionModule | SortitionModuleNeo };
51+
return { ...contracts, sortition: contracts.sortition as SortitionModule };
5352
};
5453

5554
type Contribution = {
@@ -277,9 +276,7 @@ const isRngReady = async () => {
277276
return true;
278277
}
279278
} else if (currentRng === blockHashRNG?.target && blockHashRNG !== null) {
280-
const requestBlock = await sortition.randomNumberRequestBlock();
281-
const lookahead = await sortition.rngLookahead();
282-
const n = await blockHashRNG.receiveRandomness.staticCall(requestBlock + lookahead);
279+
const n = await blockHashRNG.receiveRandomness.staticCall();
283280
if (Number(n) === 0) {
284281
logger.info("BlockHashRNG is NOT ready yet");
285282
return false;

contracts/scripts/keeperBotShutter.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import hre from "hardhat";
22
import { getBytes } from "ethers";
3-
import { DisputeKitGatedShutter, DisputeKitShutter, SortitionModule, SortitionModuleNeo } from "../typechain-types";
3+
import { DisputeKitGatedShutter, DisputeKitShutter } from "../typechain-types";
44
import { decrypt } from "./shutter";
55
import env from "./utils/env";
66
import loggerFactory from "./utils/logger";
@@ -312,8 +312,7 @@ const getContracts = async () => {
312312
if (coreType === Cores.UNIVERSITY) {
313313
throw new Error("University is not supported yet");
314314
}
315-
const contracts = await getContractsForCoreType(hre, coreType);
316-
return { ...contracts, sortition: contracts.sortition as SortitionModule | SortitionModuleNeo };
315+
return await getContractsForCoreType(hre, coreType);
317316
};
318317

319318
async function main() {

contracts/scripts/populateCourts.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { task, types } from "hardhat/config";
2-
import { KlerosCore, KlerosCoreNeo, KlerosCoreUniversity } from "../typechain-types";
2+
import { KlerosCore, KlerosCoreUniversity } from "../typechain-types";
33
import { BigNumberish, toBigInt, toNumber } from "ethers";
44
import courtsV1Mainnet from "../config/courts.v1.mainnet.json";
55
import courtsV1GnosisChain from "../config/courts.v1.gnosischain.json";
66
import courtsV2ArbitrumTestnet from "../config/courts.v2.testnet.json";
77
import courtsV2ArbitrumDevnet from "../config/courts.v2.devnet.json";
8-
import courtsV2MainnetNeo from "../config/courts.v2.mainnet-neo.json";
8+
import courtsV2Mainnet from "../config/courts.v2.mainnet.json";
99
import { isDevnet } from "../deploy/utils";
1010
import { execute, writeTransactionBatch } from "./utils/execution";
1111
import { getContracts, Cores } from "./utils/contracts";
@@ -21,7 +21,7 @@ enum Sources {
2121
V1_GNOSIS,
2222
V2_DEVNET,
2323
V2_TESTNET,
24-
V2_MAINNET_NEO,
24+
V2_MAINNET,
2525
}
2626

2727
type Court = {
@@ -43,7 +43,7 @@ const TEN_THOUSAND_GWEI = 10n ** 13n;
4343
task("populate:courts", "Populates the courts and their parameters")
4444
.addOptionalParam(
4545
"from",
46-
"The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo (default: auto depending on the network)",
46+
"The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet (default: auto depending on the network)",
4747
undefined
4848
)
4949
.addOptionalParam("start", "The starting index for the courts to populate (default: 0)", 0, types.int)
@@ -53,7 +53,7 @@ task("populate:courts", "Populates the courts and their parameters")
5353
undefined,
5454
types.int
5555
)
56-
.addOptionalParam("coreType", "The type of core to use between base, neo, university (default: base)", Cores.BASE)
56+
.addOptionalParam("coreType", "The type of core to use between base, university (default: base)", Cores.BASE)
5757
.addFlag("reverse", "Iterates the courts in reverse order, useful to increase minStake in the child courts first")
5858
.addFlag("forceV1ParametersToDev", "Use development values for the v1 courts parameters")
5959
.setAction(async (taskArgs, hre) => {
@@ -74,7 +74,7 @@ task("populate:courts", "Populates the courts and their parameters")
7474
if (taskArgs.from) {
7575
from = Sources[taskArgs.from.toUpperCase() as keyof typeof Sources];
7676
if (from === undefined) {
77-
console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo");
77+
console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet");
7878
return;
7979
}
8080
} else {
@@ -84,7 +84,7 @@ task("populate:courts", "Populates the courts and their parameters")
8484

8585
const coreType = Cores[taskArgs.coreType.toUpperCase() as keyof typeof Cores];
8686
if (coreType === undefined) {
87-
console.error("Invalid core type, must be one of base, neo, university");
87+
console.error("Invalid core type, must be one of base, university");
8888
return;
8989
}
9090
console.log("Using core type %s", coreType);
@@ -133,8 +133,8 @@ task("populate:courts", "Populates the courts and their parameters")
133133
courtsV2 = courtsV2ArbitrumTestnet;
134134
break;
135135
}
136-
case Sources.V2_MAINNET_NEO: {
137-
courtsV2 = courtsV2MainnetNeo;
136+
case Sources.V2_MAINNET: {
137+
courtsV2 = courtsV2Mainnet;
138138
break;
139139
}
140140
default:

contracts/scripts/populatePolicyRegistry.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import policiesV1Mainnet from "../config/policies.v1.mainnet.json";
44
import policiesV1GnosisChain from "../config/policies.v1.gnosischain.json";
55
import policiesV2ArbitrumTestnet from "../config/policies.v2.testnet.json";
66
import policiesV2ArbitrumDevnet from "../config/policies.v2.devnet.json";
7-
import policiesV2MainnetNeo from "../config/policies.v2.mainnet-neo.json";
7+
import policiesV2Mainnet from "../config/policies.v2.mainnet.json";
88
import { isDevnet } from "../deploy/utils";
99
import { execute, writeTransactionBatch } from "./utils/execution";
1010

@@ -19,13 +19,13 @@ enum Sources {
1919
V1_GNOSIS,
2020
V2_DEVNET,
2121
V2_TESTNET,
22-
V2_MAINNET_NEO,
22+
V2_MAINNET,
2323
}
2424

2525
task("populate:policy-registry", "Populates the policy registry for each court")
2626
.addOptionalParam(
2727
"from",
28-
"The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo (default: auto depending on the network)",
28+
"The source of the policies between v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet (default: auto depending on the network)",
2929
undefined
3030
)
3131
.addOptionalParam("start", "The starting index for the courts to populate (default: 0)", 0, types.int)
@@ -53,7 +53,7 @@ task("populate:policy-registry", "Populates the policy registry for each court")
5353
if (taskArgs.from) {
5454
from = Sources[taskArgs.from.toUpperCase() as keyof typeof Sources];
5555
if (from === undefined) {
56-
console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet_neo");
56+
console.error("Invalid source, must be one of v1_mainnet, v1_gnosis, v2_devnet, v2_testnet, v2_mainnet");
5757
return;
5858
}
5959
} else {
@@ -88,8 +88,8 @@ task("populate:policy-registry", "Populates the policy registry for each court")
8888
policiesV2 = policiesV2ArbitrumTestnet;
8989
break;
9090
}
91-
case Sources.V2_MAINNET_NEO: {
92-
policiesV2 = policiesV2MainnetNeo;
91+
case Sources.V2_MAINNET: {
92+
policiesV2 = policiesV2Mainnet;
9393
break;
9494
}
9595
default:

0 commit comments

Comments
 (0)