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.

AdjustDepositParams

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

PoolInfoResponse

The response to be returned when requesting staking pool information.

DepositInfoResponse

The response to be returned when requesting deposit information.

MiningMultiplierParams

The parameter required when set mining multiplier.

PoolConfig

The parameter required when set pool information.

ClaimConfig

The parameter required when set claim schedule.

InitializeParams

The parameter required when initialize.

CreatePool

This event should be emit when create staking pool.

Parameters

Name
Type
Description

token

address

The staking token contract address.

allocation

uint256

The allocation of reward per block.

Deposit

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

Parameters

Name
Type
Description

user

address

The user's account address.

token

address

The staking token contract address.

refundOption

uint8

The deposited refund options.

amount

uint256

The amount of token for deposit.

Withdraw

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

Parameters

Name
Type
Description

user

address

The user's account address.

token

address

The staking token contract address.

refundOption

uint8

The deposited refund options.

amount

uint256

The amount of token for witdraw.

EmergencyWithdraw

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

Parameters

Name
Type
Description

user

address

The user's account address.

token

address

The staking token contract address.

amount

uint256

The amount of token for withdraw.

Refund

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

Parameters

Name
Type
Description

user

address

The user's account address.

token

address

the staking token contract address.

amount

uint256

The amount of token for withdraw.

Claim

This event should be emit when user claim rewards.

Parameters

Name
Type
Description

user

address

The user's account address.

count

uint256

The claim count.

reward

uint256

The amount of reward.

Collect

This event should be emit when transfer token to collector.

Parameters

Name
Type
Description

user

address

The user's account address.

token

address

The staking token contract address.

amount

uint256

The amount of token for withdraw.

FixRewards

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

Parameters

Name
Type
Description

user

address

The user's account address.

amount

uint256

Total claimable rewards.

InvalidPeriod

It was not executed within the valid period.

Parameters

Name
Type
Description

startBlock

uint256

The starting block number.

endBlock

uint256

The end block number.

InvalidPool

The pool of token does not exist.

Parameters

Name
Type
Description

token

address

The staking token contract address.

InvalidDepositInfo

The deposit information does not exist.

Parameters

Name
Type
Description

user

address

The user's account address.

token

address

The staking token contract address.

refundOption

uint8

The deposited refund option.

InvalidDepositedPool

The deposited pool by token dose not exist.

Parameters

Name
Type
Description

user

address

The user's account address.

token

address

The staking token contract address.

OutOfRange

The input value is not a valid range value.

Parameters

Name
Type
Description

first

uint256

The first value in range.

last

uint256

The last value in range.

input

uint256

The input value.

ClaimUnauthorized

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

Parameters

Name
Type
Description

user

address

The user's account address.

NotYetStarted

The starting block number has not yet been reached.

Parameters

Name
Type
Description

startingPoint

uint256

The starting block number.

NotExistRewardOf

The user's reward does not exist.

Parameters

Name
Type
Description

user

address

The user's account address.

OverTheLimit

The required value is exceeds the limit value.

Parameters

Name
Type
Description

limit

uint256

The limit value.

required

uint256

The required value.

OverTheDeadline

Over the deadline. No more execute the function.

Parameters

Name
Type
Description

deadline

uint256

The block number for deadline.

BelowStandard

The required value is below the standard value.

Parameters

Name
Type
Description

standard

uint256

The standard value.

required

uint256

The required value.

ERC20TransferFailure

The ERC20 token transfer is failed.

Parameters

Name
Type
Description

to

address

The address of receiver.

from

address

The address of sender.

token

address

The token contract address for transfer.

amount

uint256

The amount for transfer.

ETHTransferFailure

The Native token transfer is failed.

Parameters

Name
Type
Description

to

address

The address of receiver.

from

address

The address of sender.

amount

uint256

The amount for transfer.