Skip to content

Commit

Permalink
crossposting helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Sep 13, 2024
1 parent c1fef1b commit be15a8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/contracts/core/StakeRootCompendium.sol
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ contract StakeRootCompendium is StakeRootCompendiumStorage {
return stakeRootSubmissions[index];
}

/// @inheritdoc IStakeRootCompendium
function getNumStakeRootSubmissions() external view returns (uint256) {
return stakeRootSubmissions.length;
}

/// @inheritdoc IStakeRootCompendium
function getOperatorSetIndexAtTimestamp(
IAVSDirectory.OperatorSet calldata operatorSet,
Expand Down Expand Up @@ -432,6 +437,7 @@ contract StakeRootCompendium is StakeRootCompendiumStorage {
calculationTimestamp: calculationTimestamp,
blacklistableBefore: uint32(block.timestamp) + blacklistWindow,
blacklisted: false,
crossPosted: false,
forcePosted: forcePosted
})
);
Expand Down
4 changes: 4 additions & 0 deletions src/contracts/interfaces/IStakeRootCompendium.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ interface IStakeRootCompendium {
uint32 calculationTimestamp; // the timestamp the was generated against
uint32 blacklistableBefore; // the timestamp the proof submission was submitted to the contract
bool blacklisted; // whether the submission has been blacklisted by governance
bool crossPosted;
bool forcePosted; // whether the submission was posted without proof by governance
}

Expand All @@ -55,6 +56,9 @@ interface IStakeRootCompendium {
/// @notice the number of operator sets in the StakeTree
function getNumOperatorSets() external view returns (uint256);

/// @notice the number of stake root submissions
function getNumStakeRootSubmissions() external view returns (uint256);

/// @notice the interval at which proofs can be posted, to not overcharge the operatorSets
function proofInterval() external view returns (uint32);

Expand Down

0 comments on commit be15a8e

Please sign in to comment.