Skip to content

@giveth:lockable

Staked GIV an account can lock (or unstake) right now: staked GIV minus everything the GIVpower contract counts as locked, including ended locks that were never unlocked (see @giveth:unlockable). Counts pending stake/lock actions earlier in the script — what lock max resolves to.

Returns: number

@giveth:lockable(account?)
NameTypeDescription
[account]addressAccount to inspect (defaults to the connected account)
# Print the staked GIV you could lock right now
print "Lockable GIV:" @giveth:lockable()

Both giveth:lock and giveth:unstake are gated by the same contract check — staked balance minus totalAmountLocked — which is what this helper returns. @giveth:unstakable differs by following the round clock instead: it already counts locks whose round ended but that still need a giveth:unlock (@giveth:unlockable shows that portion).