@@ -13,7 +13,7 @@ import {
1313 policyRegistryConfig as devnetPolicyRegistryConfig ,
1414 transactionBatcherConfig as devnetBatcherConfig ,
1515 chainlinkRngConfig as devnetChainlinkRngConfig ,
16- blockHashRngConfig as devnetBlockHashRngConfig ,
16+ rngWithFallbackConfig as devnetRngWithFallbackConfig ,
1717 pnkConfig as devnetPnkConfig ,
1818 klerosCoreSnapshotProxyConfig as devnetSnapshotProxyConfig ,
1919 klerosCoreUniversityConfig as devnetCoreUniversityConfig ,
@@ -35,7 +35,6 @@ import {
3535 policyRegistryConfig as testnetPolicyRegistryConfig ,
3636 transactionBatcherConfig as testnetBatcherConfig ,
3737 chainlinkRngConfig as testnetChainlinkRngConfig ,
38- blockHashRngConfig as testnetBlockHashRngConfig ,
3938 pnkConfig as testnetPnkConfig ,
4039 klerosCoreSnapshotProxyConfig as testnetSnapshotProxyConfig ,
4140} from "./testnet.viem" ;
@@ -53,7 +52,6 @@ import {
5352 transactionBatcherConfig as mainnetBatcherConfig ,
5453 chainlinkRngConfig as mainnetChainlinkRngConfig ,
5554 randomizerRngConfig as mainnetRandomizerRngConfig ,
56- blockHashRngConfig as mainnetBlockHashRngConfig ,
5755 pnkConfig as mainnetPnkConfig ,
5856 klerosCoreSnapshotProxyConfig as mainnetSnapshotProxyConfig ,
5957} from "./mainnet.viem" ;
@@ -84,7 +82,7 @@ type ContractInstances = {
8482 transactionBatcher : ContractInstance ;
8583 chainlinkRng ?: ContractInstance ;
8684 randomizerRng ?: ContractInstance ;
87- blockHashRng : ContractInstance ;
85+ rngWithFallback ? : ContractInstance ;
8886 pnk : ContractInstance ;
8987 klerosCoreSnapshotProxy : ContractInstance ;
9088} ;
@@ -106,7 +104,7 @@ function getCommonConfigs({
106104 evidence : ContractConfig ;
107105 policyRegistry : ContractConfig ;
108106 transactionBatcher : ContractConfig ;
109- blockHashRng : ContractConfig ;
107+ rngWithFallback ? : ContractConfig ;
110108 pnk : ContractConfig ;
111109 klerosCoreSnapshotProxy : ContractConfig ;
112110 chainlinkRng ?: ContractConfig ;
@@ -122,7 +120,6 @@ function getCommonConfigs({
122120 evidence : getContractConfig ( { config : configs . evidence , chainId } ) ,
123121 policyRegistry : getContractConfig ( { config : configs . policyRegistry , chainId } ) ,
124122 transactionBatcher : getContractConfig ( { config : configs . transactionBatcher , chainId } ) ,
125- blockHashRng : getContractConfig ( { config : configs . blockHashRng , chainId } ) ,
126123 pnk : getContractConfig ( { config : configs . pnk , chainId } ) ,
127124 klerosCoreSnapshotProxy : getContractConfig ( { config : configs . klerosCoreSnapshotProxy , chainId } ) ,
128125 } ;
@@ -137,6 +134,8 @@ function getCommonConfigs({
137134
138135 if ( configs . chainlinkRng ) base . chainlinkRng = getContractConfig ( { config : configs . chainlinkRng , chainId } ) ;
139136
137+ if ( configs . rngWithFallback ) base . rngWithFallback = getContractConfig ( { config : configs . rngWithFallback , chainId } ) ;
138+
140139 if ( configs . randomizerRng ) base . randomizerRng = getContractConfig ( { config : configs . randomizerRng , chainId } ) ;
141140
142141 return base ;
@@ -160,7 +159,7 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
160159 evidence : devnetEvidenceConfig ,
161160 policyRegistry : devnetPolicyRegistryConfig ,
162161 transactionBatcher : devnetBatcherConfig ,
163- blockHashRng : devnetBlockHashRngConfig ,
162+ rngWithFallback : devnetRngWithFallbackConfig ,
164163 pnk : devnetPnkConfig ,
165164 klerosCoreSnapshotProxy : devnetSnapshotProxyConfig ,
166165 chainlinkRng : devnetChainlinkRngConfig ,
@@ -177,7 +176,6 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
177176 evidence : getContractConfig ( { config : devnetEvidenceConfig , chainId } ) , // Not arbitrator specific
178177 policyRegistry : getContractConfig ( { config : devnetPolicyRegistryConfig , chainId } ) , // Not arbitrator specific
179178 transactionBatcher : getContractConfig ( { config : devnetBatcherConfig , chainId } ) , // Not arbitrator specific
180- blockHashRng : getContractConfig ( { config : devnetBlockHashRngConfig , chainId } ) , // Not used in university
181179 pnk : getContractConfig ( { config : devnetPnkConfig , chainId } ) , // Not arbitrator specific
182180 klerosCoreSnapshotProxy : getContractConfig ( { config : devnetSnapshotProxyConfig , chainId } ) , // Not used in university
183181 } ;
@@ -197,7 +195,6 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
197195 evidence : testnetEvidenceConfig ,
198196 policyRegistry : testnetPolicyRegistryConfig ,
199197 transactionBatcher : testnetBatcherConfig ,
200- blockHashRng : testnetBlockHashRngConfig ,
201198 pnk : testnetPnkConfig ,
202199 klerosCoreSnapshotProxy : testnetSnapshotProxyConfig ,
203200 chainlinkRng : testnetChainlinkRngConfig ,
@@ -219,7 +216,6 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
219216 evidence : mainnetEvidenceConfig ,
220217 policyRegistry : mainnetPolicyRegistryConfig ,
221218 transactionBatcher : mainnetBatcherConfig ,
222- blockHashRng : mainnetBlockHashRngConfig ,
223219 pnk : mainnetPnkConfig ,
224220 klerosCoreSnapshotProxy : mainnetSnapshotProxyConfig ,
225221 chainlinkRng : mainnetChainlinkRngConfig ,
@@ -310,10 +306,12 @@ export const getContracts = ({
310306 ...clientConfig ,
311307 } )
312308 : undefined ;
313- const blockHashRng = getContract ( {
314- ...contractConfigs . blockHashRng ,
315- ...clientConfig ,
316- } ) ;
309+ const rngWithFallback = contractConfigs . rngWithFallback
310+ ? getContract ( {
311+ ...contractConfigs . rngWithFallback ,
312+ ...clientConfig ,
313+ } )
314+ : undefined ;
317315 const pnk = getContract ( {
318316 ...contractConfigs . pnk ,
319317 ...clientConfig ,
@@ -336,7 +334,7 @@ export const getContracts = ({
336334 transactionBatcher,
337335 chainlinkRng,
338336 randomizerRng,
339- blockHashRng ,
337+ rngWithFallback ,
340338 pnk,
341339 klerosCoreSnapshotProxy,
342340 } ;
0 commit comments