Verified contractExactApache-2.0
ZeroRegistryRewardsPayload
Address0x8e1ae43bec950ea0e02f2ed43101797c5a8dbfcd
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.30
- Same code
Only this contract
Details
- Compiler
- solc 0.8.30+commit.73712a01
- Language
- solidity
- Optimization
- Yes, 100 runs
- EVM version
- prague
- License
- Apache-2.0
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,327,721
- Creation transaction
- 0x50084ca8be…486ecbfd58
95 files
The source code is large: one file is shown at a time. Choose a file in the list.
- src/periphery/ZeroRegistryRewardsPayload.solmain5.09 KB
- lib/openzeppelin-contracts/contracts/access/Ownable.sol3.1 KB
- lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol4.45 KB
- lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol192 B
- lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol181 B
- lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol739 B
- lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol2.78 KB
- lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol9.39 KB
- lib/openzeppelin-contracts/contracts/utils/Context.sol963 B
- lib/openzeppelin-contracts/contracts/utils/Panic.sol1.97 KB
- lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol4.28 KB
- lib/openzeppelin-contracts/contracts/utils/SlotDerivation.sol5.32 KB
- lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol4.18 KB
- lib/openzeppelin-contracts/contracts/utils/Strings.sol14.83 KB
- lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol5.07 KB
- lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol7.82 KB
- lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol6.61 KB
- lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol3.7 KB
- lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol870 B
- lib/openzeppelin-contracts/contracts/utils/math/Math.sol29.66 KB
- lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol34.94 KB
- lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol2.61 KB
- lib/openzeppelin-contracts/contracts/utils/structs/BitMaps.sol2.02 KB
- lib/openzeppelin-contracts/contracts/utils/structs/Checkpoints.sol21.43 KB
- lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol12.89 KB
- src/core/interfaces/IEscapeHatch.sol3.58 KB
- src/core/interfaces/IFeeJuicePortal.sol1.18 KB
- src/core/interfaces/IInstance.sol305 B
- src/core/interfaces/IRollup.sol13.11 KB
- src/core/interfaces/ISequencerRewardCalculator.sol2.17 KB
- src/core/interfaces/ISlasher.sol530 B
- src/core/interfaces/IStaking.sol5.72 KB
- src/core/interfaces/IValidatorSelection.sol2.98 KB
- src/core/interfaces/IVerifier.sol225 B
- src/core/interfaces/messagebridge/IInbox.sol7.21 KB
- src/core/interfaces/messagebridge/IOutbox.sol4.6 KB
- src/core/libraries/ConstantsGen.sol1.55 KB
- src/core/libraries/DataStructures.sol1.96 KB
- src/core/libraries/Errors.sol16.7 KB
- src/core/libraries/HatchMath.sol575 B
- src/core/libraries/SlashRoundLib.sol1.93 KB
- src/core/libraries/StakingQueue.sol2.31 KB
- src/core/libraries/TimeLib.sol6.05 KB
- src/core/libraries/compressed-data/CheckpointLog.sol4.15 KB
- src/core/libraries/compressed-data/StakingQueueConfig.sol2.87 KB
- src/core/libraries/compressed-data/Tips.sol2.19 KB
- src/core/libraries/compressed-data/fees/FeeConfig.sol5.17 KB
- src/core/libraries/compressed-data/fees/FeeStructs.sol5.18 KB
- src/core/libraries/crypto/Hash.sol3.03 KB
- src/core/libraries/crypto/SampleLib.sol3.77 KB
- src/core/libraries/rollup/AttestationLib.sol8.66 KB
- src/core/libraries/rollup/BlobLib.sol11.87 KB
- src/core/libraries/rollup/CoordinationSignatureLib.sol3.19 KB
- src/core/libraries/rollup/FeeLib.sol24.27 KB
- src/core/libraries/rollup/FieldLib.sol889 B
- src/core/libraries/rollup/ProposeLib.sol28.01 KB
- src/core/libraries/rollup/ProposedHeaderLib.sol2.24 KB
- src/core/libraries/rollup/RewardLib.sol20.85 KB
- src/core/libraries/rollup/STFLib.sol25.95 KB
- src/core/libraries/rollup/SequencerRewardCalculatorLib.sol5.93 KB
- src/core/libraries/rollup/StakingLib.sol51.03 KB
- src/core/libraries/rollup/ValidatorSelectionLib.sol37.95 KB
- src/core/reward-boost/RewardBooster.sol5.04 KB
- src/core/slashing/Slasher.sol2.91 KB
- src/governance/Bn254LibWrapper.sol752 B
- src/governance/GSE.sol39.93 KB
- src/governance/GSEPayload.sol6.29 KB
- src/governance/Governance.sol32.6 KB
- src/governance/interfaces/IBn254LibWrapper.sol459 B
- src/governance/interfaces/IEmpire.sol1.3 KB
- src/governance/interfaces/IGovernance.sol3.91 KB
- src/governance/interfaces/IGovernanceProposer.sol359 B
- src/governance/interfaces/IPayload.sol597 B
- src/governance/interfaces/IProposerPayload.sol327 B
- src/governance/interfaces/IRegistry.sol1.21 KB
- src/governance/interfaces/IRewardDistributor.sol1.28 KB
- src/governance/libraries/AddressSnapshotLib.sol9.83 KB
- src/governance/libraries/CheckpointedUintLib.sol3.02 KB
- src/governance/libraries/ConfigurationLib.sol5 KB
- src/governance/libraries/DepositDelegationLib.sol10.98 KB
- src/governance/libraries/Errors.sol4.49 KB
- src/governance/libraries/ProposalLib.sol8.54 KB
- src/governance/libraries/compressed-data/Ballot.sol2.33 KB
- src/governance/libraries/compressed-data/Configuration.sol4.5 KB
- src/governance/libraries/compressed-data/Proposal.sol6.35 KB
- src/governance/proposer/EmpireBase.sol12.69 KB
- src/governance/proposer/GovernanceProposer.sol4.25 KB
- src/mock/libraries/BlobLib.sol5.65 KB
- src/periphery/RegistryReductionCalculator.sol8.67 KB
- src/periphery/interfaces/IATP.sol891 B
- src/periphery/libraries/ProbeLib.sol3.88 KB
- src/shared/libraries/BN254Lib.sol10.21 KB
- src/shared/libraries/CompressedTimeMath.sol1.27 KB
- src/shared/libraries/SignatureLib.sol983 B
- src/shared/libraries/TimeMath.sol3.54 KB
src/periphery/ZeroRegistryRewardsPayload.sol
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 Aztec Labs.
pragma solidity >=0.8.27;
import {IInstance} from "@aztec/core/interfaces/IInstance.sol";
import {IRollupCore} from "@aztec/core/interfaces/IRollup.sol";
import {IPayload} from "@aztec/governance/interfaces/IPayload.sol";
import {RegistryReductionCalculator} from "@aztec/periphery/RegistryReductionCalculator.sol";
import {Ownable} from "@oz/access/Ownable.sol";
/**
* @title IZeroRegistryRewardsPayload
* @author Aztec Labs
* @notice The payload's own surface beside {IPayload}. Declared so that every external method overrides a
* definition, which is what `src/` is linted for.
*/
interface IZeroRegistryRewardsPayload is IPayload {
/// @notice How many registries the payload zeroes
/// @return The number of listed registries
function registryCount() external view returns (uint256);
}
/**
* @title ZeroRegistryRewardsPayload
* @author Aztec Labs
* @notice Installs a {RegistryReductionCalculator} on a rollup and sets the sequencer checkpoint reward to zero for
* validators staked through an ATP of any listed registry.
*
* @dev The actions, in order, are one `setRegistryReward(registry, 0)` per listed registry followed by
* `setSequencerRewardCalculator(calculator)` on the rollup.
*
* The calculator is deployed by this payload's constructor. Its owner is the rollup's owner and its GSE is the
* rollup's GSE, both read from the rollup rather than taken as arguments, so the deployer never holds owner
* rights over the calculator and the only entries it can carry are the ones these actions write. The rollup
* does not consult the calculator until the final action, and the actions execute atomically. An unconfigured
* calculator returns the default reward for every proposer.
*
* Registries that are not listed have no entry, and their validators receive the default reward. The list is
* fixed at construction and can be read from {registries}.
*
* The rollup's owner keeps ownership of the calculator and can change or remove an entry later without
* deploying anything. `RegistryReductionCalculator` caps every entry at the default reward when it is read, so
* no configuration of it pays a validator more than the default.
*/
contract ZeroRegistryRewardsPayload is IZeroRegistryRewardsPayload {
/// @dev The reward set for every listed registry.
uint96 internal constant NO_REWARD = 0;
/// @notice The rollup that will consult the calculator.
IInstance public immutable ROLLUP;
/// @notice The calculator deployed by this payload, owned by the rollup's owner.
RegistryReductionCalculator public immutable CALCULATOR;
/// @notice The ATP registries set to a zero reward. Fixed at construction.
address[] public registries;
error ZeroRegistryRewardsPayload__DuplicateRegistry(address registry);
error ZeroRegistryRewardsPayload__NoRegistries();
error ZeroRegistryRewardsPayload__ZeroAddress();
/**
* @param _rollup The rollup to install the calculator on; its owner becomes the calculator's owner and its GSE
* the one the calculator resolves withdrawers against
* @param _registries The ATP registries to zero, at least one, without duplicates
*/
constructor(IInstance _rollup, address[] memory _registries) {
require(address(_rollup) != address(0), ZeroRegistryRewardsPayload__ZeroAddress());
require(_registries.length > 0, ZeroRegistryRewardsPayload__NoRegistries());
for (uint256 i = 0; i < _registries.length; i++) {
require(_registries[i] != address(0), ZeroRegistryRewardsPayload__ZeroAddress());
// Each registry appears once, so the actions map one-to-one onto {registries}.
for (uint256 j = 0; j < i; j++) {
require(_registries[i] != _registries[j], ZeroRegistryRewardsPayload__DuplicateRegistry(_registries[i]));
}
registries.push(_registries[i]);
}
ROLLUP = _rollup;
CALCULATOR = new RegistryReductionCalculator(_rollup.getGSE(), Ownable(address(_rollup)).owner());
}
/// @notice How many registries this payload zeroes.
function registryCount() external view override(IZeroRegistryRewardsPayload) returns (uint256) {
return registries.length;
}
/// @inheritdoc IPayload
function getActions() external view override(IPayload) returns (IPayload.Action[] memory) {
uint256 count = registries.length;
IPayload.Action[] memory actions = new IPayload.Action[](count + 1);
for (uint256 i = 0; i < count; i++) {
actions[i] = IPayload.Action({
target: address(CALCULATOR),
data: abi.encodeCall(RegistryReductionCalculator.setRegistryReward, (registries[i], NO_REWARD))
});
}
actions[count] = IPayload.Action({
target: address(ROLLUP), data: abi.encodeCall(IRollupCore.setSequencerRewardCalculator, (address(CALCULATOR)))
});
return actions;
}
/// @inheritdoc IPayload
function getURI() external pure override(IPayload) returns (string memory) {
return "ZeroRegistryRewardsPayload";
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 100,
"enabled": true
},
"evmVersion": "prague",
"remappings": [
"@oz/=lib/openzeppelin-contracts/contracts/",
"@aztec/=src/",
"@test/=test/",
"@generated/=generated/",
"@zkpassport/=lib/circuits/src/solidity/src/",
"@zkpassport-test/=lib/circuits/src/solidity/test/",
"@aztec-blob-lib/=src/mock/libraries/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"circuits/=lib/circuits/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.