Skip to content

Commit 49e6bf6

Browse files
committed
Dedicated operator contract stub for DKG result submission tests
Mistakenly ommitted in the previous commit.
1 parent 1ec1ea8 commit 49e6bf6

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
pragma solidity 0.5.17;
2+
3+
import "../KeepRandomBeaconOperator.sol";
4+
5+
6+
contract KeepRandomBeaconOperatorDKGResultStub is KeepRandomBeaconOperator {
7+
constructor(address _serviceContract, address _stakingContract)
8+
public
9+
KeepRandomBeaconOperator(_serviceContract, _stakingContract)
10+
{
11+
groupSelection.ticketSubmissionTimeout = 100;
12+
}
13+
14+
function setGroupSize(uint256 size) public {
15+
groupSize = size;
16+
groupSelection.groupSize = size;
17+
dkgResultVerification.groupSize = size;
18+
}
19+
20+
function setGroupThreshold(uint256 threshold) public {
21+
groupThreshold = threshold;
22+
dkgResultVerification.signatureThreshold = threshold;
23+
}
24+
25+
function setDKGResultSignatureThreshold(uint256 threshold) public {
26+
dkgResultVerification.signatureThreshold = threshold;
27+
}
28+
29+
function setResultPublicationBlockStep(uint256 step) public {
30+
resultPublicationBlockStep = step;
31+
}
32+
33+
function getGroupSelectionRelayEntry() public view returns (uint256) {
34+
return groupSelection.seed;
35+
}
36+
37+
function getTicketSubmissionStartBlock() public view returns (uint256) {
38+
return groupSelection.ticketSubmissionStartBlock;
39+
}
40+
41+
function isGroupSelectionInProgress() public view returns (bool) {
42+
return groupSelection.inProgress;
43+
}
44+
45+
function setGasPriceCeiling(uint256 _gasPriceCeiling) public {
46+
gasPriceCeiling = _gasPriceCeiling;
47+
}
48+
49+
function timeDKG() public view returns (uint256) {
50+
return dkgResultVerification.timeDKG;
51+
}
52+
}

0 commit comments

Comments
 (0)