Skip to content

Commit 0d6921f

Browse files
committed
Merge branch 'dev'
2 parents e8e96b9 + 4ba7b94 commit 0d6921f

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

contracts/hardhat.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ require("./scripts/populateCourts");
1818
require("./scripts/changeGovernor");
1919
require("./scripts/getDisputeTemplate");
2020
require("./scripts/compareStorageLayout");
21+
require("./scripts/storage-layout");
2122

2223
dotenv.config();
2324

contracts/scripts/changeGovernor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ task("change-governor", "Changes the governor for all the contracts")
4141
chainlinkRng,
4242
randomizerRng,
4343
snapshotProxy,
44+
sortition,
45+
evidence,
4446
} = await getContracts(hre, coreType);
4547

4648
const updateGovernor = async (contractName: string, contractInstance: any) => {
@@ -60,16 +62,14 @@ task("change-governor", "Changes the governor for all the contracts")
6062
}
6163
};
6264

63-
// TODO: upgrade and add changeGovernor!
64-
// await updateGovernor("SortitionModule", sortition)
65-
// await updateGovernor("EvidenceModule", evidence)
66-
6765
await updateGovernor("KlerosCore", core);
6866
await updateGovernor("DisputeKitClassic", disputeKitClassic);
6967
await updateGovernor("DisputeResolver", disputeResolver);
7068
await updateGovernor("DisputeTemplateRegistry", disputeTemplateRegistry);
7169
await updateGovernor("PolicyRegistry", policyRegistry);
7270
await updateGovernor("KlerosCoreSnapshotProxy", snapshotProxy);
71+
await updateGovernor("SortitionModule", sortition);
72+
await updateGovernor("EvidenceModule", evidence);
7373
if (chainlinkRng) await updateGovernor("ChainlinkRNG", chainlinkRng);
7474
if (randomizerRng) await updateGovernor("RandomizerRNG", randomizerRng);
7575

contracts/scripts/storage-layout.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { task } from "hardhat/config";
2+
import { HardhatRuntimeEnvironment } from "hardhat/types";
3+
4+
task("storage-layout", "Prints the storage layout of a contract").setAction(
5+
async ({}, hre: HardhatRuntimeEnvironment) => {
6+
await hre.run("compile");
7+
const buildInfo = await hre.artifacts.getBuildInfo(
8+
`src/arbitration/dispute-kits/DisputeKitClassic.sol:DisputeKitClassic`
9+
);
10+
console.log(
11+
buildInfo.output.contracts["src/arbitration/dispute-kits/DisputeKitClassic.sol"]["DisputeKitClassic"]
12+
.storageLayout
13+
);
14+
}
15+
);

web/src/pages/Resolver/Landing/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ const Landing: React.FC = () => {
8686
if (isUndefined(populatedDispute) || isUndefined(roundData) || isInvalidDispute) return;
8787

8888
const answers = populatedDispute.answers.reduce<Answer[]>((acc, val) => {
89-
acc.push({ ...val, id: parseInt(val.id, 16).toString() });
89+
const id = parseInt(val.id, 16);
90+
// don't duplicate RFA option
91+
if (id === 0) return acc;
92+
acc.push({ ...val, id: id.toString() });
9093
return acc;
9194
}, []);
9295

0 commit comments

Comments
 (0)