From a56ed7114b197b694e69a3daac76413246d0eae2 Mon Sep 17 00:00:00 2001 From: Piotr Dyraga Date: Thu, 22 Sep 2022 14:30:24 +0200 Subject: [PATCH] Deactivate chaosnet for random beacon contract unit tests --- solidity/random-beacon/test/BeaconDkgValidator.test.ts | 2 ++ solidity/random-beacon/test/fixtures/index.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/solidity/random-beacon/test/BeaconDkgValidator.test.ts b/solidity/random-beacon/test/BeaconDkgValidator.test.ts index fc21175cb2..8a33b32cc8 100644 --- a/solidity/random-beacon/test/BeaconDkgValidator.test.ts +++ b/solidity/random-beacon/test/BeaconDkgValidator.test.ts @@ -42,6 +42,8 @@ const fixture = async () => { constants.poolWeightDivisor )) as SortitionPool + await sortitionPool.deactivateChaosnet() + const DKGValidator = await ethers.getContractFactory("BeaconDkgValidator") const dkgValidator = (await DKGValidator.deploy( sortitionPool.address diff --git a/solidity/random-beacon/test/fixtures/index.ts b/solidity/random-beacon/test/fixtures/index.ts index 3016eaa2de..c35518a990 100644 --- a/solidity/random-beacon/test/fixtures/index.ts +++ b/solidity/random-beacon/test/fixtures/index.ts @@ -80,7 +80,7 @@ export async function randomBeaconDeployment(): Promise { const staking: TokenStaking = await helpers.contracts.getContract("TokenStaking") - const { deployer } = await helpers.signers.getNamedSigners() + const { deployer, chaosnetOwner } = await helpers.signers.getNamedSigners() const sortitionPool: SortitionPool = await helpers.contracts.getContract( "BeaconSortitionPool" @@ -103,6 +103,8 @@ export async function randomBeaconDeployment(): Promise { await updateTokenStakingParams(t, staking, deployer) await setFixtureParameters(randomBeacon) + await sortitionPool.connect(chaosnetOwner).deactivateChaosnet() + const contracts: DeployedContracts = { sortitionPool, staking,