IECOSYSTEM

Git Source

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.

Functions

initialize

Initializes the ecosystem contract

Sets up the initial state of the contract, including roles and token supplies

function initialize(address token, address timelockAddr, address multisig) external;

Parameters

Name
Type
Description

token

address

Address of the governance token

timelockAddr

address

Address of the timelock controller

multisig

address

Address of the multisig wallet

pause

Pauses all contract operations

Can only be called by accounts with the PAUSER_ROLE

unpause

Resumes all contract operations

Can only be called by accounts with the PAUSER_ROLE

scheduleUpgrade

Schedules an upgrade to a new implementation

Can only be called by accounts with the UPGRADER_ROLE

Parameters

Name
Type
Description

newImplementation

address

Address of the new implementation

cancelUpgrade

Cancels a previously scheduled upgrade

Can only be called by accounts with the UPGRADER_ROLE

upgradeTimelockRemaining

Returns the remaining time before a scheduled upgrade can be executed

Returns 0 if no upgrade is scheduled or timelock has passed

Returns

Name
Type
Description

<none>

uint256

The time remaining in seconds

emergencyWithdrawToken

Emergency function to withdraw tokens to the timelock

Can only be called by accounts with the MANAGER_ROLE

Parameters

Name
Type
Description

token

address

The token to withdraw

airdrop

Distributes tokens to multiple recipients

Can only be called by accounts with the MANAGER_ROLE

Parameters

Name
Type
Description

recipients

address[]

Array of addresses to receive the airdrop

amount

uint256

Amount of tokens each recipient will receive

reward

Rewards a single address with tokens

Can only be called by accounts with the MANAGER_ROLE

Parameters

Name
Type
Description

to

address

Recipient address

amount

uint256

Amount of tokens to reward

burn

Burns tokens from the reward supply

Can only be called by accounts with the MANAGER_ROLE

Parameters

Name
Type
Description

amount

uint256

Amount of tokens to burn

addPartner

Creates a vesting contract for a new partner

Can only be called by accounts with the MANAGER_ROLE

Parameters

Name
Type
Description

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

cancelPartnership

Cancels a partner's vesting contract

Can only be called by the timelock

Parameters

Name
Type
Description

partner

address

Address of the partner

updateMaxReward

Updates the maximum one-time reward amount

Can only be called by accounts with the MANAGER_ROLE

Parameters

Name
Type
Description

newMaxReward

uint256

New maximum reward value

updateMaxBurn

Updates the maximum one-time burn amount

Can only be called by accounts with the MANAGER_ROLE

Parameters

Name
Type
Description

newMaxBurn

uint256

New maximum burn value

availableRewardSupply

Returns the available reward supply

Calculates remaining reward tokens

Returns

Name
Type
Description

<none>

uint256

Available tokens in the reward supply

availableAirdropSupply

Returns the available airdrop supply

Calculates remaining airdrop tokens

Returns

Name
Type
Description

<none>

uint256

Available tokens in the airdrop supply

availablePartnershipSupply

Returns the available partnership supply

Calculates remaining partnership tokens

Returns

Name
Type
Description

<none>

uint256

Available tokens in the partnership supply

rewardSupply

Gets the total reward supply

Returns

Name
Type
Description

<none>

uint256

The total reward supply

maxReward

Gets the maximum reward amount

Returns

Name
Type
Description

<none>

uint256

The maximum reward amount

issuedReward

Gets the total amount of tokens issued as rewards

Returns

Name
Type
Description

<none>

uint256

The total issued reward amount

burnedAmount

Gets the total amount of tokens burned

Returns

Name
Type
Description

<none>

uint256

The total burned amount

maxBurn

Gets the maximum burn amount

Returns

Name
Type
Description

<none>

uint256

The maximum burn amount

airdropSupply

Gets the total airdrop supply

Returns

Name
Type
Description

<none>

uint256

The total airdrop supply

issuedAirDrop

Gets the total amount of tokens issued via airdrops

Returns

Name
Type
Description

<none>

uint256

The total issued airdrop amount

partnershipSupply

Gets the total partnership supply

Returns

Name
Type
Description

<none>

uint256

The total partnership supply

issuedPartnership

Gets the total amount of tokens issued to partners

Returns

Name
Type
Description

<none>

uint256

The total issued partnership amount

version

Gets the contract version

Returns

Name
Type
Description

<none>

uint32

The current version number

timelock

Gets the timelock address

Returns

Name
Type
Description

<none>

address

The timelock address

vestingContracts

Gets the vesting contract address for a partner

Parameters

Name
Type
Description

partner

address

The address of the partner

Returns

Name
Type
Description

<none>

address

The vesting contract address

Events

Initialized

Emitted when the contract is initialized

Parameters

Name
Type
Description

initializer

address

The address that initialized the contract

AirDrop

Emitted when an airdrop is executed

