Documentation ¶
Index ¶
- Variables
- type BaseLockup
- func (bva *BaseLockup) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate, ...) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (bva BaseLockup) GetNotBondedLockedCoin(ctx context.Context, lockedCoin sdk.Coin, denom string) (sdk.Coin, error)
- func (bva *BaseLockup) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error)
- func (bva BaseLockup) IterateCoinEntries(ctx context.Context, entries collections.Map[string, math.Int], ...) error
- func (bva BaseLockup) QueryLockupAccountBaseInfo(ctx context.Context, _ *lockuptypes.QueryLockupAccountInfoRequest) (*lockuptypes.QueryLockupAccountInfoResponse, error)
- func (bva BaseLockup) QuerySpendableTokens(ctx context.Context, lockedCoins sdk.Coins) (*lockuptypes.QuerySpendableAmountResponse, error)
- func (bva BaseLockup) QueryUnbondingEntries(ctx context.Context, req *lockuptypes.QueryUnbondingEntriesRequest) (*lockuptypes.QueryUnbondingEntriesResponse, error)
- func (bva BaseLockup) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
- func (bva BaseLockup) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
- func (bva *BaseLockup) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend, ...) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (bva *BaseLockup) TrackDelegation(ctx context.Context, balance, lockedCoins, amount sdk.Coins) error
- func (bva *BaseLockup) TrackUndelegation(ctx context.Context, amount sdk.Coins) error
- func (bva *BaseLockup) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (bva *BaseLockup) WithdrawReward(ctx context.Context, msg *lockuptypes.MsgWithdrawReward) (*lockuptypes.MsgExecuteMessagesResponse, error)
- type ContinuousLockingAccount
- func (cva *ContinuousLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (cva ContinuousLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error)
- func (cva ContinuousLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error)
- func (cva ContinuousLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error)
- func (cva ContinuousLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
- func (cva ContinuousLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error)
- func (cva ContinuousLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (*lockuptypes.QueryLockupAccountInfoResponse, error)
- func (cva ContinuousLockingAccount) QuerySpendableTokens(ctx context.Context, req *lockuptypes.QuerySpendableAmountRequest) (*lockuptypes.QuerySpendableAmountResponse, error)
- func (cva ContinuousLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
- func (cva ContinuousLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
- func (cva ContinuousLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
- func (cva *ContinuousLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (*lockuptypes.MsgExecuteMessagesResponse, error)
- type DelayedLockingAccount
- func (dva *DelayedLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (dva DelayedLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (*sdk.Coin, *sdk.Coin, error)
- func (dva DelayedLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (sdk.Coins, sdk.Coins, error)
- func (dva DelayedLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error)
- func (dva DelayedLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
- func (dva DelayedLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error)
- func (dva DelayedLockingAccount) QuerySpendableTokens(ctx context.Context, req *lockuptypes.QuerySpendableAmountRequest) (*lockuptypes.QuerySpendableAmountResponse, error)
- func (dva DelayedLockingAccount) QueryVestingAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (*lockuptypes.QueryLockupAccountInfoResponse, error)
- func (dva DelayedLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
- func (dva DelayedLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
- func (dva DelayedLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
- func (dva *DelayedLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (*lockuptypes.MsgExecuteMessagesResponse, error)
- type PeriodicLockingAccount
- func (pva *PeriodicLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (pva PeriodicLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error)
- func (pva PeriodicLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error)
- func (pva PeriodicLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error)
- func (pva PeriodicLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
- func (pva PeriodicLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitPeriodicLockingAccount) (*lockuptypes.MsgInitPeriodicLockingAccountResponse, error)
- func (pva PeriodicLockingAccount) IteratePeriods(ctx context.Context, cb func(value lockuptypes.Period) (bool, error)) error
- func (pva PeriodicLockingAccount) QueryLockingPeriods(ctx context.Context, msg *lockuptypes.QueryLockingPeriodsRequest) (*lockuptypes.QueryLockingPeriodsResponse, error)
- func (pva PeriodicLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (*lockuptypes.QueryLockupAccountInfoResponse, error)
- func (pva PeriodicLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
- func (pva PeriodicLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
- func (pva PeriodicLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
- func (pva *PeriodicLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (*lockuptypes.MsgExecuteMessagesResponse, error)
- type PermanentLockingAccount
- func (plva *PermanentLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (plva PermanentLockingAccount) GetlockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
- func (plva PermanentLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error)
- func (plva PermanentLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (*lockuptypes.QueryLockupAccountInfoResponse, error)
- func (plva PermanentLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
- func (plva PermanentLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
- func (plva PermanentLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
- func (plva *PermanentLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (*lockuptypes.MsgExecuteMessagesResponse, error)
- func (plva *PermanentLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) (*lockuptypes.MsgExecuteMessagesResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( OriginalLockingPrefix = collections.NewPrefix(0) DelegatedFreePrefix = collections.NewPrefix(1) DelegatedLockingPrefix = collections.NewPrefix(2) EndTimePrefix = collections.NewPrefix(3) StartTimePrefix = collections.NewPrefix(4) LockingPeriodsPrefix = collections.NewPrefix(5) OwnerPrefix = collections.NewPrefix(6) UnbondEntriesPrefix = collections.NewPrefix(7) )
var ( CONTINUOUS_LOCKING_ACCOUNT = "continuous-locking-account" DELAYED_LOCKING_ACCOUNT = "delayed-locking-account" PERIODIC_LOCKING_ACCOUNT = "periodic-locking-account" PERMANENT_LOCKING_ACCOUNT = "permanent-locking-account" )
Functions ¶
This section is empty.
Types ¶
type BaseLockup ¶
type BaseLockup struct { // Owner is the address of the account owner. Owner collections.Item[[]byte] OriginalLocking collections.Map[string, math.Int] DelegatedFree collections.Map[string, math.Int] DelegatedLocking collections.Map[string, math.Int] // map val address to unbonding entries UnbondEntries collections.Map[string, lockuptypes.UnbondingEntries] // lockup end time. EndTime collections.Item[time.Time] // contains filtered or unexported fields }
func (*BaseLockup) Delegate ¶
func (bva *BaseLockup) Delegate( ctx context.Context, msg *lockuptypes.MsgDelegate, getLockedCoinsFunc getLockedCoinsFunc, ) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (BaseLockup) GetNotBondedLockedCoin ¶
func (bva BaseLockup) GetNotBondedLockedCoin(ctx context.Context, lockedCoin sdk.Coin, denom string) (sdk.Coin, error)
GetNotBondedLockedCoin returns the coin that are not spendable that are not bonded by denom for a lockup account. If the coin by the provided denom are not locked, an coin with zero amount is returned.
func (*BaseLockup) Init ¶
func (bva *BaseLockup) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) ( *lockuptypes.MsgInitLockupAccountResponse, error, )
func (BaseLockup) IterateCoinEntries ¶
func (bva BaseLockup) IterateCoinEntries( ctx context.Context, entries collections.Map[string, math.Int], cb func(denom string, value math.Int) (bool, error), ) error
IterateCoinEntries iterates over all the CoinEntries entries.
func (BaseLockup) QueryLockupAccountBaseInfo ¶
func (bva BaseLockup) QueryLockupAccountBaseInfo(ctx context.Context, _ *lockuptypes.QueryLockupAccountInfoRequest) ( *lockuptypes.QueryLockupAccountInfoResponse, error, )
QueryLockupAccountBaseInfo returns a lockup account's info
func (BaseLockup) QuerySpendableTokens ¶
func (bva BaseLockup) QuerySpendableTokens(ctx context.Context, lockedCoins sdk.Coins) ( *lockuptypes.QuerySpendableAmountResponse, error, )
func (BaseLockup) QueryUnbondingEntries ¶
func (bva BaseLockup) QueryUnbondingEntries(ctx context.Context, req *lockuptypes.QueryUnbondingEntriesRequest) ( *lockuptypes.QueryUnbondingEntriesResponse, error, )
func (BaseLockup) RegisterExecuteHandlers ¶
func (bva BaseLockup) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
func (BaseLockup) RegisterQueryHandlers ¶
func (bva BaseLockup) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
func (*BaseLockup) SendCoins ¶
func (bva *BaseLockup) SendCoins( ctx context.Context, msg *lockuptypes.MsgSend, getLockedCoinsFunc getLockedCoinsFunc, ) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (*BaseLockup) TrackDelegation ¶
func (bva *BaseLockup) TrackDelegation( ctx context.Context, balance, lockedCoins, amount sdk.Coins, ) error
TrackDelegation tracks a delegation amount for any given lockup account type given the amount of coins currently being locked and the current account balance of the delegation denominations.
CONTRACT: The account's coins, delegation coins, locked coins, and delegated locking coins must be sorted.
func (*BaseLockup) TrackUndelegation ¶
TrackUndelegation tracks an undelegation amount by setting the necessary values by which delegated locking and delegated free need to decrease and by which amount the base coins need to increase.
NOTE: The undelegation (bond refund) amount may exceed the delegated locking (bond) amount due to the way undelegation truncates the bond refund, which can increase the validator's exchange rate (tokens/shares) slightly if the undelegated tokens are non-integral.
CONTRACT: The account's coins and undelegation coins must be sorted.
func (*BaseLockup) Undelegate ¶
func (bva *BaseLockup) Undelegate( ctx context.Context, msg *lockuptypes.MsgUndelegate, ) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (*BaseLockup) WithdrawReward ¶
func (bva *BaseLockup) WithdrawReward( ctx context.Context, msg *lockuptypes.MsgWithdrawReward, ) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
type ContinuousLockingAccount ¶
type ContinuousLockingAccount struct { *BaseLockup StartTime collections.Item[time.Time] }
func NewContinuousLockingAccount ¶
func NewContinuousLockingAccount(d accountstd.Dependencies) (*ContinuousLockingAccount, error)
NewContinuousLockingAccount creates a new ContinuousLockingAccount object.
func (*ContinuousLockingAccount) Delegate ¶
func (cva *ContinuousLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (ContinuousLockingAccount) GetLockCoinInfoWithDenom ¶
func (cva ContinuousLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error)
GetLockCoinInfoWithDenom returns the number of locked coin for a specific denom. If no coins are locked, nil is returned.
func (ContinuousLockingAccount) GetLockCoinsInfo ¶
func (cva ContinuousLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error)
GetLockCoinsInfo returns the total number of unlocked and locked coins.
func (ContinuousLockingAccount) GetLockedCoins ¶
func (cva ContinuousLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error)
GetLockedCoins returns the total number of locked coins.
func (ContinuousLockingAccount) GetLockedCoinsWithDenoms ¶
func (cva ContinuousLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
GetLockedCoinsWithDenoms returns the number of locked coin for a specific denom.
func (ContinuousLockingAccount) Init ¶
func (cva ContinuousLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error)
func (ContinuousLockingAccount) QueryLockupAccountInfo ¶
func (cva ContinuousLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( *lockuptypes.QueryLockupAccountInfoResponse, error, )
func (ContinuousLockingAccount) QuerySpendableTokens ¶
func (cva ContinuousLockingAccount) QuerySpendableTokens(ctx context.Context, req *lockuptypes.QuerySpendableAmountRequest) ( *lockuptypes.QuerySpendableAmountResponse, error, )
func (ContinuousLockingAccount) RegisterExecuteHandlers ¶
func (cva ContinuousLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
func (ContinuousLockingAccount) RegisterInitHandler ¶
func (cva ContinuousLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
Implement smart account interface
func (ContinuousLockingAccount) RegisterQueryHandlers ¶
func (cva ContinuousLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
func (*ContinuousLockingAccount) SendCoins ¶
func (cva *ContinuousLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
type DelayedLockingAccount ¶
type DelayedLockingAccount struct {
*BaseLockup
}
func NewDelayedLockingAccount ¶
func NewDelayedLockingAccount(d accountstd.Dependencies) (*DelayedLockingAccount, error)
NewDelayedLockingAccount creates a new DelayedLockingAccount object.
func (*DelayedLockingAccount) Delegate ¶
func (dva *DelayedLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (DelayedLockingAccount) GetLockCoinInfoWithDenom ¶
func (dva DelayedLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (*sdk.Coin, *sdk.Coin, error)
GetLockCoinInfoWithDenom returns the number of unlocked and locked coin for a specific denom.
func (DelayedLockingAccount) GetLockCoinsInfo ¶
func (dva DelayedLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (sdk.Coins, sdk.Coins, error)
GetLockCoinsInfo returns the total number of unlocked and locked coins.
func (DelayedLockingAccount) GetLockedCoins ¶
func (dva DelayedLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error)
GetLockedCoins returns the total number of locked coins. If no coins are locked, nil is returned.
func (DelayedLockingAccount) GetLockedCoinsWithDenoms ¶
func (dva DelayedLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
GetLockedCoinsWithDenoms returns the number of locked coin for a specific denom.
func (DelayedLockingAccount) Init ¶
func (dva DelayedLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error)
func (DelayedLockingAccount) QuerySpendableTokens ¶
func (dva DelayedLockingAccount) QuerySpendableTokens(ctx context.Context, req *lockuptypes.QuerySpendableAmountRequest) ( *lockuptypes.QuerySpendableAmountResponse, error, )
func (DelayedLockingAccount) QueryVestingAccountInfo ¶
func (dva DelayedLockingAccount) QueryVestingAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( *lockuptypes.QueryLockupAccountInfoResponse, error, )
func (DelayedLockingAccount) RegisterExecuteHandlers ¶
func (dva DelayedLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
func (DelayedLockingAccount) RegisterInitHandler ¶
func (dva DelayedLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
Implement smart account interface
func (DelayedLockingAccount) RegisterQueryHandlers ¶
func (dva DelayedLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
func (*DelayedLockingAccount) SendCoins ¶
func (dva *DelayedLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
type PeriodicLockingAccount ¶
type PeriodicLockingAccount struct { *BaseLockup StartTime collections.Item[time.Time] LockingPeriods collections.Vec[lockuptypes.Period] }
func NewPeriodicLockingAccount ¶
func NewPeriodicLockingAccount(d accountstd.Dependencies) (*PeriodicLockingAccount, error)
NewPeriodicLockingAccount creates a new PeriodicLockingAccount object.
func (*PeriodicLockingAccount) Delegate ¶
func (pva *PeriodicLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (PeriodicLockingAccount) GetLockCoinInfoWithDenom ¶
func (pva PeriodicLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error)
GetLockCoinInfoWithDenom returns the total number of locked and unlocked coin for a specific denom.
func (PeriodicLockingAccount) GetLockCoinsInfo ¶
func (pva PeriodicLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error)
GetLockCoinsInfo returns the total number of locked and unlocked coins.
func (PeriodicLockingAccount) GetLockedCoins ¶
func (pva PeriodicLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error)
GetLockedCoins returns the total number of locked coins. If no coins are locked, nil is returned.
func (PeriodicLockingAccount) GetLockedCoinsWithDenoms ¶
func (pva PeriodicLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
GetLockedCoinsWithDenoms returns the total number of locked coins. If no coins are locked, nil is returned.
func (PeriodicLockingAccount) Init ¶
func (pva PeriodicLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitPeriodicLockingAccount) (*lockuptypes.MsgInitPeriodicLockingAccountResponse, error)
func (PeriodicLockingAccount) IteratePeriods ¶
func (pva PeriodicLockingAccount) IteratePeriods( ctx context.Context, cb func(value lockuptypes.Period) (bool, error), ) error
IteratePeriods iterates over all the Periods entries.
func (PeriodicLockingAccount) QueryLockingPeriods ¶
func (pva PeriodicLockingAccount) QueryLockingPeriods(ctx context.Context, msg *lockuptypes.QueryLockingPeriodsRequest) ( *lockuptypes.QueryLockingPeriodsResponse, error, )
func (PeriodicLockingAccount) QueryLockupAccountInfo ¶
func (pva PeriodicLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( *lockuptypes.QueryLockupAccountInfoResponse, error, )
func (PeriodicLockingAccount) RegisterExecuteHandlers ¶
func (pva PeriodicLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
func (PeriodicLockingAccount) RegisterInitHandler ¶
func (pva PeriodicLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
Implement smart account interface
func (PeriodicLockingAccount) RegisterQueryHandlers ¶
func (pva PeriodicLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
func (*PeriodicLockingAccount) SendCoins ¶
func (pva *PeriodicLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
type PermanentLockingAccount ¶
type PermanentLockingAccount struct {
*BaseLockup
}
func NewPermanentLockingAccount ¶
func NewPermanentLockingAccount(d accountstd.Dependencies) (*PermanentLockingAccount, error)
NewPermanentLockingAccount creates a new PermanentLockingAccount object.
func (*PermanentLockingAccount) Delegate ¶
func (plva *PermanentLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (PermanentLockingAccount) GetlockedCoinsWithDenoms ¶
func (plva PermanentLockingAccount) GetlockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error)
GetlockedCoinsWithDenoms returns the total number of locked coins. If no coins are locked, nil is returned.
func (PermanentLockingAccount) Init ¶
func (plva PermanentLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error)
func (PermanentLockingAccount) QueryLockupAccountInfo ¶
func (plva PermanentLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) ( *lockuptypes.QueryLockupAccountInfoResponse, error, )
func (PermanentLockingAccount) RegisterExecuteHandlers ¶
func (plva PermanentLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)
func (PermanentLockingAccount) RegisterInitHandler ¶
func (plva PermanentLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder)
Implement smart account interface
func (PermanentLockingAccount) RegisterQueryHandlers ¶
func (plva PermanentLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder)
func (*PermanentLockingAccount) SendCoins ¶
func (plva *PermanentLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) ( *lockuptypes.MsgExecuteMessagesResponse, error, )
func (*PermanentLockingAccount) Undelegate ¶
func (plva *PermanentLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) ( *lockuptypes.MsgExecuteMessagesResponse, error, )