GedhoControl
Roles, pause, protocol fee and treasury, once for every market. Every market asks it.
Inherits Upgradeable base.
Admin
unpause
function unpause() external;
Ends the pause at once.
Admin only.
Guardian
pause
function pause() external;
Pauses every market for 14 days from now, also while a pause is running.
Guardian only.
72-hour time delay
setAdmin
function setAdmin(address admin_) external;
72 hour timelock only.
| Parameter | Type |
|---|---|
admin_ | address |
setTimelock24
function setTimelock24(address timelock) external;
72 hour timelock only.
| Parameter | Type |
|---|---|
timelock | address |
setTimelock72
function setTimelock72(address timelock) external;
72 hour timelock only.
| Parameter | Type |
|---|---|
timelock | address |
setTreasury
function setTreasury(address treasury_) external;
72 hour timelock only.
| Parameter | Type |
|---|---|
treasury_ | address |
setFee
function setFee(uint256 fee_) external;
72 hour timelock only. At most MAX_FEE.
| Parameter | Type |
|---|---|
fee_ | uint256 |
7-day time delay
setGuardian
function setGuardian(address guardian_) external;
7 day timelock only. The cancellers of the other two timelocks change in the same batch.
| Parameter | Type |
|---|---|
guardian_ | address |
setTimelock7d
function setTimelock7d(address timelock) external;
7 day timelock only, so that the guardian is never replaced faster than in 7 days.
| Parameter | Type |
|---|---|
timelock | address |
Deployer
initialize
function initialize(Roles calldata roles, uint256 fee_) external;
Sets the roles and the fee once, through the proxy.
| Parameter | Type |
|---|---|
roles | Roles |
fee_ | uint256 |
Read
admin
function admin() external view returns (address);
Multisig of the team.
| Returns | Type |
|---|---|
- | address |
guardian
function guardian() external view returns (address);
Pauses, and cancels in the 24 and 72 hour timelocks.
| Returns | Type |
|---|---|
- | address |
timelock24
function timelock24() external view returns (address);
| Returns | Type |
|---|---|
- | address |
timelock72
function timelock72() external view returns (address);
| Returns | Type |
|---|---|
- | address |
timelock7d
function timelock7d() external view returns (address);
| Returns | Type |
|---|---|
- | address |
treasury
function treasury() external view returns (address);
Receives the protocol fee.
| Returns | Type |
|---|---|
- | address |
fee
function fee() external view returns (uint256);
Share of the rise of the funding index that series pay, 1e18 is 100%.
| Returns | Type |
|---|---|
- | uint256 |
pausedUntil
function pausedUntil() external view returns (uint64);
End of the pause, zero or past when there is none.
| Returns | Type |
|---|---|
- | uint64 |
paused
function paused() external view returns (bool);
| Returns | Type |
|---|---|
- | bool |
Events
AdminChanged
event AdminChanged(address indexed oldAdmin, address indexed newAdmin);
| Parameter | Type |
|---|---|
oldAdmin (indexed) | address |
newAdmin (indexed) | address |
GuardianChanged
event GuardianChanged(address indexed oldGuardian, address indexed newGuardian);
| Parameter | Type |
|---|---|
oldGuardian (indexed) | address |
newGuardian (indexed) | address |
TimelockChanged
event TimelockChanged(
uint256 indexed delay,
address indexed oldTimelock,
address indexed newTimelock
);
delay is 24 hours, 72 hours or 7 days.
| Parameter | Type |
|---|---|
delay (indexed) | uint256 |
oldTimelock (indexed) | address |
newTimelock (indexed) | address |
TreasuryChanged
event TreasuryChanged(address indexed oldTreasury, address indexed newTreasury);
| Parameter | Type |
|---|---|
oldTreasury (indexed) | address |
newTreasury (indexed) | address |
FeeChanged
event FeeChanged(uint256 oldFee, uint256 newFee);
1e18 is 100%. It applies from the next series.
| Parameter | Type |
|---|---|
oldFee | uint256 |
newFee | uint256 |
PauseStarted
event PauseStarted(address indexed guardian, uint64 until);
Every market is paused until until.
| Parameter | Type |
|---|---|
guardian (indexed) | address |
until | uint64 |
PauseEnded
event PauseEnded(address indexed admin);
| Parameter | Type |
|---|---|
admin (indexed) | address |
Errors
NotGuardian
error NotGuardian();
The caller is not the guardian.
FeeTooHigh
error FeeTooHigh(uint256 highest);
The fee is above the highest one.
| Parameter | Type |
|---|---|
highest | uint256 |
ZeroAddress
error ZeroAddress();
The address is zero.
Types
Roles
The roles at the start. Every address must be set.
| Field | Type |
|---|---|
admin | address |
guardian | address |
timelock24 | address |
timelock72 | address |
timelock7d | address |
treasury | address |