Skip to content

Commit 9d31252

Browse files
committed
chore: dynamically retrieve the disputeKitID in the deployment script
1 parent e6114ba commit 9d31252

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,29 +123,29 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
123123
await core.changeArbitrableWhitelist(resolver.address, true);
124124

125125
// Extra dispute kits
126-
const disputeKitShutterID = 2;
127126
const disputeKitShutter = await deployUpgradable(deployments, "DisputeKitShutter", {
128127
from: deployer,
129128
args: [deployer, core.target, weth.target, classicDisputeKitID],
130129
log: true,
131130
});
132131
await core.addNewDisputeKit(disputeKitShutter.address);
132+
const disputeKitShutterID = Number(await core.getDisputeKitsLength());
133133

134-
const disputeKitGatedID = 3;
135134
const disputeKitGated = await deployUpgradable(deployments, "DisputeKitGated", {
136135
from: deployer,
137136
args: [deployer, core.target, weth.target, classicDisputeKitID],
138137
log: true,
139138
});
140139
await core.addNewDisputeKit(disputeKitGated.address);
140+
const disputeKitGatedID = Number(await core.getDisputeKitsLength());
141141

142-
const disputeKitGatedShutterID = 4;
143142
const disputeKitGatedShutter = await deployUpgradable(deployments, "DisputeKitGatedShutter", {
144143
from: deployer,
145144
args: [deployer, core.target, weth.target, disputeKitShutterID], // Does not jump to DKClassic
146145
log: true,
147146
});
148147
await core.addNewDisputeKit(disputeKitGatedShutter.address);
148+
const disputeKitGatedShutterID = Number(await core.getDisputeKitsLength());
149149

150150
// Snapshot proxy
151151
await deploy("KlerosCoreSnapshotProxy", {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,31 +104,31 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
104104
}
105105

106106
// Extra dispute kits
107-
const disputeKitShutterID = 2;
108107
const disputeKitShutter = await deployUpgradable(deployments, "DisputeKitShutter", {
109108
from: deployer,
110109
args: [deployer, core.target, weth.target, classicDisputeKitID],
111110
log: true,
112111
});
113112
await core.addNewDisputeKit(disputeKitShutter.address);
113+
const disputeKitShutterID = Number(await core.getDisputeKitsLength());
114114
await core.enableDisputeKits(Courts.GENERAL, [disputeKitShutterID], true); // enable disputeKitShutter on the General Court
115115

116-
const disputeKitGatedID = 3;
117116
const disputeKitGated = await deployUpgradable(deployments, "DisputeKitGated", {
118117
from: deployer,
119118
args: [deployer, core.target, weth.target, classicDisputeKitID],
120119
log: true,
121120
});
122121
await core.addNewDisputeKit(disputeKitGated.address);
122+
const disputeKitGatedID = Number(await core.getDisputeKitsLength());
123123
await core.enableDisputeKits(Courts.GENERAL, [disputeKitGatedID], true); // enable disputeKitGated on the General Court
124124

125-
const disputeKitGatedShutterID = 4;
126125
const disputeKitGatedShutter = await deployUpgradable(deployments, "DisputeKitGatedShutter", {
127126
from: deployer,
128127
args: [deployer, core.target, weth.target, disputeKitShutterID], // Does not jump to DKClassic
129128
log: true,
130129
});
131130
await core.addNewDisputeKit(disputeKitGatedShutter.address);
131+
const disputeKitGatedShutterID = Number(await core.getDisputeKitsLength());
132132
await core.enableDisputeKits(Courts.GENERAL, [disputeKitGatedShutterID], true); // enable disputeKitGatedShutter on the General Court
133133

134134
// Snapshot proxy

0 commit comments

Comments
 (0)