Documentation ¶
Index ¶
- Constants
- type Instruction
- type SetComputeUnitLimit
- func (obj SetComputeUnitLimit) Build() *Instruction
- func (obj SetComputeUnitLimit) GetAccounts() (accounts []*base.AccountMeta)
- func (obj *SetComputeUnitLimit) MarshalWithEncoder(encoder *encodbin.Encoder) (err error)
- func (obj *SetComputeUnitLimit) SetAccounts(accounts []*base.AccountMeta) error
- func (obj *SetComputeUnitLimit) SetUnits(units uint32) *SetComputeUnitLimit
- func (obj *SetComputeUnitLimit) Validate() error
- func (obj SetComputeUnitLimit) ValidateAndBuild() (*Instruction, error)
- type SetComputeUnitPrice
- func (obj SetComputeUnitPrice) Build() *Instruction
- func (obj SetComputeUnitPrice) GetAccounts() (accounts []*base.AccountMeta)
- func (obj SetComputeUnitPrice) MarshalWithEncoder(encoder *encodbin.Encoder) (err error)
- func (obj *SetComputeUnitPrice) SetAccounts(accounts []*base.AccountMeta) error
- func (obj *SetComputeUnitPrice) SetMicroLamports(microLamports uint64) *SetComputeUnitPrice
- func (obj *SetComputeUnitPrice) UnmarshalWithDecoder(decoder *encodbin.Decoder) (err error)
- func (obj *SetComputeUnitPrice) Validate() error
- func (obj SetComputeUnitPrice) ValidateAndBuild() (*Instruction, error)
Constants ¶
const ( // Deprecated // after feature remove_deprecated_request_unit_ix::id() is activated 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. Instruction_RequestHeapFrame // Set a specific compute unit limit that the transaction is allowed to consume. Instruction_SetComputeUnitLimit // Set a compute unit price in "micro-lamports" to pay a higher transaction // fee for higher transaction prioritization. Instruction_SetComputeUnitPrice )
const MAX_COMPUTE_UNIT_LIMIT = 1400000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instruction ¶
type Instruction struct {
encodbin.BaseVariant
}
func (*Instruction) Accounts ¶
func (inst *Instruction) Accounts() (out []*base.AccountMeta)
func (*Instruction) Data ¶
func (inst *Instruction) Data() ([]byte, error)
func (*Instruction) MarshalWithEncoder ¶
func (inst *Instruction) MarshalWithEncoder(encoder *encodbin.Encoder) error
func (*Instruction) ProgramID ¶
func (inst *Instruction) ProgramID() common.Address
type SetComputeUnitLimit ¶
type SetComputeUnitLimit struct {
Units uint32
}
func NewSetComputeUnitLimitInstruction ¶
func NewSetComputeUnitLimitInstruction( units uint32, ) *SetComputeUnitLimit
NewSetComputeUnitLimitInstruction declares a new SetComputeUnitLimit instruction with the provided parameters and accounts.
func NewSetComputeUnitLimitInstructionBuilder ¶
func NewSetComputeUnitLimitInstructionBuilder() *SetComputeUnitLimit
NewSetComputeUnitLimitInstructionBuilder creates a new `SetComputeUnitLimit` instruction builder.
func (SetComputeUnitLimit) Build ¶
func (obj SetComputeUnitLimit) Build() *Instruction
func (SetComputeUnitLimit) GetAccounts ¶
func (obj SetComputeUnitLimit) GetAccounts() (accounts []*base.AccountMeta)
func (*SetComputeUnitLimit) MarshalWithEncoder ¶
func (obj *SetComputeUnitLimit) MarshalWithEncoder(encoder *encodbin.Encoder) (err error)
func (*SetComputeUnitLimit) SetAccounts ¶
func (obj *SetComputeUnitLimit) SetAccounts(accounts []*base.AccountMeta) error
func (*SetComputeUnitLimit) SetUnits ¶
func (obj *SetComputeUnitLimit) SetUnits(units uint32) *SetComputeUnitLimit
SetUnits limit
func (*SetComputeUnitLimit) Validate ¶
func (obj *SetComputeUnitLimit) Validate() error
func (SetComputeUnitLimit) ValidateAndBuild ¶
func (obj SetComputeUnitLimit) ValidateAndBuild() (*Instruction, error)
ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.
type SetComputeUnitPrice ¶
type SetComputeUnitPrice struct {
MicroLamports uint64
}
func NewSetComputeUnitPriceInstruction ¶
func NewSetComputeUnitPriceInstruction( microLamports uint64, ) *SetComputeUnitPrice
NewSetComputeUnitPriceInstruction declares a new SetComputeUnitPrice instruction with the provided parameters and accounts.
func NewSetComputeUnitPriceInstructionBuilder ¶
func NewSetComputeUnitPriceInstructionBuilder() *SetComputeUnitPrice
NewSetComputeUnitPriceInstructionBuilder creates a new `SetComputeUnitPrice` instruction builder.
func (SetComputeUnitPrice) Build ¶
func (obj SetComputeUnitPrice) Build() *Instruction
func (SetComputeUnitPrice) GetAccounts ¶
func (obj SetComputeUnitPrice) GetAccounts() (accounts []*base.AccountMeta)
func (SetComputeUnitPrice) MarshalWithEncoder ¶
func (obj SetComputeUnitPrice) MarshalWithEncoder(encoder *encodbin.Encoder) (err error)
func (*SetComputeUnitPrice) SetAccounts ¶
func (obj *SetComputeUnitPrice) SetAccounts(accounts []*base.AccountMeta) error
func (*SetComputeUnitPrice) SetMicroLamports ¶
func (obj *SetComputeUnitPrice) SetMicroLamports(microLamports uint64) *SetComputeUnitPrice
func (*SetComputeUnitPrice) UnmarshalWithDecoder ¶ added in v0.1.5
func (obj *SetComputeUnitPrice) UnmarshalWithDecoder(decoder *encodbin.Decoder) (err error)
func (*SetComputeUnitPrice) Validate ¶
func (obj *SetComputeUnitPrice) Validate() error
func (SetComputeUnitPrice) ValidateAndBuild ¶
func (obj SetComputeUnitPrice) ValidateAndBuild() (*Instruction, error)
ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.