IAdminV2
Functions
addProver
Allows the role admin to add a new prover to the contract.
function addProver(address prover) external;
removeProver
Allows the role admin to remove a prover from the contract.
function removeProver(address prover) external;
setCancelDelay
Allows the governor to set the cancel delay. The cancel delay is the time period after the transaction deadline during which a transaction can be permissionlessly cancelled if it hasn't been proven by any Relayer.
function setCancelDelay(uint256 newCancelDelay) external;
setDeployBlock
Allows the default admin to set the deploy block.
This is only relevant for chains like Arbitrum that implement the block.number
as the underlying L1
block number rather than the chain's native block number.
function setDeployBlock(uint256 blockNumber) external;
setDisputePenaltyTime
Allows the governor to set the dispute penalty time. The dispute penalty time is the time period used to temporarily deactivate a prover if its proof is disputed: prover will be inactive for the dispute penalty time after the dispute is submitted.
function setDisputePenaltyTime(uint256 newDisputePenaltyTime) external;
setProtocolFeeRate
Allows the governor to set the protocol fee rate. The protocol fee is taken from the origin amount and is only applied to completed and claimed transactions.
The protocol fee is abstracted away from the relayers; they always operate using the amounts after fees. The origin amount they see in the emitted log is what they get credited with.
function setProtocolFeeRate(uint256 newFeeRate) external;
sweepProtocolFees
Allows the governor to withdraw the accumulated protocol fees from the contract.
function sweepProtocolFees(address token, address recipient) external;
getActiveProverID
Returns the ID of the active prover, or zero if the prover is not currently active.
function getActiveProverID(address prover) external view returns (uint16);
getProverInfo
Returns the information about the prover with the provided address.
function getProverInfo(address prover) external view returns (uint16 proverID, uint256 activeFromTimestamp);
Returns
Name | Type | Description |
---|---|---|
proverID | uint16 | The ID of the prover if it has been added before, or zero otherwise. |
activeFromTimestamp | uint256 | The timestamp when the prover becomes active, or zero if the prover isn't active. |
getProverInfoByID
Returns the information about the prover with the provided ID.
function getProverInfoByID(uint16 proverID) external view returns (address prover, uint256 activeFromTimestamp);
Returns
Name | Type | Description |
---|---|---|
prover | address | The address of the prover with the provided ID, or zero the ID does not exist. |
activeFromTimestamp | uint256 | The timestamp when the prover becomes active, or zero if the prover isn't active. |
getProvers
Returns the list of the active provers.
function getProvers() external view returns (address[] memory);
Events
CancelDelayUpdated
event CancelDelayUpdated(uint256 oldCancelDelay, uint256 newCancelDelay);
DeployBlockSet
event DeployBlockSet(uint256 blockNumber);
DisputePenaltyTimeUpdated
event DisputePenaltyTimeUpdated(uint256 oldDisputePenaltyTime, uint256 newDisputePenaltyTime);
FeeRateUpdated
event FeeRateUpdated(uint256 oldFeeRate, uint256 newFeeRate);
FeesSwept
event FeesSwept(address token, address recipient, uint256 amount);
ProverAdded
event ProverAdded(address prover);
ProverRemoved
event ProverRemoved(address prover);
DisputePenaltyTimeApplied
event DisputePenaltyTimeApplied(address prover, uint256 inactiveUntilTimestamp);