Skip to content

Commit 62b0a50

Browse files
committed
fix: deploy script
1 parent d794975 commit 62b0a50

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
@@ -129,23 +129,23 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
129129
log: true,
130130
});
131131
await core.addNewDisputeKit(disputeKitShutter.address);
132-
const disputeKitShutterID = Number(await core.getDisputeKitsLength());
132+
const disputeKitShutterID = (await core.getDisputeKitsLength()) - 1n;
133133

134134
const disputeKitGated = await deployUpgradable(deployments, "DisputeKitGated", {
135135
from: deployer,
136136
args: [deployer, core.target, weth.target, classicDisputeKitID],
137137
log: true,
138138
});
139139
await core.addNewDisputeKit(disputeKitGated.address);
140-
const disputeKitGatedID = Number(await core.getDisputeKitsLength());
140+
const disputeKitGatedID = (await core.getDisputeKitsLength()) - 1n;
141141

142142
const disputeKitGatedShutter = await deployUpgradable(deployments, "DisputeKitGatedShutter", {
143143
from: deployer,
144144
args: [deployer, core.target, weth.target, disputeKitShutterID], // Does not jump to DKClassic
145145
log: true,
146146
});
147147
await core.addNewDisputeKit(disputeKitGatedShutter.address);
148-
const disputeKitGatedShutterID = Number(await core.getDisputeKitsLength());
148+
const disputeKitGatedShutterID = (await core.getDisputeKitsLength()) - 1n;
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
@@ -110,7 +110,7 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
110110
log: true,
111111
});
112112
await core.addNewDisputeKit(disputeKitShutter.address);
113-
const disputeKitShutterID = Number(await core.getDisputeKitsLength());
113+
const disputeKitShutterID = (await core.getDisputeKitsLength()) - 1n;
114114
await core.enableDisputeKits(Courts.GENERAL, [disputeKitShutterID], true); // enable disputeKitShutter on the General Court
115115

116116
const disputeKitGated = await deployUpgradable(deployments, "DisputeKitGated", {
@@ -119,7 +119,7 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
119119
log: true,
120120
});
121121
await core.addNewDisputeKit(disputeKitGated.address);
122-
const disputeKitGatedID = Number(await core.getDisputeKitsLength());
122+
const disputeKitGatedID = (await core.getDisputeKitsLength()) - 1n;
123123
await core.enableDisputeKits(Courts.GENERAL, [disputeKitGatedID], true); // enable disputeKitGated on the General Court
124124

125125
const disputeKitGatedShutter = await deployUpgradable(deployments, "DisputeKitGatedShutter", {
@@ -128,7 +128,7 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
128128
log: true,
129129
});
130130
await core.addNewDisputeKit(disputeKitGatedShutter.address);
131-
const disputeKitGatedShutterID = Number(await core.getDisputeKitsLength());
131+
const disputeKitGatedShutterID = (await core.getDisputeKitsLength()) - 1n;
132132
await core.enableDisputeKits(Courts.GENERAL, [disputeKitGatedShutterID], true); // enable disputeKitGatedShutter on the General Court
133133

134134
// Snapshot proxy

0 commit comments

Comments
 (0)