delegation_withdraw.gno
Types
DelegationWithdraw
DelegationWithdraw represents a pending withdrawal from a delegation. This struct tracks undelegated amounts that are subject to lockup periods and manages the collection process once the lockup period expires.
Methods
Clone
Clone creates a deep copy of the delegation withdraw.
Return Values
DelegationWithdraw
DelegationWithdraw
independent copy of the withdrawal state.
CollectableTime
CollectableTime returns the timestamp when collection becomes available.
Return Values
int64
int64
collectable time
CollectedAmount
CollectedAmount returns the amount that has already been collected.
Return Values
int64
int64
collected amount
CollectedAt
CollectedAt returns the timestamp when collection occurred.
Return Values
int64
int64
collection timestamp
DelegationID
DelegationID returns the unique identifier of the associated delegation.
Return Values
int64
int64
delegation ID
IsCollected
IsCollected returns whether the withdrawal has been fully collected.
Return Values
bool
bool
true if fully collected, false otherwise
SetCollected
SetCollected sets the collected status.
Parameters
collected
bool
new collected status
SetCollectedAmount
SetCollectedAmount sets the collected amount.
Parameters
amount
int64
collected amount
SetCollectedAt
SetCollectedAt sets the collection timestamp.
Parameters
collectedAt
int64
collection timestamp
UnDelegateAmount
UnDelegateAmount returns the total amount that was undelegated.
Return Values
int64
int64
undelegated amount
UnDelegatedAt
UnDelegatedAt returns the timestamp when the undelegation occurred.
Return Values
int64
int64
undelegation timestamp
UnDelegatedHeight
UnDelegatedHeight returns the height when the undelegation occurred.
Return Values
int64
int64
undelegation height
Constructors
func GetDelegationWithdraws(delegationID int64, offset int, count int) ([]DelegationWithdraw, error)(source)func NewDelegationWithdraw(delegationID int64, unDelegateAmount int64, createdHeight int64, createdAt int64, unDelegationLockupPeriod int64) DelegationWithdraw(source)func NewDelegationWithdrawWithoutLockup(delegationID int64, unDelegateAmount int64, createdHeight int64, createdAt int64) DelegationWithdraw(source)
Last updated