File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import "hardhat-deploy";
10
10
import "hardhat-deploy-ethers" ;
11
11
import "hardhat-watcher" ;
12
12
import "hardhat-docgen" ;
13
+ require ( "./scripts/setDisputeTemplate" ) ;
13
14
// import "hardhat-contract-sizer"; // prevents hardhat-deploy from finding chalk...
14
15
// import "hardhat-tracer"; // prevents hardhat-deploy from finding chalk...
15
16
Original file line number Diff line number Diff line change
1
+ import { task } from "hardhat/config" ;
2
+ import { CurateV2 } from "../typechain-types" ;
3
+ import { registrationTemplate , removalTemplate , dataMappings } from "@kleros/curate-v2-templates" ;
4
+
5
+ // WARNING: The Devnet values are hardcoded!
6
+ // It needs to be refactored like in the Escrow: https://github.com/kleros/escrow-v2/blob/master/contracts/scripts/setDisputeTemplate.ts
7
+
8
+ task ( "setDisputeTemplate" , "Sets the dispute template" ) . setAction ( async ( args , hre ) => {
9
+ const { ethers } = hre ;
10
+ const curate = ( await ethers . getContract ( "CurateV2" ) ) as CurateV2 ;
11
+ await curate . changeRegistrationDisputeTemplate ( registrationTemplate , dataMappings ) . then ( ( tx ) => tx . wait ( ) ) ;
12
+ await curate . changeRemovalDisputeTemplate ( removalTemplate , dataMappings ) . then ( ( tx ) => tx . wait ( ) ) ;
13
+ } ) ;
Original file line number Diff line number Diff line change
1
+ // WARNING: The Devnet values are hardcoded,
2
+ // It needs to be refactored like in the Escrow: https://github.com/kleros/escrow-v2/blob/master/contracts/scripts/setDisputeTemplate.ts
3
+
1
4
const sharedTemplateProperties = `
2
5
"policyURI": "{{{policyURI}}}",
3
6
"frontendUrl": "https://curate-v2.kleros.builders/#/lists/item/{{itemID}}",
You can’t perform that action at this time.
0 commit comments