Documentation ¶
Index ¶
Constants ¶
View Source
const ( // deprecated: will not support for building instruction Instruction_RequestUnitsDeprecated uint8 = iota // Request a specific transaction-wide program heap region size in bytes. // The value requested must be a multiple of 1024. This new heap region // size applies to each program executed in the transaction, including all // calls to CPIs. // note: uses ag_binary.Varuint32 Instruction_RequestHeapFrame // Set a specific compute unit limit that the transaction is allowed to consume. // note: uses ag_binary.Varuint32 Instruction_SetComputeUnitLimit // Set a compute unit price in "micro-lamports" to pay a higher transaction // fee for higher transaction prioritization. // note: uses ag_binary.Uint64 Instruction_SetComputeUnitPrice )
View Source
const (
COMPUTE_BUDGET_PROGRAM = "ComputeBudget111111111111111111111111111111"
)
Variables ¶
This section is empty.
Functions ¶
func CalculateFee ¶
returns new fee based on number of times bumped
func SetComputeUnitPrice ¶
func SetComputeUnitPrice(tx *solana.Transaction, price ComputeUnitPrice) error
modifies passed in tx to set compute unit price
Types ¶
type ComputeUnitPrice ¶
type ComputeUnitPrice uint64
https://docs.solana.com/developing/programming-model/runtime
func (ComputeUnitPrice) Accounts ¶
func (val ComputeUnitPrice) Accounts() (accounts []*solana.AccountMeta)
No accounts needed
func (ComputeUnitPrice) Data ¶
func (val ComputeUnitPrice) Data() ([]byte, error)
simple encoding into program expected format
func (ComputeUnitPrice) ProgramID ¶
func (val ComputeUnitPrice) ProgramID() solana.PublicKey
returns the compute budget program
Click to show internal directories.
Click to hide internal directories.