Skip to content

Commit

Permalink
Deactivate chaosnet for random beacon contract unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pdyraga committed Sep 22, 2022
1 parent 2b11100 commit a56ed71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions solidity/random-beacon/test/BeaconDkgValidator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion solidity/random-beacon/test/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export async function randomBeaconDeployment(): Promise<DeployedContracts> {
const staking: TokenStaking =
await helpers.contracts.getContract<TokenStaking>("TokenStaking")

const { deployer } = await helpers.signers.getNamedSigners()
const { deployer, chaosnetOwner } = await helpers.signers.getNamedSigners()

const sortitionPool: SortitionPool = await helpers.contracts.getContract(
"BeaconSortitionPool"
Expand All @@ -103,6 +103,8 @@ export async function randomBeaconDeployment(): Promise<DeployedContracts> {
await updateTokenStakingParams(t, staking, deployer)
await setFixtureParameters(randomBeacon)

await sortitionPool.connect(chaosnetOwner).deactivateChaosnet()

const contracts: DeployedContracts = {
sortitionPool,
staking,
Expand Down

0 comments on commit a56ed71

Please sign in to comment.