Parameters

Name
Type
Description

winners

address[]

Array of addresses that received the airdrop

amount

uint256

Amount of tokens each address received

Reward

Emitted when a reward is distributed

Parameters

Name
Type
Description

sender

address

The address that initiated the reward

recipient

address

The address that received the reward

amount

uint256

The amount of tokens awarded

Burn

Emitted when tokens are burned

Parameters

Name
Type
Description

burner

address

The address that initiated the burn

amount

uint256

The amount of tokens burned

AddPartner

Emitted when a new partner is added

Parameters

Name
Type
Description

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

CancelPartnership

Emitted when a partnership is cancelled

Parameters

Name
Type
Description

partner

address

The address of the partner whose contract was cancelled

remainingAmount

uint256

The amount of tokens returned to the timelock

MaxRewardUpdated

Emitted when the maximum reward amount is updated

Parameters

Name
Type
Description

updater

address

The address that updated the maximum reward

oldValue

uint256

The previous maximum reward value

newValue

uint256

The new maximum reward value

MaxBurnUpdated

Emitted when the maximum burn amount is updated

Parameters

Name
Type
Description

updater

address

The address that updated the maximum burn

oldValue

uint256

The previous maximum burn value

newValue

uint256

The new maximum burn value

Upgrade

Emitted when the contract is upgraded

Parameters

Name
Type
Description

upgrader

address

The address that performed the upgrade

newImplementation

address

The address of the new implementation

version

uint32

The new version number

UpgradeScheduled

Emitted when an upgrade is scheduled

Parameters

Name
Type
Description

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

UpgradeCancelled

Emitted when a scheduled upgrade is cancelled

Parameters

Name
Type
Description

canceller

address

The address that cancelled the upgrade

implementation

address

The implementation address that was cancelled

EmergencyWithdrawal

Emitted when an emergency withdrawal is executed

Parameters

Name
Type
Description

token

address

Address of the token withdrawn

amount

uint256

Amount withdrawn

Errors

ValidationFailed

Error thrown for general validation failures

Parameters

Name
Type
Description

reason

string

Description of the validation failure

UpgradeTimelockActive

Error thrown if you try to upgrade while the timelock is active

Parameters

Name
Type
Description

remainingTime

uint256

Time remaining in the timelock period

UpgradeNotScheduled

Thrown when trying to execute an upgrade that wasn't scheduled

ImplementationMismatch

Thrown when trying to execute an upgrade with wrong implementation

Parameters

Name
Type
Description

expected

address

The implementation address that was scheduled

provided

address

The implementation address that was attempted

ZeroAddressDetected

Error thrown when a zero address is provided where a non-zero address is required

InvalidAmount

Error thrown when an invalid amount is provided

Parameters

Name
Type
Description

amount

uint256

The invalid amount that was provided

AirdropSupplyLimit

Error thrown when an airdrop exceeds the available supply

Parameters

Name
Type
Description

requested

uint256

The amount of tokens requested for the airdrop

available

uint256

The amount of tokens actually available

GasLimit

Error thrown when too many recipients are provided for an airdrop

Parameters

Name
Type
Description

recipients

uint256

The number of recipients that would exceed gas limits

RewardLimit

Error thrown when a reward exceeds the maximum allowed amount

Parameters

Name
Type
Description

amount

uint256

The requested reward amount

maxAllowed

uint256

The maximum allowed reward amount

RewardSupplyLimit

Error thrown when a reward exceeds the available supply

Parameters

Name
Type
Description

requested

uint256

The requested reward amount

available

uint256

The amount of tokens actually available

BurnSupplyLimit

Error thrown when a burn exceeds the available supply

Parameters

Name
Type
Description

requested

uint256

The requested burn amount

available

uint256

The amount of tokens actually available

MaxBurnLimit

Error thrown when a burn exceeds the maximum allowed amount

Parameters

Name
Type
Description

amount

uint256

The requested burn amount

maxAllowed

uint256

The maximum allowed burn amount

InvalidAddress

Error thrown when an invalid address is provided

PartnerExists

Error thrown when attempting to create a vesting contract for an existing partner

Parameters

Name
Type
Description

partner

address

The address of the partner that already exists

AmountExceedsSupply

Error thrown when an amount exceeds the available supply

Parameters

Name
Type
Description

requested

uint256

The requested amount

available

uint256

The amount actually available

ExcessiveMaxValue

Error thrown when a maximum value update exceeds allowed limits

Parameters

Name
Type
Description

amount

uint256

The requested new maximum value

maxAllowed

uint256

The maximum allowed value

InvalidVestingSchedule

Thrown when attempting to set an invalid vesting duration

ZeroBalance

Error thrown when attempting operations with zero balance

Structs

UpgradeRequest

Structure to track pending upgrades with timelock

Properties

Name
Type
Description

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

Last updated