Skip to content

Reward Distributor #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 14, 2025
Merged

Reward Distributor #21

merged 21 commits into from
Apr 14, 2025

Conversation

gretzke
Copy link
Collaborator

@gretzke gretzke commented Feb 24, 2025

This pull request introduces a new RewardDistributor contract along with its associated parameters and interfaces, as well as updates to the testing framework to accommodate these changes. The most important changes include the implementation of the RewardDistributor contract, the introduction of the RewardDistributorParams contract, updates to the IFeeSplitter interface, and the addition of new tests and mock contracts.

New Contracts and Interfaces:

Interface Updates:

Testing Framework:

@gretzke gretzke changed the title Initial commit: Attestations Reward Distributor Feb 24, 2025
import {MessageHashUtils} from '@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol';

/// @title RewardDistributor
/// @notice Distributes rewards to operators based on their attestations. Operators attest to a group of blocks (windows). Whenever a window is finalized, the reward is distributed to the operators that voted together with the majority of the votes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can add newlines to keep this under 80 chars in length


/// @notice Returns the block number of the scheduled window
function blockNumber(NextWindow nextWindow) internal pure returns (uint256 blockNumber_) {
return NextWindow.unwrap(nextWindow) >> 96;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 96 can be a constant

@gretzke gretzke merged commit c19f885 into dev-uvn Apr 14, 2025
2 checks passed
@gretzke gretzke deleted the l2-attestations branch April 14, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants