@@ -52,12 +52,16 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
5252 randomizerByChain . set ( HomeChains [ HomeChains [ chainId ] ] , randomizerMock . address ) ;
5353 }
5454
55- await deployUpgradable ( hre , deployer , "PolicyRegistry" , [ deployer ] ) ;
55+ await deployUpgradable ( hre , "PolicyRegistry" , { from : deployer , args : [ deployer ] , log : true } ) ;
5656
5757 const randomizer = randomizerByChain . get ( Number ( await getChainId ( ) ) ) ?? AddressZero ;
58- const rng = await deployUpgradable ( hre , deployer , "RandomizerRNG" , [ randomizer , deployer ] ) ;
58+ const rng = await deployUpgradable ( hre , "RandomizerRNG" , { from : deployer , args : [ randomizer , deployer ] , log : true } ) ;
5959
60- const disputeKit = await deployUpgradable ( hre , deployer , "DisputeKitClassic" , [ deployer , AddressZero ] ) ;
60+ const disputeKit = await deployUpgradable ( hre , "DisputeKitClassic" , {
61+ from : deployer ,
62+ args : [ deployer , AddressZero ] ,
63+ log : true ,
64+ } ) ;
6165
6266 let klerosCoreAddress = await deployments . getOrNull ( "KlerosCore" ) . then ( ( deployment ) => deployment ?. address ) ;
6367 if ( ! klerosCoreAddress ) {
@@ -66,32 +70,40 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
6670 console . log ( "calculated future KlerosCore address for nonce %d: %s" , nonce + 3 , klerosCoreAddress ) ;
6771 }
6872
69- const sortitionModule = await deployUpgradable ( hre , deployer , "SortitionModule" , [
70- deployer ,
71- klerosCoreAddress ,
72- 1800 , // minStakingTime
73- 1800 , // maxFreezingTime
74- rng . address ,
75- RNG_LOOKAHEAD ,
76- ] ) ; // nonce (implementation), nonce+1 (proxy)
73+ const sortitionModule = await deployUpgradable ( hre , "SortitionModule" , {
74+ from : deployer ,
75+ args : [
76+ deployer ,
77+ klerosCoreAddress ,
78+ 1800 , // minStakingTime
79+ 1800 , // maxFreezingTime
80+ rng . address ,
81+ RNG_LOOKAHEAD ,
82+ ] ,
83+ log : true ,
84+ } ) ; // nonce (implementation), nonce+1 (proxy)
7785
7886 const pnk = pnkByChain . get ( chainId ) ?? AddressZero ;
7987 const dai = daiByChain . get ( chainId ) ?? AddressZero ;
8088 const weth = wethByChain . get ( chainId ) ?? AddressZero ;
8189 const minStake = BigNumber . from ( 10 ) . pow ( 20 ) . mul ( 2 ) ;
8290 const alpha = 10000 ;
8391 const feeForJuror = BigNumber . from ( 10 ) . pow ( 17 ) ;
84- const klerosCore = await deployUpgradable ( hre , deployer , "KlerosCore" , [
85- deployer ,
86- pnk ,
87- AddressZero ,
88- disputeKit . address ,
89- false ,
90- [ minStake , alpha , feeForJuror , 256 ] , // minStake, alpha, feeForJuror, jurorsForCourtJump
91- [ 0 , 0 , 0 , 10 ] , // evidencePeriod, commitPeriod, votePeriod, appealPeriod
92- ethers . utils . hexlify ( 5 ) , // Extra data for sortition module will return the default value of K
93- sortitionModule . address ,
94- ] ) ; // nonce+2 (implementation), nonce+3 (proxy)
92+ const klerosCore = await deployUpgradable ( hre , "KlerosCore" , {
93+ from : deployer ,
94+ args : [
95+ deployer ,
96+ pnk ,
97+ AddressZero ,
98+ disputeKit . address ,
99+ false ,
100+ [ minStake , alpha , feeForJuror , 256 ] , // minStake, alpha, feeForJuror, jurorsForCourtJump
101+ [ 0 , 0 , 0 , 10 ] , // evidencePeriod, commitPeriod, votePeriod, appealPeriod
102+ ethers . utils . hexlify ( 5 ) , // Extra data for sortition module will return the default value of K
103+ sortitionModule . address ,
104+ ] ,
105+ log : true ,
106+ } ) ; // nonce+2 (implementation), nonce+3 (proxy)
95107
96108 // execute DisputeKitClassic.changeCore() only if necessary
97109 const currentCore = await hre . ethers . getContractAt ( "DisputeKitClassic" , disputeKit . address ) . then ( ( dk ) => dk . core ( ) ) ;
0 commit comments