rent

package
v0.0.0-...-49ff46f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RentStateUninitialized = iota
	RentStateRentPaying
	RentStateRentExempt
)
View Source
const (
	RentExempt = iota
	RentNoCollectionNow
	RentCollectRent
)

Variables

This section is empty.

Functions

func CollectRentEagerly

func CollectRentEagerly(slotCtx *sealevel.SlotCtx, rent *sealevel.SysvarRent, epochSchedule *sealevel.SysvarEpochSchedule) []*accounts.Account

func MaybeSetRentExemptRentEpochMax

func MaybeSetRentExemptRentEpochMax(slotCtx *sealevel.SlotCtx, rent *sealevel.SysvarRent, f *features.Features, txAccts *sealevel.TransactionAccounts)

func ShouldSetRentExemptRentEpochMax

func ShouldSetRentExemptRentEpochMax(slotCtx *sealevel.SlotCtx, rent *sealevel.SysvarRent, f *features.Features, acct *accounts.Account) bool

func VerifyRentStateChanges

func VerifyRentStateChanges(preStates []*RentStateInfo, postStates []*RentStateInfo, txCtx *sealevel.TransactionCtx) error

Types

type Partition

type Partition struct {
	StartIdx       uint64
	EndIdx         uint64
	PartitionCount uint64
}

pub type Partition = (PartitionIndex, PartitionIndex, PartitionsPerCycle);

func RentCollectionPartitions

func RentCollectionPartitions(startSlot uint64, endSlot uint64, epochSchedule *sealevel.SysvarEpochSchedule) []Partition

startSlot = parent slot endSlot = current slot

type PubkeyRange

type PubkeyRange struct {
	StartPubkey solana.PublicKey
	EndPubkey   solana.PublicKey
	StartPrefix uint64
	EndPrefix   uint64
}

type RentCollectionCycleParams

type RentCollectionCycleParams struct {
	Epoch              uint64
	SlotCountPerEpoch  uint64
	MultiEpochCycle    bool
	BaseEpoch          uint64
	EpochCountPerCycle uint64
	PartitionCount     uint64
}

type RentPayingInfo

type RentPayingInfo struct {
	Lamports uint64
	DataSize uint64
}

type RentStateInfo

type RentStateInfo struct {
	RentState      uint64
	RentPayingInfo RentPayingInfo
}

func NewRentStateInfo

func NewRentStateInfo(rent *sealevel.SysvarRent, txCtx *sealevel.TransactionCtx, tx *solana.Transaction) []*RentStateInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL