staker.gno

Stakes or unstakes a position obtained from adding liquidity.

StakeToken

StakeToken stakes a position.

Parameters

Name
Type
Description

cur

realm

Pass cross as argument.

positionId

uint64

The ID of the position to stake.

referrer

string

The referrer address for reward tracking.

Return Values

Name
Type
Description

poolPath

string

The path of the pool that the position exists.

UnStakeToken

UnStakeToken unstakes a position.

Parameters

Name
Type
Description

cur

realm

Pass cross as argument.

positionId

uint64

The ID of the position to unstake.

unwrapResult

bool

Whether to unwrap WGNOT to GNOT.

Return Values

Name
Type
Description

poolPath

string

The path of the pool that the position will be unstaked from.

CollectReward

CollectReward collects staking rewards accrued to a position.

Parameters

Name
Type
Description

cur

realm

Pass cross as argument.

positionId

uint64

The ID of the position to collect incentives from.

unwrapResult

bool

(if position has wugnot fee) whether to receive reward in ugnot or not.

Return Values

Name
Type
Description

poolPath

string

The path of the pool that the position exists.

stakeDetail

string

The staking details.

internalRewards

map[string]int64

The internal rewards.

externalRewards

map[string]int64

The external rewards.

Last updated