Skip to main content

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.

ParameterType
admin_address

setTimelock24​

function setTimelock24(address timelock) external;

72 hour timelock only.

ParameterType
timelockaddress

setTimelock72​

function setTimelock72(address timelock) external;

72 hour timelock only.

ParameterType
timelockaddress

setTreasury​

function setTreasury(address treasury_) external;

72 hour timelock only.

ParameterType
treasury_address

setFee​

function setFee(uint256 fee_) external;

72 hour timelock only. At most MAX_FEE.

ParameterType
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.

ParameterType
guardian_address

setTimelock7d​

function setTimelock7d(address timelock) external;

7 day timelock only, so that the guardian is never replaced faster than in 7 days.

ParameterType
timelockaddress

Deployer​

initialize​

function initialize(Roles calldata roles, uint256 fee_) external;

Sets the roles and the fee once, through the proxy.

ParameterType
rolesRoles
fee_uint256

Read​

admin​

function admin() external view returns (address);

Multisig of the team.

ReturnsType
-address

guardian​

function guardian() external view returns (address);

Pauses, and cancels in the 24 and 72 hour timelocks.

ReturnsType
-address

timelock24​

function timelock24() external view returns (address);
ReturnsType
-address

timelock72​

function timelock72() external view returns (address);
ReturnsType
-address

timelock7d​

function timelock7d() external view returns (address);
ReturnsType
-address

treasury​

function treasury() external view returns (address);

Receives the protocol fee.

ReturnsType
-address

fee​

function fee() external view returns (uint256);

Share of the rise of the funding index that series pay, 1e18 is 100%.

ReturnsType
-uint256

pausedUntil​

function pausedUntil() external view returns (uint64);

End of the pause, zero or past when there is none.

ReturnsType
-uint64

paused​

function paused() external view returns (bool);
ReturnsType
-bool

Events​

AdminChanged​

event AdminChanged(address indexed oldAdmin, address indexed newAdmin);
ParameterType
oldAdmin (indexed)address
newAdmin (indexed)address

GuardianChanged​

event GuardianChanged(address indexed oldGuardian, address indexed newGuardian);
ParameterType
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.

ParameterType
delay (indexed)uint256
oldTimelock (indexed)address
newTimelock (indexed)address

TreasuryChanged​

event TreasuryChanged(address indexed oldTreasury, address indexed newTreasury);
ParameterType
oldTreasury (indexed)address
newTreasury (indexed)address

FeeChanged​

event FeeChanged(uint256 oldFee, uint256 newFee);

1e18 is 100%. It applies from the next series.

ParameterType
oldFeeuint256
newFeeuint256

PauseStarted​

event PauseStarted(address indexed guardian, uint64 until);

Every market is paused until until.

ParameterType
guardian (indexed)address
untiluint64

PauseEnded​

event PauseEnded(address indexed admin);
ParameterType
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.

ParameterType
highestuint256

ZeroAddress​

error ZeroAddress();

The address is zero.

Types​

Roles​

The roles at the start. Every address must be set.

FieldType
adminaddress
guardianaddress
timelock24address
timelock72address
timelock7daddress
treasuryaddress