IPayloadBroadcaster
Inherits: IMigratable, IRegistryParametersErrors
A payload broadcaster is a contract that broadcasts payloads as events, where payloads have a min and max size, both of which can be updated from a parameter registry.
Functions
initialize
Initializes the contract.
function initialize() external;
updateMinPayloadSize
Updates the minimum payload size.
Ensures the new minimum is less than the maximum.
Ensures the new minimum is not equal to the old minimum.
function updateMinPayloadSize() external;
updateMaxPayloadSize
Updates the maximum payload size.
Ensures the new maximum is greater than the minimum.
Ensures the new maximum is not equal to the old maximum.
function updateMaxPayloadSize() external;
updatePauseStatus
Updates the pause status.
Ensures the new pause status is not equal to the old pause status.
function updatePauseStatus() external;
updatePayloadBootstrapper
Updates the payload bootstrapper.
Ensures the new payload bootstrapper is not equal to the old payload bootstrapper.
function updatePayloadBootstrapper() external;
minPayloadSizeParameterKey
The parameter registry key used to fetch the minimum payload size.
function minPayloadSizeParameterKey() external pure returns (string memory key_);
maxPayloadSizeParameterKey
The parameter registry key used to fetch the maximum payload size.
function maxPayloadSizeParameterKey() external pure returns (string memory key_);
migratorParameterKey
The parameter registry key used to fetch the migrator.
function migratorParameterKey() external pure returns (string memory key_);
pausedParameterKey
The parameter registry key used to fetch the paused status.
function pausedParameterKey() external pure returns (string memory key_);
payloadBootstrapperParameterKey
The parameter registry key used to fetch the payload bootstrapper.
function payloadBootstrapperParameterKey() external pure returns (string memory key_);
parameterRegistry
The address of the parameter registry.
function parameterRegistry() external view returns (address parameterRegistry_);
minPayloadSize
Minimum valid payload size (in bytes).
function minPayloadSize() external view returns (uint32 size_);
maxPayloadSize
Maximum valid payload size (in bytes).
function maxPayloadSize() external view returns (uint32 size_);
paused
The pause status.
function paused() external view returns (bool paused_);
payloadBootstrapper
The payload bootstrapper.
function payloadBootstrapper() external view returns (address payloadBootstrapper_);
Events
MinPayloadSizeUpdated
Emitted when the minimum payload size is updated.
Will not be emitted if the new minimum is equal to the old minimum.
event MinPayloadSizeUpdated(uint256 indexed size);
Parameters
| Name | Type | Description |
|---|---|---|
size | uint256 | The new minimum payload size. |
MaxPayloadSizeUpdated
Emitted when the maximum payload size is updated.
Will not be emitted if the new maximum is equal to the old maximum.
event MaxPayloadSizeUpdated(uint256 indexed size);
Parameters
| Name | Type | Description |
|---|---|---|
size | uint256 | The new maximum payload size. |
PauseStatusUpdated
Emitted when the pause status is updated.
event PauseStatusUpdated(bool indexed paused);
Parameters
| Name | Type | Description |
|---|---|---|
paused | bool | The new pause status. |
PayloadBootstrapperUpdated
Emitted when the payload bootstrapper is updated.
event PayloadBootstrapperUpdated(address indexed payloadBootstrapper);
Parameters
| Name | Type | Description |
|---|---|---|
payloadBootstrapper | address | The new payload bootstrapper. |
Errors
ZeroParameterRegistry
Thrown when the parameter registry address is zero (i.e. address(0)).
error ZeroParameterRegistry();
InvalidPayloadSize
Thrown when the payload size is invalid.
error InvalidPayloadSize(uint256 actualSize_, uint256 minSize_, uint256 maxSize_);
InvalidMaxPayloadSize
Thrown when the maximum payload size is invalid.
error InvalidMaxPayloadSize();
InvalidMinPayloadSize
Thrown when the minimum payload size is invalid.
error InvalidMinPayloadSize();
NoChange
Thrown when there is no change to an updated parameter.
error NoChange();
Paused
Thrown when any pausable function is called when the contract is paused.
error Paused();
NotPaused
Thrown when any pause-mode-only function is called when the payload broadcaster is not paused.
error NotPaused();
NotPayloadBootstrapper
Thrown when the payload bootstrapper is not the caller.
error NotPayloadBootstrapper();