33 lines
1.2 KiB
Solidity
33 lines
1.2 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
interface IGatekeeper {
|
|
error NotStaking();
|
|
error NotGatekeeper();
|
|
error BadSignature();
|
|
error AlreadyExecuted();
|
|
error NonExistentAmount();
|
|
error InvalidCalldata();
|
|
error ExecutionReverted();
|
|
|
|
struct RotationState {
|
|
uint8 parity;
|
|
uint64 session;
|
|
}
|
|
|
|
event Ghosted(bytes32 indexed receiver, uint256 indexed amount);
|
|
event Materialized(address indexed receiver, uint256 indexed amount);
|
|
event Rotated(bytes32 indexed aggregatedPublicKey, uint8 indexed parity);
|
|
|
|
function staking() external view returns (address);
|
|
function storageHistory() external view returns (address);
|
|
function ghostedSupply() external view returns (uint256);
|
|
function existentialDeposit() external view returns (uint256);
|
|
function latestPublicKeyInfo() external view returns (bytes32, uint8, uint64);
|
|
function getRotationInfoAt(uint256 session) external view returns (bytes32, uint8, uint64);
|
|
|
|
function materialize(uint256 session, uint256 amount, uint256 commission, address receiver) external;
|
|
function rotate(uint256 session, bytes32 publicKey, uint8 parity) external;
|
|
function ghost(bytes32 receiver, uint256 amount) external returns (uint256);
|
|
}
|