generated from Uniswap/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathIStepStorage.sol
More file actions
43 lines (38 loc) · 2.12 KB
/
IStepStorage.sol
File metadata and controls
43 lines (38 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {AuctionStep} from '../libraries/StepLib.sol';
/// @notice Interface for managing auction step storage
interface IStepStorage {
/// @notice Error thrown when the end block is equal to or before the start block
error InvalidEndBlock();
/// @notice Error thrown when the claim block is before the end block
error ClaimBlockIsBeforeEndBlock();
/// @notice Error thrown when the auction is over
error AuctionIsOver();
/// @notice Error thrown when the auction is not over
error AuctionIsNotOver();
/// @notice Error thrown when the bid is not claimable
error NotClaimable();
/// @notice Error thrown when the auction data length is invalid
error InvalidAuctionDataLength();
/// @notice Error thrown when the block delta in a step is zero
error StepBlockDeltaCannotBeZero();
/// @notice Error thrown when the mps is invalid
/// @param actualMps The sum of the mps times the block delta
/// @param expectedMps The expected mps of the auction (ConstantsLib.MPS)
error InvalidStepDataMps(uint256 actualMps, uint256 expectedMps);
/// @notice Error thrown when the calculated end block is invalid
/// @param actualEndBlock The calculated end block from the step data
/// @param expectedEndBlock The expected end block from the constructor
error InvalidEndBlockGivenStepData(uint64 actualEndBlock, uint64 expectedEndBlock);
/// @notice The address pointer to the contract deployed by SSTORE2
/// @return The address pointer
function pointer() external view returns (address);
/// @notice Get the current active auction step
function step() external view returns (AuctionStep memory);
/// @notice Emitted when an auction step is recorded
/// @param startBlock The start block of the auction step
/// @param endBlock The end block of the auction step
/// @param mps The percentage of total tokens to sell per block during this auction step, represented in ten-millionths of the total supply (1e7 = 100%)
event AuctionStepRecorded(uint256 startBlock, uint256 endBlock, uint24 mps);
}