IECOSYSTEM
Last updated
Last updated
Interface for the Ecosystem contract that handles airdrops, rewards, burning, partnerships, and secure upgrades
Defines all external functions and events for the Ecosystem contract
Notes:
security-contact: security@nebula-labs.xyz
copyright: Copyright (c) 2025 Nebula Holding Inc. All rights reserved.
Initializes the ecosystem contract
Sets up the initial state of the contract, including roles and token supplies
Parameters
token
address
Address of the governance token
timelockAddr
address
Address of the timelock controller
multisig
address
Address of the multisig wallet
Pauses all contract operations
Can only be called by accounts with the PAUSER_ROLE
Resumes all contract operations
Can only be called by accounts with the PAUSER_ROLE
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
Cancels a previously scheduled upgrade
Can only be called by accounts with the UPGRADER_ROLE
Returns the remaining time before a scheduled upgrade can be executed
Returns 0 if no upgrade is scheduled or timelock has passed
Returns
<none>
uint256
The time remaining in seconds
Emergency function to withdraw tokens to the timelock
Can only be called by accounts with the MANAGER_ROLE
Parameters
token
address
The token to withdraw
Distributes tokens to multiple recipients
Can only be called by accounts with the MANAGER_ROLE
Parameters
recipients
address[]
Array of addresses to receive the airdrop
amount
uint256
Amount of tokens each recipient will receive
Rewards a single address with tokens
Can only be called by accounts with the MANAGER_ROLE
Parameters
to
address
Recipient address
amount
uint256
Amount of tokens to reward
Burns tokens from the reward supply
Can only be called by accounts with the MANAGER_ROLE
Parameters
amount
uint256
Amount of tokens to burn
Creates a vesting contract for a new partner
Can only be called by accounts with the MANAGER_ROLE
Parameters
partner
address
Address of the partner
amount
uint256
Amount of tokens to vest
cliff
uint256
Cliff period in seconds
duration
uint256
Vesting duration in seconds
Cancels a partner's vesting contract
Can only be called by the timelock
Parameters
partner
address
Address of the partner
Updates the maximum one-time reward amount
Can only be called by accounts with the MANAGER_ROLE
Parameters
newMaxReward
uint256
New maximum reward value
Updates the maximum one-time burn amount
Can only be called by accounts with the MANAGER_ROLE
Parameters
newMaxBurn
uint256
New maximum burn value
Returns the available reward supply
Calculates remaining reward tokens
Returns
<none>
uint256
Available tokens in the reward supply
Returns the available airdrop supply
Calculates remaining airdrop tokens
Returns
<none>
uint256
Available tokens in the airdrop supply
Returns the available partnership supply
Calculates remaining partnership tokens
Returns
<none>
uint256
Available tokens in the partnership supply
Gets the total reward supply
Returns
<none>
uint256
The total reward supply
Gets the maximum reward amount
Returns
<none>
uint256
The maximum reward amount
Gets the total amount of tokens issued as rewards
Returns
<none>
uint256
The total issued reward amount
Gets the total amount of tokens burned
Returns
<none>
uint256
The total burned amount
Gets the maximum burn amount
Returns
<none>
uint256
The maximum burn amount
Gets the total airdrop supply
Returns
<none>
uint256
The total airdrop supply
Gets the total amount of tokens issued via airdrops
Returns
<none>
uint256
The total issued airdrop amount
Gets the total partnership supply
Returns
<none>
uint256
The total partnership supply
Gets the total amount of tokens issued to partners
Returns
<none>
uint256
The total issued partnership amount
Gets the contract version
Returns
<none>
uint32
The current version number
Gets the timelock address
Returns
<none>
address
The timelock address
Gets the vesting contract address for a partner
Parameters
partner
address
The address of the partner
Returns
<none>
address
The vesting contract address
Emitted when the contract is initialized
Parameters
initializer
address
The address that initialized the contract
Emitted when an airdrop is executed
Parameters
winners
address[]
Array of addresses that received the airdrop
amount
uint256
Amount of tokens each address received
Emitted when a reward is distributed
Parameters
sender
address
The address that initiated the reward
recipient
address
The address that received the reward
amount
uint256
The amount of tokens awarded
Emitted when tokens are burned
Parameters
burner
address
The address that initiated the burn
amount
uint256
The amount of tokens burned
Emitted when a new partner is added
Parameters
partner
address
The address of the partner
vestingContract
address
The address of the partner's vesting contract
amount
uint256
The amount of tokens allocated to the partner
Emitted when a partnership is cancelled
Parameters
partner
address
The address of the partner whose contract was cancelled
remainingAmount
uint256
The amount of tokens returned to the timelock
Emitted when the maximum reward amount is updated
Parameters
updater
address
The address that updated the maximum reward
oldValue
uint256
The previous maximum reward value
newValue
uint256
The new maximum reward value
Emitted when the maximum burn amount is updated
Parameters
updater
address
The address that updated the maximum burn
oldValue
uint256
The previous maximum burn value
newValue
uint256
The new maximum burn value
Emitted when the contract is upgraded
Parameters
upgrader
address
The address that performed the upgrade
newImplementation
address
The address of the new implementation
version
uint32
The new version number
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
Emitted when an emergency withdrawal is executed
Parameters
token
address
Address of the token withdrawn
amount
uint256
Amount withdrawn
Error thrown for general validation failures
Parameters
reason
string
Description of the validation failure
Error thrown if you try to upgrade while the timelock is active
Parameters
remainingTime
uint256
Time remaining in the timelock period
Thrown when trying to execute an upgrade that wasn't scheduled
Thrown when trying to execute an upgrade with wrong implementation
Parameters
expected
address
The implementation address that was scheduled
provided
address
The implementation address that was attempted
Error thrown when a zero address is provided where a non-zero address is required
Error thrown when an invalid amount is provided
Parameters
amount
uint256
The invalid amount that was provided
Error thrown when an airdrop exceeds the available supply
Parameters
requested
uint256
The amount of tokens requested for the airdrop
available
uint256
The amount of tokens actually available
Error thrown when too many recipients are provided for an airdrop
Parameters
recipients
uint256
The number of recipients that would exceed gas limits
Error thrown when a reward exceeds the maximum allowed amount
Parameters
amount
uint256
The requested reward amount
maxAllowed
uint256
The maximum allowed reward amount
Error thrown when a reward exceeds the available supply
Parameters
requested
uint256
The requested reward amount
available
uint256
The amount of tokens actually available
Error thrown when a burn exceeds the available supply
Parameters
requested
uint256
The requested burn amount
available
uint256
The amount of tokens actually available
Error thrown when a burn exceeds the maximum allowed amount
Parameters
amount
uint256
The requested burn amount
maxAllowed
uint256
The maximum allowed burn amount
Error thrown when an invalid address is provided
Error thrown when attempting to create a vesting contract for an existing partner
Parameters
partner
address
The address of the partner that already exists
Error thrown when an amount exceeds the available supply
Parameters
requested
uint256
The requested amount
available
uint256
The amount actually available
Error thrown when a maximum value update exceeds allowed limits
Parameters
amount
uint256
The requested new maximum value
maxAllowed
uint256
The maximum allowed value
Thrown when attempting to set an invalid vesting duration
Error thrown when attempting operations with zero balance
Structure to track pending upgrades with timelock
Properties
implementation
address
The address of the new implementation contract
scheduledTime
uint64
The timestamp when the upgrade was scheduled
exists
bool
Boolean flag indicating if an upgrade is currently scheduled