ILaunchpad

Interface of launchpad staking reward. Basic structs, events and errors to be used in the launchpad contract are defined in this interface.

PoolInfo

The staking pool information. Each token to be staked should be mapped one pool information.

struct PoolInfo {
  uint256 allocation;
  uint256 lastUpdatedBlock;
  uint256 rewardPerTokenStored;
  uint256 totalSupply;
  bool isActive;
}

DepositInfo

The deposit information. One deposit information should be mapped for each staking pool in which each account has deposited.

struct DepositInfo {
  uint256 amount;
  uint256 userRewardPerTokenPaid;
  uint256 reward;
}

Depositparams

Parameters required when depositing into a staking pool.

struct Depositparams {
  address token;
  uint256 amount;
  uint8 refundOption;
}

AdjustDepositParams

Parameters required when adjusting the return option for what has already been deposited in the staking pool.

struct AdjustDepositParams {
  address token;
  uint8 currentOption;
  uint8 replacementOption;
}

PoolInfoResponse

The response to be returned when requesting staking pool information.

struct PoolInfoResponse {
  uint256 totalSupply;
  uint256 dailyAllocation;
}

DepositInfoResponse

The response to be returned when requesting deposit information.

struct DepositInfoResponse {
  uint256 amount;
  uint256 rewards;
  uint256 dailyRewards;
  uint8 refundOption;
}

MiningMultiplierParams

The parameter required when set mining multiplier.

struct MiningMultiplierParams {
  uint8 refundOption;
  uint256 multiplier;
}

PoolConfig

The parameter required when set pool information.

struct PoolConfig {
  address stakingToken;
  uint256 allocation;
}

ClaimConfig

The parameter required when set claim schedule.

struct ClaimConfig {
  uint256 countLimit;
  uint256 startBlock;
  uint256 cycle;
}

InitializeParams

The parameter required when initialize.

struct InitializeParams {
  uint256 miningStartBlock;
  uint256 miningEndBlock;
  uint256 bonusSupply;
  struct ILaunchpadStaking.PoolConfig[] poolList;
  struct ILaunchpadStaking.MiningMultiplierParams[] miningMultipliers;
  struct ILaunchpadStaking.ClaimConfig claimSchedule;
}

CreatePool

event CreatePool(address token, uint256 allocation)

This event should be emit when create staking pool.

Parameters

Deposit

event Deposit(address user, address token, uint8 refundOption, uint256 amount)

This event should be emit when user deposit to staking pool.

Parameters

Withdraw

event Withdraw(address user, address token, uint8 refundOption, uint256 amount)

This event should be emit when user withdraw from staking pool.

Parameters

EmergencyWithdraw

event EmergencyWithdraw(address user, address token, uint256 amount)

This event should be emit when user emergency withdraw from staking pool.

Parameters

Refund

event Refund(address user, address token, uint256 amount)

This event should be emit when user refunded from staking pool.

Parameters

Claim

event Claim(address user, uint256 count, uint256 reward)

This event should be emit when user claim rewards.

Parameters

Collect

event Collect(address user, address token, uint256 amount)

This event should be emit when transfer token to collector.

Parameters

FixRewards

event FixRewards(address user, uint256 amount)

This event should be emit when fixed user's total rewards.

Parameters

InvalidPeriod

error InvalidPeriod(uint256 startBlock, uint256 endBlock)

It was not executed within the valid period.

Parameters

InvalidPool

error InvalidPool(address token)

The pool of token does not exist.

Parameters

InvalidDepositInfo

error InvalidDepositInfo(address user, address token, uint8 refundOption)

The deposit information does not exist.

Parameters

InvalidDepositedPool

error InvalidDepositedPool(address user, address token)

The deposited pool by token dose not exist.

Parameters

OutOfRange

error OutOfRange(uint256 first, uint256 last, uint256 input)

The input value is not a valid range value.

Parameters

ClaimUnauthorized

error ClaimUnauthorized(address user)

The user is not authorized to claim. To claim reward, the user must first withdraw deposit.

Parameters

NotYetStarted

error NotYetStarted(uint256 startingPoint)

The starting block number has not yet been reached.

Parameters

NotExistRewardOf

error NotExistRewardOf(address user)

The user's reward does not exist.

Parameters

OverTheLimit

error OverTheLimit(uint256 limit, uint256 required)

The required value is exceeds the limit value.

Parameters

OverTheDeadline

error OverTheDeadline(uint256 deadline)

Over the deadline. No more execute the function.

Parameters

BelowStandard

error BelowStandard(uint256 standard, uint256 required)

The required value is below the standard value.

Parameters

ERC20TransferFailure

error ERC20TransferFailure(address to, address from, address token, uint256 amount)

The ERC20 token transfer is failed.

Parameters

ETHTransferFailure

error ETHTransferFailure(address to, address from, uint256 amount)

The Native token transfer is failed.

Parameters