ITREASURY
Last updated
Last updated
Interface for the Treasury contract with linear vesting, timelock upgrades and multisig support
Defines all external functions and events for the Treasury contract
Notes:
security-contact: security@nebula-labs.xyz
copyright: Copyright (c) 2025 Nebula Holding Inc. All rights reserved.
Pauses all token transfers and releases
Can only be called by accounts with the PAUSER_ROLE
Unpauses token transfers and releases
Can only be called by accounts with the PAUSER_ROLE
Returns the amount of ETH that can be released now
Returns
<none>
uint256
Amount of releasable ETH
Returns the amount of a specific token that can be released now
Parameters
token
address
The ERC20 token to check
Returns
<none>
uint256
Amount of releasable tokens
Releases a specific amount of vested ETH
Can only be called by accounts with the MANAGER_ROLE
Parameters
to
address
The address that will receive the ETH
amount
uint256
The amount of ETH to release
Releases a specific amount of vested tokens
Can only be called by accounts with the MANAGER_ROLE
Parameters
token
address
The ERC20 token to release
to
address
The address that will receive the tokens
amount
uint256
The amount of tokens to release
Updates the vesting schedule parameters
Can only be called by accounts with the DEFAULT_ADMIN_ROLE
Parameters
newStart
uint256
The new start timestamp
newDuration
uint256
The new duration in seconds
Withdraws funds in case of emergency
Can only be called by accounts with the MANAGER_ROLE
Always sends funds to the timelock controller
Parameters
token
address
Address of the token to withdraw
Withdraws funds in case of emergency
Can only be called by accounts with the MANAGER_ROLE
Always sends funds to the timelock controller
Schedules an upgrade to a new implementation
Can only be called by accounts with the UPGRADER_ROLE
Parameters
newImplementation
address
Address of the new implementation
Returns the remaining time before a scheduled upgrade can be executed
Returns
<none>
uint256
The time remaining in seconds, or 0 if no upgrade is scheduled or timelock has passed
Get the timelock controller address
Returns
<none>
address
The timelock controller address
Returns the pending upgrade information
Calculates the amount of ETH vested at a specific timestamp
Parameters
timestamp
uint256
The timestamp to check
Returns
<none>
uint256
Information about the pending upgrade
Calculates the amount of tokens vested at a specific timestamp
Parameters
token
address
The ERC20 token to check
timestamp
uint256
The timestamp to check
Returns
<none>
uint256
The vested amount of tokens
Returns the current contract version
Returns
<none>
uint32
Current version number
Returns the start timestamp of the vesting period
Returns
<none>
uint256
Start timestamp
Returns the duration of the vesting period
Returns
<none>
uint256
Duration in seconds
Returns the end timestamp of the vesting period
Returns
<none>
uint256
End timestamp (start + duration)
Returns the amount of ETH already released
Returns
<none>
uint256
Amount of ETH released so far
Returns the amount of a specific token already released
Parameters
token
address
The ERC20 token to check
Returns
<none>
uint256
Amount of tokens released so far
Returns the MANAGER_ROLE identifier used for access control
Returns
<none>
bytes32
The keccak256 hash of "MANAGER_ROLE"
Returns the PAUSER_ROLE identifier used for access control
Returns
<none>
bytes32
The keccak256 hash of "PAUSER_ROLE"
Returns the UPGRADER_ROLE identifier used for access control
Returns
<none>
bytes32
The keccak256 hash of "UPGRADER_ROLE"
Emitted when the contract is initialized
Parameters
initializer
address
Address that called the initialize function
startTime
uint256
Start timestamp of the vesting schedule
duration
uint256
Duration of the vesting period in seconds
Emitted when ETH is released from the treasury
Parameters
to
address
Address receiving the ETH
amount
uint256
Amount of ETH released
remainingReleasable
uint256
Amount of ETH still available for release
Emitted when ERC20 tokens are released from the treasury
Parameters
token
address
Address of the ERC20 token being released
to
address
Address receiving the tokens
amount
uint256
Amount of tokens released
Emitted when the vesting schedule parameters are updated
Parameters
updater
address
Address that updated the vesting schedule
newStart
uint256
New start timestamp of the vesting schedule
newDuration
uint256
New duration of the vesting period in seconds
Emitted when funds are withdrawn via the emergency withdrawal function
Parameters
token
address
Address of the token withdrawn (address(0) for ETH)
to
address
Address receiving the funds
amount
uint256
Amount withdrawn
Emitted when the contract implementation is upgraded
Parameters
upgrader
address
Address that performed the upgrade
implementation
address
Address of the new implementation
version
uint32
New version number after the upgrade
Emitted when ETH is received by the contract
Parameters
src
address
Address that sent ETH to the contract
amount
uint256
Amount of ETH received
Emitted when an upgrade is scheduled
Parameters
sender
address
The address that scheduled the upgrade
implementation
address
The new implementation address
scheduledTime
uint64
The time when the upgrade was scheduled
effectiveTime
uint64
The time when the 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
Thrown when an operation receives the zero address where a non-zero address is required
Thrown when an operation receives a zero amount where a non-zero amount is required
Thrown when trying to release more funds than what's currently vested
Parameters
requested
uint256
The amount requested for release
available
uint256
The actual amount available for release
Thrown when attempting to set an invalid vesting duration
Parameters
minimum
uint256
The minimum allowed duration
Error thrown when trying to execute an upgrade too soon
Parameters
remainingTime
uint256
The 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
The expected implementation address
provided
address
The provided implementation address
Error thrown when attempting operations with zero balance
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