Kind Realm (renderable)
Name staker
Namespace gnoswap
Exported functions 102
Module gno.land/r/gnoswap/staker
gno 0.9 getter.gno gno
⧉
1 package staker 2 3 import ( 4 u256 "gno.land/p/gnoswap/uint256/v1" 5 rotree "gno.land/p/nt/bptree/rotree/v0" 6 ) 7 8 AddToken (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string)
CancelExternalIncentive (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, incentiveId string)
ChangePoolTier (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, poolPath string, tier uint64)
CollectableEmissionReward (positionId uint64) (int64, interface {Error func() string})
CollectableExternalIncentiveReward (positionId uint64, incentiveId string) (int64, interface {Error func() string})
CollectEmissionReward (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64) (int64, int64)
CollectExternalIncentivePenalty (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, incentiveId string, refundAddress string) int64
CollectExternalIncentiveReward (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, incentiveId string) (int64, int64)
CollectReward (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64) (string, string, map[string]int64, map[string]int64)
CreateExternalIncentive (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64)
DefaultAllowedTokens () []string
DefaultWarmupTemplate () []gno.land/r/gnoswap/staker.Warmup
EndExternalIncentive (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, incentiveId string, refundAddress string)
GetAllowedTokens () []string
GetCreatedHeightOfIncentive (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetDeniedRewardTokens () []string
GetDeposit (lpTokenId uint64) (*gno.land/r/gnoswap/staker.Deposit, interface {Error func() string})
GetDepositCollectedExternalReward (lpTokenId uint64, incentiveId string) (int64, interface {Error func() string})
GetDepositCollectedInternalReward (lpTokenId uint64) (int64, interface {Error func() string})
GetDepositExternalIncentiveIdList (lpTokenId uint64) ([]string, interface {Error func() string})
GetDepositExternalRewardLastCollectTimestamp (lpTokenId uint64, incentiveId string) (int64, interface {Error func() string})
GetDepositGnsAmount () int64
GetDepositInternalRewardLastCollectTimestamp (lpTokenId uint64) (int64, interface {Error func() string})
GetDepositLiquidity (lpTokenId uint64) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetDepositLiquidityAsString (lpTokenId uint64) (string, interface {Error func() string})
GetDepositOwner (lpTokenId uint64) (string, interface {Error func() string})
GetDepositStakeTime (lpTokenId uint64) (int64, interface {Error func() string})
GetDepositTargetPoolPath (lpTokenId uint64) (string, interface {Error func() string})
GetDepositTickLower (lpTokenId uint64) (int32, interface {Error func() string})
GetDepositTickUpper (lpTokenId uint64) (int32, interface {Error func() string})
GetDepositWarmUp (lpTokenId uint64) ([]gno.land/r/gnoswap/staker.Warmup, interface {Error func() string})
GetExternalIncentiveByPoolPath (poolPath string) ([]gno.land/r/gnoswap/staker.ExternalIncentive, interface {Error func() string})
GetImplementationPackagePath () string
GetIncentiveAccumulatedPenaltyAmount (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveCreatedTimestamp (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveCreator (poolPath string, incentiveId string) (string, interface {Error func() string})
GetIncentiveDepositGnsAmount (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveDistributedRewardAmount (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveEndTimestamp (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveRefunded (poolPath string, incentiveId string) (bool, interface {Error func() string})
GetIncentiveRemainingRewardAmount (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveRewardAmount (poolPath string, incentiveId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetIncentiveRewardAmountAsString (poolPath string, incentiveId string) (string, interface {Error func() string})
GetIncentiveRewardPerSecondX128 (poolPath string, incentiveId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetIncentiveRewardToken (poolPath string, incentiveId string) (string, interface {Error func() string})
GetIncentiveStartTimestamp (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveTotalRewardAmount (poolPath string, incentiveId string) (int64, interface {Error func() string})
GetMinimumRewardAmount () int64
GetMinimumRewardAmountForToken (tokenPath string) int64
GetPendingProtocolFees () map[string]int64
GetPool (poolPath string) (*gno.land/r/gnoswap/staker.Pool, interface {Error func() string})
GetPoolGlobalRewardRatioAccumulations (poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolHistoricalTicks (poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolIncentives (poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolReward (tier uint64) (int64, interface {Error func() string})
GetPoolRewardCaches (poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolsByTier (tier uint64) ([]string, interface {Error func() string})
GetPoolStakedLiquidity (poolPath string) (string, interface {Error func() string})
GetPoolTier (poolPath string) uint64
GetPoolTierCount (tier uint64) uint64
GetPoolTierRatio (poolPath string) (uint64, interface {Error func() string})
GetSpecificTokenMinimumRewardAmount (tokenPath string) (int64, bool)
GetTargetPoolPathByIncentiveId (poolPath string, incentiveId string) (string, interface {Error func() string})
GetTotalEmissionSent () int64
GetUncollectedIncentiveCount (incentiveId string) int64
GetUnstakedPositionExitTime (positionId uint64) (int64, interface {Error func() string})
GetUnstakedPositionPendingIncentives (positionId uint64) ([]string, interface {Error func() string})
GetUnstakingFee () uint64
GetWarmupTemplate () []gno.land/r/gnoswap/staker.Warmup
HasUnstakedPosition (positionId uint64) bool
IsIncentiveActive (poolPath string, incentiveId string) (bool, interface {Error func() string})
IsStaked (positionId uint64) bool
NewBPTreeN (fanout int) *gno.land/p/nt/bptree/v0.BPTree
NewCounter () *gno.land/r/gnoswap/staker.Counter
NewDeposit (owner string, targetPoolPath string, liquidity *gno.land/p/gnoswap/uint256/v1.Uint, currentTime int64, tickLower int32, tickUpper int32, warmups []gno.land/r/gnoswap/staker.Warmup) *gno.land/r/gnoswap/staker.Deposit
NewExternalIncentive (incentiveId string, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64, creator string, depositGnsAmount int64, createdHeight int64, currentTime int64) *gno.land/r/gnoswap/staker.ExternalIncentive
NewIncentives (targetPoolPath string) *gno.land/r/gnoswap/staker.Incentives
NewPool (poolPath string, currentTime int64) *gno.land/r/gnoswap/staker.Pool
NewStakerStore (kvStore interface {AddAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error; Delete func(int, .uverse.realm, string) .uverse.error; Get func(string) (interface {}, .uverse.error); GetAddress func(string) (.uverse.address, .uverse.error); GetAllKeys func() ([]string, .uverse.error); GetAuthorizedCallers func() (map[.uverse.address]gno.land/p/gnoswap/store/v1.Permission, .uverse.error); GetBPTree func(string) (*gno.land/p/nt/bptree/v0.BPTree, .uverse.error); GetBool func(string) (bool, .uverse.error); GetDomainAddress func() .uverse.address; GetInt64 func(string) (int64, .uverse.error); GetString func(string) (string, .uverse.error); GetUint64 func(string) (uint64, .uverse.error); Has func(string) bool; IsWriteAuthorized func(.uverse.address) bool; RemoveAuthorizedCaller func(int, .uverse.realm, .uverse.address) .uverse.error; Set func(int, .uverse.realm, string, interface {}) .uverse.error; UpdateAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error}) interface {AddAllowedToken func(int, .uverse.realm, string) .uverse.error; AddDeniedRewardToken func(int, .uverse.realm, string) .uverse.error; GetAllowedTokens func() []string; GetCurrentSwapBatch func() *gno.land/r/gnoswap/staker.SwapBatchProcessor; GetDeniedRewardTokens func() []string; GetDepositGnsAmount func() int64; GetDeposits func() *gno.land/p/nt/bptree/v0.BPTree; GetExternalIncentives func() *gno.land/p/nt/bptree/v0.BPTree; GetIncentiveCounter func() *gno.land/r/gnoswap/staker.Counter; GetMinimumRewardAmount func() int64; GetPendingProtocolFee func(string) int64; GetPendingProtocolFees func() map[string]int64; GetPoolTierCounts func() [4]uint64; GetPoolTierCurrentEmission func() int64; GetPoolTierGetEmission func() func() (int64, .uverse.error); GetPoolTierGetHalvingBlocksInRange func() func(int64, int64) ([]int64, []int64, .uverse.error); GetPoolTierLastRewardCacheTimestamp func() int64; GetPoolTierMemberships func() *gno.land/p/nt/bptree/v0.BPTree; GetPoolTierRatio func() gno.land/r/gnoswap/staker.TierRatio; GetPools func() *gno.land/p/nt/bptree/v0.BPTree; GetTokenSpecificMinimumRewards func() map[string]int64; GetTotalEmissionSent func() int64; GetUncollectedIncentiveCounts func() *gno.land/p/nt/bptree/v0.BPTree; GetUnstakedPositions func() *gno.land/p/nt/bptree/v0.BPTree; GetUnstakingFee func() uint64; GetWarmupTemplate func() []gno.land/r/gnoswap/staker.Warmup; HasAllowedTokensStoreKey func() bool; HasCurrentSwapBatchStoreKey func() bool; HasDeniedRewardTokensStoreKey func() bool; HasDepositGnsAmountStoreKey func() bool; HasDepositsStoreKey func() bool; HasExternalIncentivesStoreKey func() bool; HasIncentiveCounterStoreKey func() bool; HasMinimumRewardAmountStoreKey func() bool; HasPendingProtocolFeesStoreKey func() bool; HasPoolTierCountsStoreKey func() bool; HasPoolTierCurrentEmissionStoreKey func() bool; HasPoolTierGetEmissionStoreKey func() bool; HasPoolTierGetHalvingBlocksInRangeStoreKey func() bool; HasPoolTierLastRewardCacheTimestampStoreKey func() bool; HasPoolTierMembershipsStoreKey func() bool; HasPoolTierRatioStoreKey func() bool; HasPoolsStoreKey func() bool; HasTokenSpecificMinimumRewardsStoreKey func() bool; HasTotalEmissionSentStoreKey func() bool; HasUncollectedIncentiveCountsStoreKey func() bool; HasUnstakedPositionsStoreKey func() bool; HasUnstakingFeeStoreKey func() bool; HasWarmupTemplateStoreKey func() bool; NextIncentiveID func(.uverse.address, int64) string; RemoveAllowedToken func(int, .uverse.realm, string) .uverse.error; RemoveDeniedRewardToken func(int, .uverse.realm, string) .uverse.error; RemovePendingProtocolFee func(int, .uverse.realm, string) .uverse.error; RemoveTokenSpecificMinimumRewardItem func(int, .uverse.realm, string) .uverse.error; SetAllowedTokens func(int, .uverse.realm, []string) .uverse.error; SetCurrentSwapBatch func(int, .uverse.realm, *gno.land/r/gnoswap/staker.SwapBatchProcessor) .uverse.error; SetDepositGnsAmount func(int, .uverse.realm, int64) .uverse.error; SetDeposits func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetExternalIncentives func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetIncentiveCounter func(int, .uverse.realm, *gno.land/r/gnoswap/staker.Counter) .uverse.error; SetMinimumRewardAmount func(int, .uverse.realm, int64) .uverse.error; SetPendingProtocolFee func(int, .uverse.realm, string, int64) .uverse.error; SetPendingProtocolFees func(int, .uverse.realm, map[string]int64) .uverse.error; SetPoolTierCounts func(int, .uverse.realm, [4]uint64) .uverse.error; SetPoolTierCurrentEmission func(int, .uverse.realm, int64) .uverse.error; SetPoolTierGetEmission func(int, .uverse.realm, func() (int64, .uverse.error)) .uverse.error; SetPoolTierGetHalvingBlocksInRange func(int, .uverse.realm, func(int64, int64) ([]int64, []int64, .uverse.error)) .uverse.error; SetPoolTierLastRewardCacheTimestamp func(int, .uverse.realm, int64) .uverse.error; SetPoolTierMemberships func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetPoolTierRatio func(int, .uverse.realm, gno.land/r/gnoswap/staker.TierRatio) .uverse.error; SetPools func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetTokenSpecificMinimumRewardItem func(int, .uverse.realm, string, int64) .uverse.error; SetTokenSpecificMinimumRewards func(int, .uverse.realm, map[string]int64) .uverse.error; SetTotalEmissionSent func(int, .uverse.realm, int64) .uverse.error; SetUncollectedIncentiveCounts func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetUnstakedPositions func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetUnstakingFee func(int, .uverse.realm, uint64) .uverse.error; SetWarmupTemplate func(int, .uverse.realm, []gno.land/r/gnoswap/staker.Warmup) .uverse.error}
NewSwapBatchProcessor (poolPath string, pool *gno.land/r/gnoswap/staker.Pool, timestamp int64) *gno.land/r/gnoswap/staker.SwapBatchProcessor
NewSwapTickCross (tickID int32, zeroForOne bool, delta *gno.land/p/gnoswap/int256/v1.Int) *gno.land/r/gnoswap/staker.SwapTickCross
NewTick (tickId int32) *gno.land/r/gnoswap/staker.Tick
NewTicks () struct{tree *gno.land/p/nt/bptree/v0.BPTree}
NewTierRatio (tier1 uint64, tier2 uint64, tier3 uint64) struct{Tier1 uint64; Tier2 uint64; Tier3 uint64}
NewUintTree () *gno.land/r/gnoswap/staker.UintTree
NewUintTreeN (fanout int) *gno.land/r/gnoswap/staker.UintTree
NewUnstakedPosition (deposit *gno.land/r/gnoswap/staker.Deposit, exitTime int64, exitTick int32, lowerTick *gno.land/r/gnoswap/staker.Tick, upperTick *gno.land/r/gnoswap/staker.Tick, lowerOutsideAcc string, upperOutsideAcc string, tier uint64, tierRatio uint64, tierCount uint64, unstakingFee uint64, pendingIncentiveIds []string) *gno.land/r/gnoswap/staker.UnstakedPosition
NewWarmup (timeDuration int64, nextWarmupTime int64, warmupRatio uint64) struct{TimeDuration int64; NextWarmupTime int64; WarmupRatio uint64}
RegisterInitializer (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, initializer func(int, .uverse.realm, gno.land/r/gnoswap/staker.IStakerStore, gno.land/r/gnoswap/staker.PoolAccessor, gno.land/r/gnoswap/staker.EmissionAccessor, gno.land/r/gnoswap/staker.NFTAccessor) gno.land/r/gnoswap/staker.IStaker)
RemovePoolTier (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, poolPath string)
RemoveToken (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string)
Render (path string) string
SetDeniedRewardToken (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string, denied bool)
SetDepositGnsAmount (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, amount int64)
SetMinimumRewardAmount (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, amount int64)
SetPoolTier (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, poolPath string, tier uint64)
SetTokenMinimumRewardAmount (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, paramsStr string)
SetUnStakingFee (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, fee uint64)
SetWarmUp (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, pct int64, timeDuration int64)
StakeToken (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, referrer string) string
UnStakeToken (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64) string
UpgradeImpl (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, packagePath string)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
// IStakerGetter functions
9
10 // GetPool returns a copy of the staking state for a pool.
11 //
12 // Parameters:
13 // - poolPath: pool realm path
14 //
15 // Returns:
16 // - pool: independent pool copy, or nil when an implementation has no pool value
17 // - err: implementation resolution error; the current v1 implementation returns not-found for a missing pool
18 func GetPool(poolPath string ) (*Pool, error ) {
19 pool, err := getImplementation().GetPool(poolPath)
20 if err != nil {
21 return nil , err
22 }
23 if pool == nil {
24 return nil , nil
25 }
26 return pool.Clone(), nil
27 }
28
29 // GetDeposit returns a copy of a staked position's deposit.
30 //
31 // Parameters:
32 // - lpTokenId: staked position NFT token ID
33 //
34 // Returns:
35 // - deposit: independent deposit copy, or nil when an implementation has no deposit value
36 // - err: implementation resolution error; the current v1 implementation returns not-found for a missing deposit
37 func GetDeposit(lpTokenId uint64 ) (*Deposit, error ) {
38 deposit, err := getImplementation().GetDeposit(lpTokenId)
39 if err != nil {
40 return nil , err
41 }
42 if deposit == nil {
43 return nil , nil
44 }
45 return deposit.Clone(), nil
46 }
47
48 // CollectableEmissionReward returns the claimable internal GNS reward for a live staked deposit or
49 // an exit checkpoint left by UnStakeToken.
50 //
51 // Parameters:
52 // - positionId: staked position NFT token ID or position with an exit checkpoint
53 //
54 // Returns:
55 // - amount: claimable internal reward amount
56 // - err: non-nil when positionId cannot be resolved
57 func CollectableEmissionReward(positionId uint64 ) ( int64 , error ) {
58 return getImplementation().CollectableEmissionReward(positionId)
59 }
60
61 // CollectableExternalIncentiveReward returns a position's claimable external reward for a live
62 // staked deposit or an exit checkpoint left by UnStakeToken.
63 //
64 // Parameters:
65 // - positionId: staked position NFT token ID or position with an exit checkpoint
66 // - incentiveId: external incentive identifier
67 //
68 // Returns:
69 // - amount: claimable external reward amount
70 // - err: non-nil when the position or incentive cannot be resolved
71 func CollectableExternalIncentiveReward(positionId uint64 , incentiveId string ) ( int64 , error ) {
72 return getImplementation().CollectableExternalIncentiveReward(positionId, incentiveId)
73 }
74
75 // GetCreatedHeightOfIncentive returns an incentive's creation block height.
76 //
77 // Parameters:
78 // - poolPath: pool realm path
79 // - incentiveId: external incentive identifier
80 //
81 // Returns:
82 // - height: creation block height
83 // - err: non-nil when the incentive cannot be resolved
84 func GetCreatedHeightOfIncentive(poolPath string , incentiveId string ) ( int64 , error ) {
85 return getImplementation().GetCreatedHeightOfIncentive(poolPath, incentiveId)
86 }
87
88 // GetIncentiveCreatedTimestamp returns an incentive's creation timestamp.
89 //
90 // Parameters:
91 // - poolPath: pool realm path
92 // - incentiveId: external incentive identifier
93 //
94 // Returns:
95 // - timestamp: creation Unix timestamp
96 // - err: non-nil when the incentive cannot be resolved
97 func GetIncentiveCreatedTimestamp(poolPath string , incentiveId string ) ( int64 , error ) {
98 return getImplementation().GetIncentiveCreatedTimestamp(poolPath, incentiveId)
99 }
100
101 // GetIncentiveTotalRewardAmount returns the total reward amount of an incentive.
102 //
103 // Parameters:
104 // - poolPath: Pool path containing the incentive record.
105 // - incentiveId: External incentive identifier to resolve.
106 //
107 // Returns:
108 // - amount: Total reward amount configured when the incentive was created, in token units.
109 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
110 func GetIncentiveTotalRewardAmount(poolPath string , incentiveId string ) ( int64 , error ) {
111 return getImplementation().GetIncentiveTotalRewardAmount(poolPath, incentiveId)
112 }
113
114 // GetIncentiveDistributedRewardAmount returns the distributed reward amount of an incentive.
115 //
116 // Parameters:
117 // - poolPath: Pool path containing the incentive record.
118 // - incentiveId: External incentive identifier to resolve.
119 //
120 // Returns:
121 // - amount: Reward amount already delivered to positions or refunded at incentive end, in token units.
122 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
123 func GetIncentiveDistributedRewardAmount(poolPath string , incentiveId string ) ( int64 , error ) {
124 return getImplementation().GetIncentiveDistributedRewardAmount(poolPath, incentiveId)
125 }
126
127 // GetIncentiveRemainingRewardAmount returns the remaining reward amount of an incentive.
128 //
129 // Parameters:
130 // - poolPath: Pool path containing the incentive record.
131 // - incentiveId: External incentive identifier to resolve.
132 //
133 // Returns:
134 // - amount: Mutable reward balance remaining after distributions and refunds, in token units.
135 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
136 func GetIncentiveRemainingRewardAmount(poolPath string , incentiveId string ) ( int64 , error ) {
137 return getImplementation().GetIncentiveRemainingRewardAmount(poolPath, incentiveId)
138 }
139
140 // GetIncentiveAccumulatedPenaltyAmount returns the accumulated warmup penalty amount of an incentive.
141 //
142 // Parameters:
143 // - poolPath: Pool path containing the incentive record.
144 // - incentiveId: External incentive identifier to resolve.
145 //
146 // Returns:
147 // - amount: Warmup penalty accumulated from collections for the incentive, in reward-token units.
148 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
149 func GetIncentiveAccumulatedPenaltyAmount(poolPath string , incentiveId string ) ( int64 , error ) {
150 return getImplementation().GetIncentiveAccumulatedPenaltyAmount(poolPath, incentiveId)
151 }
152
153 // GetIncentiveDepositGnsAmount returns the deposited GNS amount of an incentive.
154 //
155 // Parameters:
156 // - poolPath: Pool path containing the incentive record.
157 // - incentiveId: External incentive identifier to resolve.
158 //
159 // Returns:
160 // - amount: GNS deposit locked by the incentive, in token units.
161 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
162 func GetIncentiveDepositGnsAmount(poolPath string , incentiveId string ) ( int64 , error ) {
163 return getImplementation().GetIncentiveDepositGnsAmount(poolPath, incentiveId)
164 }
165
166 // GetIncentiveRefunded returns whether an incentive has been refunded.
167 //
168 // Parameters:
169 // - poolPath: Pool path containing the incentive record.
170 // - incentiveId: External incentive identifier to resolve.
171 //
172 // Returns:
173 // - refunded: True when the incentive has been finalized as refunded; false while it remains open.
174 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
175 func GetIncentiveRefunded(poolPath string , incentiveId string ) ( bool , error ) {
176 return getImplementation().GetIncentiveRefunded(poolPath, incentiveId)
177 }
178
179 // IsIncentiveActive reports whether an unrefunded incentive is active, including both start and end timestamps.
180 //
181 // Parameters:
182 // - poolPath: Pool path containing the incentive record.
183 // - incentiveId: External incentive identifier to resolve.
184 //
185 // Returns:
186 // - active: True when the current Unix time is within the incentive window and it has not been refunded.
187 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
188 func IsIncentiveActive(poolPath string , incentiveId string ) ( bool , error ) {
189 return getImplementation().IsIncentiveActive(poolPath, incentiveId)
190 }
191
192 // GetDepositExternalRewardLastCollectTimestamp returns the last external reward collection time for
193 // a position and incentive. For a newly tracked incentive, the value is based on the stake timestamp.
194 //
195 // Parameters:
196 // - lpTokenId: Position NFT token ID whose external reward cursor should be read.
197 // - incentiveId: External incentive identifier whose collection cursor should be read.
198 //
199 // Returns:
200 // - timestamp: Unix timestamp of the last collection cursor; newly tracked incentives use the deposit's stake time.
201 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
202 func GetDepositExternalRewardLastCollectTimestamp(lpTokenId uint64 , incentiveId string ) ( int64 , error ) {
203 return getImplementation().GetDepositExternalRewardLastCollectTimestamp(lpTokenId, incentiveId)
204 }
205
206 // GetDepositGnsAmount returns the GNS deposit required for each external incentive.
207 //
208 // Returns:
209 // - amount: Configured GNS deposit required per external incentive, in token units.
210 func GetDepositGnsAmount() int64 {
211 return getImplementation().GetDepositGnsAmount()
212 }
213
214 // GetDepositInternalRewardLastCollectTimestamp returns the last internal reward collection time for a position.
215 //
216 // Parameters:
217 // - lpTokenId: Position NFT token ID whose internal reward cursor should be read.
218 //
219 // Returns:
220 // - timestamp: Unix timestamp of the deposit's last internal reward collection.
221 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
222 func GetDepositInternalRewardLastCollectTimestamp(lpTokenId uint64 ) ( int64 , error ) {
223 return getImplementation().GetDepositInternalRewardLastCollectTimestamp(lpTokenId)
224 }
225
226 // GetDepositCollectedInternalReward returns the collected internal reward amount of a position.
227 //
228 // Parameters:
229 // - lpTokenId: Position NFT token ID whose collected internal reward should be read.
230 //
231 // Returns:
232 // - amount: Internal GNS reward amount already recorded as collected, in token units.
233 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
234 func GetDepositCollectedInternalReward(lpTokenId uint64 ) ( int64 , error ) {
235 return getImplementation().GetDepositCollectedInternalReward(lpTokenId)
236 }
237
238 // GetDepositCollectedExternalReward returns the collected external reward amount of a position.
239 //
240 // Parameters:
241 // - lpTokenId: Position NFT token ID whose collected reward should be read.
242 // - incentiveId: External incentive identifier whose collected amount should be read.
243 //
244 // Returns:
245 // - amount: External reward amount already recorded as collected for the incentive, in token units.
246 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
247 func GetDepositCollectedExternalReward(lpTokenId uint64 , incentiveId string ) ( int64 , error ) {
248 return getImplementation().GetDepositCollectedExternalReward(lpTokenId, incentiveId)
249 }
250
251 // GetDepositLiquidity returns the liquidity amount of a staked position.
252 //
253 // Parameters:
254 // - lpTokenId: Position NFT token ID whose liquidity should be read.
255 //
256 // Returns:
257 // - liquidity: Independent uint256 copy of the deposit's liquidity amount.
258 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
259 func GetDepositLiquidity(lpTokenId uint64 ) (*u256.Uint, error ) {
260 liquidity, err := getImplementation().GetDepositLiquidity(lpTokenId)
261 if err != nil {
262 return nil , err
263 }
264 return liquidity.Clone(), nil
265 }
266
267 // GetDepositLiquidityAsString returns the liquidity amount of a staked position as a decimal string.
268 //
269 // Parameters:
270 // - lpTokenId: Position NFT token ID whose liquidity should be formatted.
271 //
272 // Returns:
273 // - liquidity: Decimal representation of the deposit's uint256 liquidity amount.
274 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
275 func GetDepositLiquidityAsString(lpTokenId uint64 ) ( string , error ) {
276 return getImplementation().GetDepositLiquidityAsString(lpTokenId)
277 }
278
279 // GetDepositOwner returns the owner of a staked position.
280 //
281 // Parameters:
282 // - lpTokenId: Position NFT token ID whose owner should be read.
283 //
284 // Returns:
285 // - owner: Address recorded as the deposit owner.
286 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
287 func GetDepositOwner(lpTokenId uint64 ) (address, error ) {
288 return getImplementation().GetDepositOwner(lpTokenId)
289 }
290
291 // GetDepositStakeTime returns the Unix timestamp at which a position was staked.
292 //
293 // Parameters:
294 // - lpTokenId: Position NFT token ID whose stake time should be read.
295 //
296 // Returns:
297 // - stakeTime: Unix timestamp recorded when the deposit entered staking.
298 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
299 func GetDepositStakeTime(lpTokenId uint64 ) ( int64 , error ) {
300 return getImplementation().GetDepositStakeTime(lpTokenId)
301 }
302
303 // GetDepositTargetPoolPath returns the pool path of a staked position.
304 //
305 // Parameters:
306 // - lpTokenId: Position NFT token ID whose target pool should be read.
307 //
308 // Returns:
309 // - poolPath: Pool path stored on the deposit.
310 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
311 func GetDepositTargetPoolPath(lpTokenId uint64 ) ( string , error ) {
312 return getImplementation().GetDepositTargetPoolPath(lpTokenId)
313 }
314
315 // GetDepositTickLower returns the lower tick of a staked position.
316 //
317 // Parameters:
318 // - lpTokenId: Position NFT token ID whose lower boundary should be read.
319 //
320 // Returns:
321 // - tickLower: Lower price-range tick stored on the deposit.
322 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
323 func GetDepositTickLower(lpTokenId uint64 ) ( int32 , error ) {
324 return getImplementation().GetDepositTickLower(lpTokenId)
325 }
326
327 // GetDepositTickUpper returns the upper tick of a staked position.
328 //
329 // Parameters:
330 // - lpTokenId: Position NFT token ID whose upper boundary should be read.
331 //
332 // Returns:
333 // - tickUpper: Upper price-range tick stored on the deposit.
334 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
335 func GetDepositTickUpper(lpTokenId uint64 ) ( int32 , error ) {
336 return getImplementation().GetDepositTickUpper(lpTokenId)
337 }
338
339 // GetDepositWarmUp returns the warmup records of a staked position.
340 //
341 // Parameters:
342 // - lpTokenId: Position NFT token ID whose warmup schedule should be inspected.
343 //
344 // Returns:
345 // - warmups: Independent copy of the deposit's warmup records.
346 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
347 func GetDepositWarmUp(lpTokenId uint64 ) ([]Warmup, error ) {
348 warmups, err := getImplementation().GetDepositWarmUp(lpTokenId)
349 if err != nil {
350 return nil , err
351 }
352 return cloneWarmups(warmups), nil
353 }
354
355 // GetDepositExternalIncentiveIdList returns external incentive IDs tracked by a deposit.
356 //
357 // Parameters:
358 // - lpTokenId: Position NFT token ID whose deposit should be inspected.
359 //
360 // Returns:
361 // - incentiveIds: Independent copy of external incentive IDs associated with the deposit.
362 // - err: Non-nil when lpTokenId does not resolve to a stored deposit.
363 func GetDepositExternalIncentiveIdList(lpTokenId uint64 ) ([] string , error ) {
364 ids, err := getImplementation().GetDepositExternalIncentiveIdList(lpTokenId)
365 if err != nil {
366 return nil , err
367 }
368 return cloneStringSlice(ids), nil
369 }
370
371 // GetExternalIncentiveByPoolPath returns all external incentives for a pool.
372 //
373 // Parameters:
374 // - poolPath: Pool path whose external incentives should be listed.
375 //
376 // Returns:
377 // - incentives: Independent copies of incentives targeting poolPath.
378 // - err: Non-nil when stored incentive data cannot be read or cast.
379 func GetExternalIncentiveByPoolPath(poolPath string ) ([]ExternalIncentive, error ) {
380 incentives, err := getImplementation().GetExternalIncentiveByPoolPath(poolPath)
381 if err != nil {
382 return nil , err
383 }
384 return cloneExternalIncentives(incentives), nil
385 }
386
387 // GetIncentiveEndTimestamp returns the end timestamp of an incentive.
388 //
389 // Parameters:
390 // - poolPath: Pool path containing the incentive record.
391 // - incentiveId: External incentive identifier to resolve.
392 //
393 // Returns:
394 // - endTimestamp: Incentive end time as a Unix timestamp.
395 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
396 func GetIncentiveEndTimestamp(poolPath string , incentiveId string ) ( int64 , error ) {
397 return getImplementation().GetIncentiveEndTimestamp(poolPath, incentiveId)
398 }
399
400 // GetIncentiveCreator returns the creator address of an incentive.
401 //
402 // Parameters:
403 // - poolPath: Pool path containing the incentive record.
404 // - incentiveId: External incentive identifier to resolve.
405 //
406 // Returns:
407 // - creator: Address that created and funded the incentive.
408 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
409 func GetIncentiveCreator(poolPath string , incentiveId string ) (address, error ) {
410 return getImplementation().GetIncentiveCreator(poolPath, incentiveId)
411 }
412
413 // GetIncentiveRewardAmount returns the remaining reward amount of an incentive, after deliveries
414 // and refunds represented by the current incentive state.
415 //
416 // Parameters:
417 // - poolPath: Pool path containing the incentive record.
418 // - incentiveId: External incentive identifier to resolve.
419 //
420 // Returns:
421 // - amount: Independent uint256 copy of the incentive's mutable remaining reward amount.
422 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
423 func GetIncentiveRewardAmount(poolPath string , incentiveId string ) (*u256.Uint, error ) {
424 amount, err := getImplementation().GetIncentiveRewardAmount(poolPath, incentiveId)
425 if err != nil {
426 return nil , err
427 }
428 return amount.Clone(), nil
429 }
430
431 // GetIncentiveRewardAmountAsString returns the remaining reward amount of an incentive as string.
432 //
433 // Parameters:
434 // - poolPath: Pool path containing the incentive record.
435 // - incentiveId: External incentive identifier to resolve.
436 //
437 // Returns:
438 // - amount: Decimal string for the incentive's remaining reward amount after deliveries and refunds.
439 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
440 func GetIncentiveRewardAmountAsString(poolPath string , incentiveId string ) ( string , error ) {
441 return getImplementation().GetIncentiveRewardAmountAsString(poolPath, incentiveId)
442 }
443
444 // GetIncentiveRewardPerSecondX128 returns the reward rate per second of an
445 // incentive, expressed as a Q128 fixed-point number (i.e. actual rate =
446 // value / 2^128). Callers needing an integer rate can right-shift the result
447 // by 128.
448 //
449 // Parameters:
450 // - poolPath: Pool path containing the incentive record.
451 // - incentiveId: External incentive identifier to resolve.
452 //
453 // Returns:
454 // - rateX128: Clone of the Q128-scaled reward rate; divide by 2^128 to recover the actual token units per second.
455 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
456 func GetIncentiveRewardPerSecondX128(poolPath string , incentiveId string ) (*u256.Uint, error ) {
457 amount, err := getImplementation().GetIncentiveRewardPerSecondX128(poolPath, incentiveId)
458 if err != nil {
459 return nil , err
460 }
461 return amount.Clone(), nil
462 }
463
464 // GetIncentiveRewardToken returns the reward token of an incentive.
465 //
466 // Parameters:
467 // - poolPath: Pool path containing the incentive record.
468 // - incentiveId: External incentive identifier to resolve.
469 //
470 // Returns:
471 // - tokenPath: Reward-token path configured for the incentive.
472 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
473 func GetIncentiveRewardToken(poolPath string , incentiveId string ) ( string , error ) {
474 return getImplementation().GetIncentiveRewardToken(poolPath, incentiveId)
475 }
476
477 // GetIncentiveStartTimestamp returns the start timestamp of an incentive.
478 //
479 // Parameters:
480 // - poolPath: Pool path containing the incentive record.
481 // - incentiveId: External incentive identifier to resolve.
482 //
483 // Returns:
484 // - startTimestamp: Incentive start time as a Unix timestamp.
485 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
486 func GetIncentiveStartTimestamp(poolPath string , incentiveId string ) ( int64 , error ) {
487 return getImplementation().GetIncentiveStartTimestamp(poolPath, incentiveId)
488 }
489
490 // GetMinimumRewardAmount returns the default minimum reward amount required to create an external
491 // incentive. A token-specific override may apply.
492 //
493 // Returns:
494 // - amount: Default minimum external-incentive reward amount in token units.
495 func GetMinimumRewardAmount() int64 {
496 return getImplementation().GetMinimumRewardAmount()
497 }
498
499 // GetMinimumRewardAmountForToken returns the minimum reward amount for a specific token.
500 //
501 // Parameters:
502 // - tokenPath: Token path whose configured minimum-reward override should be read.
503 //
504 // Returns:
505 // - amount: Token-specific minimum reward amount when configured, otherwise the default minimum, in token units.
506 func GetMinimumRewardAmountForToken(tokenPath string ) int64 {
507 return getImplementation().GetMinimumRewardAmountForToken(tokenPath)
508 }
509
510 // GetPoolStakedLiquidity returns the current total staked liquidity of a pool.
511 //
512 // Parameters:
513 // - poolPath: Pool path whose current staked liquidity should be read.
514 //
515 // Returns:
516 // - liquidity: Decimal string containing the pool's total staked liquidity at the current time.
517 // - err: Non-nil when poolPath does not resolve to a pool.
518 func GetPoolStakedLiquidity(poolPath string ) ( string , error ) {
519 return getImplementation().GetPoolStakedLiquidity(poolPath)
520 }
521
522 // GetPoolsByTier returns the pool list for a tier.
523 //
524 // Parameters:
525 // - tier: Emission tier identifier whose current pool memberships should be listed.
526 //
527 // Returns:
528 // - poolPaths: Copy of pool paths currently assigned to tier; tier zero yields an empty list.
529 // - err: Non-nil when the stored tier membership contains an invalid value.
530 func GetPoolsByTier(tier uint64 ) ([] string , error ) {
531 pools, err := getImplementation().GetPoolsByTier(tier)
532 if err != nil {
533 return nil , err
534 }
535 return cloneStringSlice(pools), nil
536 }
537
538 // GetPoolReward returns the reward amount for a tier.
539 //
540 // Parameters:
541 // - tier: Emission tier identifier for which to retrieve the per-pool reward.
542 //
543 // Returns:
544 // - reward: Current per-pool GNS reward rate for tier, in token units per second.
545 // - err: Non-nil when tier is outside the valid range 1 through AllTierCount-1.
546 func GetPoolReward(tier uint64 ) ( int64 , error ) {
547 return getImplementation().GetPoolReward(tier)
548 }
549
550 // GetPoolTier returns the tier of a pool.
551 //
552 // Parameters:
553 // - poolPath: Pool path whose current emission tier should be read.
554 //
555 // Returns:
556 // - tier: Current emission tier identifier; zero when the pool has no tier assignment.
557 func GetPoolTier(poolPath string ) uint64 {
558 return getImplementation().GetPoolTier(poolPath)
559 }
560
561 // GetPoolTierCount returns the number of pools in a tier.
562 //
563 // Parameters:
564 // - tier: Emission tier identifier to count; tier zero has no pools.
565 //
566 // Returns:
567 // - count: Number of pools currently assigned to tier, or zero for tier zero.
568 func GetPoolTierCount(tier uint64 ) uint64 {
569 return getImplementation().GetPoolTierCount(tier)
570 }
571
572 // GetPoolTierRatio returns the reward ratio of a pool.
573 //
574 // Parameters:
575 // - poolPath: Pool path whose current emission tier ratio should be read.
576 //
577 // Returns:
578 // - ratio: Stored reward-share ratio for the pool's current tier.
579 // - err: Non-nil when the pool's tier is invalid and has no configured ratio.
580 func GetPoolTierRatio(poolPath string ) ( uint64 , error ) {
581 return getImplementation().GetPoolTierRatio(poolPath)
582 }
583
584 // GetSpecificTokenMinimumRewardAmount returns the explicitly set minimum reward amount for a token.
585 //
586 // Parameters:
587 // - tokenPath: Token path whose explicit minimum-reward override should be read.
588 //
589 // Returns:
590 // - amount: Explicit minimum reward amount in token units, or 0 when no override is configured.
591 // - found: True when tokenPath has an explicit override; false when the default would be used.
592 func GetSpecificTokenMinimumRewardAmount(tokenPath string ) ( int64 , bool ) {
593 return getImplementation().GetSpecificTokenMinimumRewardAmount(tokenPath)
594 }
595
596 // GetTargetPoolPathByIncentiveId returns the pool path for an incentive ID.
597 //
598 // Parameters:
599 // - poolPath: Pool path containing the incentive record.
600 // - incentiveId: External incentive identifier to resolve.
601 //
602 // Returns:
603 // - targetPoolPath: Pool path stored on the resolved incentive.
604 // - err: Non-nil when poolPath or incentiveId cannot be resolved.
605 func GetTargetPoolPathByIncentiveId(poolPath string , incentiveId string ) ( string , error ) {
606 return getImplementation().GetTargetPoolPathByIncentiveId(poolPath, incentiveId)
607 }
608
609 // GetUnstakingFee returns the current unstaking fee rate in basis points (0-1,000; 100 = 1%).
610 //
611 // Returns:
612 // - feeRate: Current staking-reward fee rate in basis points.
613 func GetUnstakingFee() uint64 {
614 return getImplementation().GetUnstakingFee()
615 }
616
617 // HasUnstakedPosition returns whether a position was unstaked with rewards left to collect.
618 //
619 // Parameters:
620 // - positionId: Position NFT token ID to check in the unstaked-position tree.
621 //
622 // Returns:
623 // - unstaked: True when positionId has an exit checkpoint awaiting collection; false otherwise.
624 func HasUnstakedPosition(positionId uint64 ) bool {
625 return getImplementation().HasUnstakedPosition(positionId)
626 }
627
628 // GetUnstakedPositionExitTime returns the timestamp at which an unstaked position stopped accruing rewards.
629 //
630 // Parameters:
631 // - positionId: Position NFT token ID identifying the unstaked exit checkpoint.
632 //
633 // Returns:
634 // - exitTime: Unix timestamp pinned as the end of the position's reward-accrual window.
635 // - err: Non-nil when positionId has no unstaked checkpoint with uncollected rewards.
636 func GetUnstakedPositionExitTime(positionId uint64 ) ( int64 , error ) {
637 return getImplementation().GetUnstakedPositionExitTime(positionId)
638 }
639
640 // GetUnstakedPositionPendingIncentives returns the incentives an unstaked position has yet to collect.
641 //
642 // Parameters:
643 // - positionId: Position NFT token ID identifying the unstaked exit checkpoint.
644 //
645 // Returns:
646 // - incentiveIds: Copy of external incentive IDs still pending for the exit checkpoint.
647 // - err: Non-nil when positionId has no unstaked checkpoint with uncollected rewards.
648 func GetUnstakedPositionPendingIncentives(positionId uint64 ) ([] string , error ) {
649 incentiveIds, err := getImplementation().GetUnstakedPositionPendingIncentives(positionId)
650 if err != nil {
651 return nil , err
652 }
653 return cloneStringSlice(incentiveIds), nil
654 }
655
656 // GetUncollectedIncentiveCount returns how many unstaked positions still owe a reward from the incentive.
657 //
658 // Parameters:
659 // - incentiveId: External incentive identifier whose outstanding exit positions should be counted.
660 //
661 // Returns:
662 // - count: Number of unstaked positions with an uncollected reward for incentiveId.
663 func GetUncollectedIncentiveCount(incentiveId string ) int64 {
664 return getImplementation().GetUncollectedIncentiveCount(incentiveId)
665 }
666
667 // IsStaked returns whether a position is staked.
668 //
669 // Parameters:
670 // - positionId: Position NFT token ID to check in the active deposit tree.
671 //
672 // Returns:
673 // - staked: True when positionId has an active deposit; false for an unstaked or unknown position.
674 func IsStaked(positionId uint64 ) bool {
675 return getImplementation().IsStaked(positionId)
676 }
677
678 // GetTotalEmissionSent returns the total GNS emission sent.
679 //
680 // Returns:
681 // - amount: Cumulative GNS emission amount sent by the staker, in token units.
682 func GetTotalEmissionSent() int64 {
683 return getImplementation().GetTotalEmissionSent()
684 }
685
686 // GetAllowedTokens returns the allowed external incentive tokens.
687 //
688 // Returns:
689 // - tokenPaths: Copy of token paths permitted for external incentives.
690 func GetAllowedTokens() [] string {
691 return cloneStringSlice(getImplementation().GetAllowedTokens())
692 }
693
694 // GetDeniedRewardTokens returns the denied external incentive reward tokens.
695 //
696 // Returns:
697 // - tokenPaths: Copy of token paths excluded from external incentive rewards.
698 func GetDeniedRewardTokens() [] string {
699 return cloneStringSlice(getImplementation().GetDeniedRewardTokens())
700 }
701
702 // GetWarmupTemplate returns the current warmup template.
703 //
704 // Returns:
705 // - warmups: Copy of the configured warmup schedule used for newly staked positions.
706 func GetWarmupTemplate() []Warmup {
707 return cloneWarmups(getImplementation().GetWarmupTemplate())
708 }
709
710 // GetPoolRewardCaches returns a read-only view of a pool's reward cache, keyed
711 // by the encoded block timestamp. Callers paginate it themselves through
712 // IterateByOffset and decode keys with DecodeInt64.
713 //
714 // Parameters:
715 // - poolPath: Pool path whose reward-cache checkpoints should be read.
716 //
717 // Returns:
718 // - caches: Read-only tree of timestamp keys to cached reward values, or nil when poolPath has no pool.
719 func GetPoolRewardCaches(poolPath string ) *rotree.ReadOnlyTree {
720 return getImplementation().GetPoolRewardCaches(poolPath)
721 }
722
723 // GetPoolIncentives returns a read-only view of a pool's external incentives,
724 // keyed by incentive ID. Reading an entry yields a clone, so the view cannot
725 // mutate realm state.
726 //
727 // Parameters:
728 // - poolPath: Pool path whose external-incentive records should be read.
729 //
730 // Returns:
731 // - incentives: Read-only tree keyed by incentive ID with cloned entries, or nil when poolPath has no pool.
732 func GetPoolIncentives(poolPath string ) *rotree.ReadOnlyTree {
733 return getImplementation().GetPoolIncentives(poolPath)
734 }
735
736 // GetPoolGlobalRewardRatioAccumulations returns a read-only view of a pool's
737 // global reward ratio accumulation, keyed by the encoded block timestamp.
738 //
739 // Parameters:
740 // - poolPath: Pool path whose global reward-ratio checkpoints should be read.
741 //
742 // Returns:
743 // - accumulations: Read-only tree of timestamp keys to stored accumulation values, or nil when poolPath has no pool.
744 func GetPoolGlobalRewardRatioAccumulations(poolPath string ) *rotree.ReadOnlyTree {
745 return getImplementation().GetPoolGlobalRewardRatioAccumulations(poolPath)
746 }
747
748 // GetPoolHistoricalTicks returns a read-only view of a pool's historical ticks,
749 // keyed by the encoded block timestamp with the int32 tick as the value.
750 //
751 // Parameters:
752 // - poolPath: Pool path whose historical tick checkpoints should be read.
753 //
754 // Returns:
755 // - ticks: Read-only tree of timestamp keys to int32 ticks, or nil when poolPath has no pool.
756 func GetPoolHistoricalTicks(poolPath string ) *rotree.ReadOnlyTree {
757 return getImplementation().GetPoolHistoricalTicks(poolPath)
758 }
759
760 // GetPendingProtocolFees returns the pending protocol fee amount per token path.
761 //
762 // Returns:
763 // - fees: Copy of pending protocol-fee amounts keyed by token path, in the corresponding token units.
764 func GetPendingProtocolFees() map [ string ] int64 {
765 return cloneStringInt64Map(getImplementation().GetPendingProtocolFees())
766 }
767
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.