IINVMANAGER
Last updated
Last updated
Interface for the contract that manages investment rounds and token vesting
Defines external functions and events for the InvestmentManager contract
Initializes the contract
Parameters
token
address
Address of the ecosystem token
timelock_
address
Address of the timelock controller
treasury_
address
Address of the treasury
Pauses the contract
Unpauses the contract
Schedules an upgrade to a new implementation
Parameters
newImplementation
address
Address of the new implementation
Executes an emergency withdrawal
Parameters
token
address
Address of the token to withdraw (0xEeee... for ETH)
Executes an emergency withdrawal
Creates a new investment round
Parameters
start
uint64
Start timestamp of the round
duration
uint64
Duration in seconds
ethTarget
uint256
Target ETH amount
tokenAlloc
uint256
Total token allocation
vestingCliff
uint64
Cliff period for vesting in seconds
vestingDuration
uint64
Duration for vesting in seconds
Returns
<none>
uint32
ID of the created round
Activates a pending round
Parameters
roundId
uint32
ID of the round to activate
Adds an investor allocation to a round
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
ethAmount
uint256
ETH allocation amount
tokenAmount
uint256
Token allocation amount
Removes an investor allocation from a round
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
Cancels an investment in a round
Parameters
roundId
uint32
ID of the round
Finalizes a completed round
Parameters
roundId
uint32
ID of the round
Cancels a round
Parameters
roundId
uint32
ID of the round
Claims a refund for a cancelled round
Parameters
roundId
uint32
ID of the round
Invests ETH in a round
Parameters
roundId
uint32
ID of the round
Returns the remaining time before a scheduled upgrade can be executed
Returns
<none>
uint256
Time remaining in seconds
Gets the refund amount for an investor in a round
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
Returns
<none>
uint256
Refund amount
Gets investor details for a round
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
Returns
etherAmount
uint256
ETH allocation amount
tokenAmount
uint256
Token allocation amount
invested
uint256
Amount invested
vestingContract
address
Address of the vesting contract
Gets the address of the ecosystem token
Returns
<none>
address
Address of the ecosystem token
Gets information about a round
Parameters
roundId
uint32
ID of the round
Returns
<none>
Round
Round information
Gets list of investors in a round
Parameters
roundId
uint32
ID of the round
Returns
<none>
address[]
Array of investor addresses
Gets the current active round
Returns
<none>
uint32
ID of the current active round, or type(uint32).max if none
Gets the timelock controller address
Returns
<none>
address
Address of the timelock controller
Gets the treasury address
Returns
<none>
address
Address of the treasury
Gets the total token supply managed by this contract
Returns
<none>
uint256
Total supply
Gets the contract version
Returns
<none>
uint32
Contract version
Emitted when the contract is initialized
Parameters
initializer
address
Address that called initialize
Emitted when an upgrade is scheduled
Parameters
sender
address
Address that scheduled the upgrade
implementation
address
New implementation address
scheduledTime
uint64
Time when upgrade was scheduled
effectiveTime
uint64
Time when upgrade can be executed
Emitted when a scheduled upgrade is cancelled
Parameters
canceller
address
The address that cancelled the upgrade
implementation
address
The implementation address that was cancelled
Emitted when contract implementation is upgraded
Parameters
upgrader
address
Address that performed the upgrade
implementation
address
New implementation address
version
uint32
New version number
Emitted when an emergency withdrawal is executed
Parameters
token
address
Address of the token withdrawn (ethereum constant for ETH)
amount
uint256
Amount withdrawn
Emitted when a new investment round is created
Parameters
roundId
uint32
ID of the created round
startTime
uint64
Start timestamp of the round
duration
uint64
Duration in seconds
etherTarget
uint256
Target ETH amount
tokenAllocation
uint256
Total token allocation
Emitted when a round's status is updated
Parameters
roundId
uint32
ID of the round
status
RoundStatus
New status
Emitted when an investor is allocated in a round
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
etherAmount
uint256
ETH allocation amount
tokenAmount
uint256
Token allocation amount
Emitted when an investor's allocation is removed
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
etherAmount
uint256
ETH allocation amount removed
tokenAmount
uint256
Token allocation amount removed
Emitted when an investment is cancelled
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
amount
uint256
ETH amount returned
Emitted when a round is finalized
Parameters
finalizer
address
Address that finalized the round
roundId
uint32
ID of the round
ethAmount
uint256
Total ETH raised
tokenAmount
uint256
Total tokens distributed
Emitted when a round is cancelled
Parameters
roundId
uint32
ID of the cancelled round
Emitted when a refund is claimed
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
amount
uint256
ETH amount refunded
Emitted when an investment is made
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
amount
uint256
ETH amount invested
Emitted when a round is completed
Parameters
roundId
uint32
ID of the completed round
Emitted when a vesting contract is deployed
Parameters
roundId
uint32
ID of the round
investor
address
Address of the investor
vestingContract
address
Address of the vesting contract
allocation
uint256
Token allocation amount
Error thrown when trying to execute an upgrade before timelock expires
Parameters
remainingTime
uint256
Time remaining until upgrade can be executed
Error thrown when trying to execute an upgrade that wasn't scheduled
Error thrown when trying to execute an upgrade with wrong implementation
Parameters
expected
address
Expected implementation address
provided
address
Provided implementation address
Error thrown when an invalid round ID is provided
Parameters
roundId
uint32
The invalid round ID
Error thrown when a round is not in active status
Parameters
roundId
uint32
The round ID
Error thrown when a round is in the wrong status
Parameters
roundId
uint32
The round ID
requiredStatus
RoundStatus
Required status
currentStatus
RoundStatus
Current status
Error thrown when a zero address is provided
Error thrown when an invalid amount is provided
Parameters
amount
uint256
The invalid amount
Error thrown when a duration is outside allowed range
Parameters
provided
uint256
Provided duration
minimum
uint256
Minimum allowed duration
maximum
uint256
Maximum allowed duration
Error thrown when ETH target is invalid
Error thrown when token allocation is invalid
Error thrown when start time is in the past
Parameters
provided
uint64
Provided start time
current
uint256
Current time
Error thrown when token supply is insufficient
Parameters
required
uint256
Required amount
available
uint256
Available amount
Error thrown when round start time hasn't been reached
Parameters
currentTime
uint256
Current time
startTime
uint256
Start time of the round
Error thrown when round end time has been reached
Parameters
currentTime
uint256
Current time
endTime
uint256
End time of the round
Error thrown when an invalid investor address is provided
Error thrown when ETH amount is invalid
Error thrown when token amount is invalid
Error thrown when allocation already exists for an investor
Parameters
investor
address
Address of the investor
Error thrown when allocation exceeds round allocation
Parameters
requested
uint256
Requested allocation
available
uint256
Available allocation
Error thrown when no allocation exists for an investor
Parameters
investor
address
Address of the investor
Error thrown when investor already has an active position
Parameters
investor
address
Address of the investor
Error thrown when investor has no investment
Parameters
investor
address
Address of the investor
Error thrown when a round is not cancelled
Parameters
roundId
uint32
ID of the round
Error thrown when no refund is available
Parameters
investor
address
Address of the investor
Error thrown when status transition is invalid
Parameters
current
RoundStatus
Current status
new_
RoundStatus
New status
Error thrown when no active round exists
Error thrown when a round has ended
Parameters
roundId
uint32
ID of the round
Error thrown when a round is oversubscribed
Parameters
roundId
uint32
ID of the round
Error thrown when investor has no allocation
Parameters
investor
address
Address of the investor
Error thrown when amount doesn't match allocation
Parameters
provided
uint256
Provided amount
required
uint256
Required amount
Error thrown when attempting operations with zero balance
Investor allocation details
Tracks individual investor allocations within a round
Properties
etherAmount
uint256
Maximum ETH that can be invested
tokenAmount
uint256
Tokens to be received for full allocation
Investment round details
Contains all parameters and current state of an investment round
Properties
etherTarget
uint256
Total ETH to be raised
etherInvested
uint256
Current amount of ETH invested
tokenAllocation
uint256
Total tokens allocated to the round
tokenDistributed
uint256
Tokens that have been distributed to vesting contracts
startTime
uint64
Round opening timestamp
endTime
uint64
Round closing timestamp
vestingCliff
uint64
Time before vesting begins
vestingDuration
uint64
Total vesting period length
participants
uint32
Number of investors in the round
status
RoundStatus
Current state of the round
Upgrade request details
Tracks pending contract upgrades with timelock
Properties
implementation
address
New implementation contract address
scheduledTime
uint64
When the upgrade was requested
exists
bool
Whether this upgrade request is active
Enum representing the status of an investment round