Skip to content
Prev Previous commit
Next Next commit
chore: artifacts updated, BlockhashRNG removed, scripts updated
  • Loading branch information
jaybuidl committed Nov 5, 2025
commit 87d2a708882de15a48a791963ac49956a578811a
12,080 changes: 5,840 additions & 6,240 deletions contracts/deployments/arbitrumSepoliaDevnet.ts

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions contracts/deployments/contractsEthers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
policyRegistryConfig as devnetPolicyRegistryConfig,
transactionBatcherConfig as devnetBatcherConfig,
chainlinkRngConfig as devnetChainlinkRngConfig,
blockHashRngConfig as devnetBlockHashRngConfig,
rngWithFallbackConfig as devnetRngWithFallbackConfig,
pnkConfig as devnetPnkConfig,
klerosCoreSnapshotProxyConfig as devnetSnapshotProxyConfig,
klerosCoreUniversityConfig as devnetCoreUniversityConfig,
Expand All @@ -34,7 +34,6 @@ import {
policyRegistryConfig as testnetPolicyRegistryConfig,
transactionBatcherConfig as testnetBatcherConfig,
chainlinkRngConfig as testnetChainlinkRngConfig,
blockHashRngConfig as testnetBlockHashRngConfig,
pnkConfig as testnetPnkConfig,
klerosCoreSnapshotProxyConfig as testnetSnapshotProxyConfig,
} from "./testnet.viem";
Expand All @@ -52,7 +51,6 @@ import {
transactionBatcherConfig as mainnetBatcherConfig,
chainlinkRngConfig as mainnetChainlinkRngConfig,
randomizerRngConfig as mainnetRandomizerRngConfig,
blockHashRngConfig as mainnetBlockHashRngConfig,
pnkConfig as mainnetPnkConfig,
klerosCoreSnapshotProxyConfig as mainnetSnapshotProxyConfig,
} from "./mainnet.viem";
Expand Down Expand Up @@ -83,8 +81,8 @@ import {
ChainlinkRNG__factory,
RandomizerRNG,
RandomizerRNG__factory,
BlockHashRNG,
BlockHashRNG__factory,
RNGWithFallback,
RNGWithFallback__factory,
PNK,
PNK__factory,
KlerosCoreSnapshotProxy,
Expand All @@ -108,7 +106,7 @@ type CommonFactoriesConfigs = {
batcherConfig: ContractConfig;
chainlinkRngConfig?: ContractConfig;
randomizerRngConfig?: ContractConfig;
blockHashRngConfig: ContractConfig;
rngWithFallbackConfig?: ContractConfig;
pnkConfig: ContractConfig;
snapshotProxyConfig: ContractConfig;
};
Expand All @@ -125,7 +123,7 @@ type CommonFactories = {
transactionBatcher: TransactionBatcher;
chainlinkRng: ChainlinkRNG | null;
randomizerRng: RandomizerRNG | null;
blockHashRng: BlockHashRNG;
rngWithFallback: RNGWithFallback | null;
pnk: PNK;
klerosCoreSnapshotProxy: KlerosCoreSnapshotProxy;
};
Expand Down Expand Up @@ -157,7 +155,9 @@ function getCommonFactories(
randomizerRng: configs.randomizerRngConfig
? RandomizerRNG__factory.connect(getAddress(configs.randomizerRngConfig, chainId), provider)
: null,
blockHashRng: BlockHashRNG__factory.connect(getAddress(configs.blockHashRngConfig, chainId), provider),
rngWithFallback: configs.rngWithFallbackConfig
? RNGWithFallback__factory.connect(getAddress(configs.rngWithFallbackConfig, chainId), provider)
: null,
pnk: PNK__factory.connect(getAddress(configs.pnkConfig, chainId), provider),
klerosCoreSnapshotProxy: KlerosCoreSnapshotProxy__factory.connect(
getAddress(configs.snapshotProxyConfig, chainId),
Expand Down Expand Up @@ -188,7 +188,7 @@ export const getContracts = async (provider: ethers.Provider, deployment: Deploy
policyRegistryConfig: devnetPolicyRegistryConfig,
batcherConfig: devnetBatcherConfig,
chainlinkRngConfig: devnetChainlinkRngConfig,
blockHashRngConfig: devnetBlockHashRngConfig,
rngWithFallbackConfig: devnetRngWithFallbackConfig,
pnkConfig: devnetPnkConfig,
snapshotProxyConfig: devnetSnapshotProxyConfig,
},
Expand All @@ -212,7 +212,6 @@ export const getContracts = async (provider: ethers.Provider, deployment: Deploy
policyRegistryConfig: devnetPolicyRegistryConfig,
batcherConfig: devnetBatcherConfig,
chainlinkRngConfig: devnetChainlinkRngConfig,
blockHashRngConfig: devnetBlockHashRngConfig,
pnkConfig: devnetPnkConfig,
snapshotProxyConfig: devnetSnapshotProxyConfig,
},
Expand All @@ -236,7 +235,6 @@ export const getContracts = async (provider: ethers.Provider, deployment: Deploy
policyRegistryConfig: testnetPolicyRegistryConfig,
batcherConfig: testnetBatcherConfig,
chainlinkRngConfig: testnetChainlinkRngConfig,
blockHashRngConfig: testnetBlockHashRngConfig,
pnkConfig: testnetPnkConfig,
snapshotProxyConfig: testnetSnapshotProxyConfig,
},
Expand All @@ -260,7 +258,6 @@ export const getContracts = async (provider: ethers.Provider, deployment: Deploy
batcherConfig: mainnetBatcherConfig,
chainlinkRngConfig: mainnetChainlinkRngConfig,
randomizerRngConfig: mainnetRandomizerRngConfig,
blockHashRngConfig: mainnetBlockHashRngConfig,
pnkConfig: mainnetPnkConfig,
snapshotProxyConfig: mainnetSnapshotProxyConfig,
},
Expand Down
28 changes: 13 additions & 15 deletions contracts/deployments/contractsViem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
policyRegistryConfig as devnetPolicyRegistryConfig,
transactionBatcherConfig as devnetBatcherConfig,
chainlinkRngConfig as devnetChainlinkRngConfig,
blockHashRngConfig as devnetBlockHashRngConfig,
rngWithFallbackConfig as devnetRngWithFallbackConfig,
pnkConfig as devnetPnkConfig,
klerosCoreSnapshotProxyConfig as devnetSnapshotProxyConfig,
klerosCoreUniversityConfig as devnetCoreUniversityConfig,
Expand All @@ -35,7 +35,6 @@ import {
policyRegistryConfig as testnetPolicyRegistryConfig,
transactionBatcherConfig as testnetBatcherConfig,
chainlinkRngConfig as testnetChainlinkRngConfig,
blockHashRngConfig as testnetBlockHashRngConfig,
pnkConfig as testnetPnkConfig,
klerosCoreSnapshotProxyConfig as testnetSnapshotProxyConfig,
} from "./testnet.viem";
Expand All @@ -53,7 +52,6 @@ import {
transactionBatcherConfig as mainnetBatcherConfig,
chainlinkRngConfig as mainnetChainlinkRngConfig,
randomizerRngConfig as mainnetRandomizerRngConfig,
blockHashRngConfig as mainnetBlockHashRngConfig,
pnkConfig as mainnetPnkConfig,
klerosCoreSnapshotProxyConfig as mainnetSnapshotProxyConfig,
} from "./mainnet.viem";
Expand Down Expand Up @@ -84,7 +82,7 @@ type ContractInstances = {
transactionBatcher: ContractInstance;
chainlinkRng?: ContractInstance;
randomizerRng?: ContractInstance;
blockHashRng: ContractInstance;
rngWithFallback?: ContractInstance;
pnk: ContractInstance;
klerosCoreSnapshotProxy: ContractInstance;
};
Expand All @@ -106,7 +104,7 @@ function getCommonConfigs({
evidence: ContractConfig;
policyRegistry: ContractConfig;
transactionBatcher: ContractConfig;
blockHashRng: ContractConfig;
rngWithFallback?: ContractConfig;
pnk: ContractConfig;
klerosCoreSnapshotProxy: ContractConfig;
chainlinkRng?: ContractConfig;
Expand All @@ -122,7 +120,6 @@ function getCommonConfigs({
evidence: getContractConfig({ config: configs.evidence, chainId }),
policyRegistry: getContractConfig({ config: configs.policyRegistry, chainId }),
transactionBatcher: getContractConfig({ config: configs.transactionBatcher, chainId }),
blockHashRng: getContractConfig({ config: configs.blockHashRng, chainId }),
pnk: getContractConfig({ config: configs.pnk, chainId }),
klerosCoreSnapshotProxy: getContractConfig({ config: configs.klerosCoreSnapshotProxy, chainId }),
};
Expand All @@ -137,6 +134,8 @@ function getCommonConfigs({

if (configs.chainlinkRng) base.chainlinkRng = getContractConfig({ config: configs.chainlinkRng, chainId });

if (configs.rngWithFallback) base.rngWithFallback = getContractConfig({ config: configs.rngWithFallback, chainId });

if (configs.randomizerRng) base.randomizerRng = getContractConfig({ config: configs.randomizerRng, chainId });

return base;
Expand All @@ -160,7 +159,7 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
evidence: devnetEvidenceConfig,
policyRegistry: devnetPolicyRegistryConfig,
transactionBatcher: devnetBatcherConfig,
blockHashRng: devnetBlockHashRngConfig,
rngWithFallback: devnetRngWithFallbackConfig,
pnk: devnetPnkConfig,
klerosCoreSnapshotProxy: devnetSnapshotProxyConfig,
chainlinkRng: devnetChainlinkRngConfig,
Expand All @@ -177,7 +176,6 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
evidence: getContractConfig({ config: devnetEvidenceConfig, chainId }), // Not arbitrator specific
policyRegistry: getContractConfig({ config: devnetPolicyRegistryConfig, chainId }), // Not arbitrator specific
transactionBatcher: getContractConfig({ config: devnetBatcherConfig, chainId }), // Not arbitrator specific
blockHashRng: getContractConfig({ config: devnetBlockHashRngConfig, chainId }), // Not used in university
pnk: getContractConfig({ config: devnetPnkConfig, chainId }), // Not arbitrator specific
klerosCoreSnapshotProxy: getContractConfig({ config: devnetSnapshotProxyConfig, chainId }), // Not used in university
};
Expand All @@ -197,7 +195,6 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
evidence: testnetEvidenceConfig,
policyRegistry: testnetPolicyRegistryConfig,
transactionBatcher: testnetBatcherConfig,
blockHashRng: testnetBlockHashRngConfig,
pnk: testnetPnkConfig,
klerosCoreSnapshotProxy: testnetSnapshotProxyConfig,
chainlinkRng: testnetChainlinkRngConfig,
Expand All @@ -219,7 +216,6 @@ export const getConfigs = ({ deployment }: { deployment: DeploymentName }): Cont
evidence: mainnetEvidenceConfig,
policyRegistry: mainnetPolicyRegistryConfig,
transactionBatcher: mainnetBatcherConfig,
blockHashRng: mainnetBlockHashRngConfig,
pnk: mainnetPnkConfig,
klerosCoreSnapshotProxy: mainnetSnapshotProxyConfig,
chainlinkRng: mainnetChainlinkRngConfig,
Expand Down Expand Up @@ -310,10 +306,12 @@ export const getContracts = ({
...clientConfig,
})
: undefined;
const blockHashRng = getContract({
...contractConfigs.blockHashRng,
...clientConfig,
});
const rngWithFallback = contractConfigs.rngWithFallback
? getContract({
...contractConfigs.rngWithFallback,
...clientConfig,
})
: undefined;
const pnk = getContract({
...contractConfigs.pnk,
...clientConfig,
Expand All @@ -336,7 +334,7 @@ export const getContracts = ({
transactionBatcher,
chainlinkRng,
randomizerRng,
blockHashRng,
rngWithFallback,
pnk,
klerosCoreSnapshotProxy,
};
Expand Down
Loading
Loading