Documentation
¶
Index ¶
- Constants
- Variables
- func InstructionIDToName(id ag_binary.TypeID) string
- func SetProgramID(pubkey ag_solanago.PublicKey)
- type BondingCurve
- type Buy
- func (inst Buy) Build() *Instruction
- func (inst *Buy) EncodeToTree(parent ag_treeout.Branches)
- func (inst *Buy) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetAssociatedUserAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetEventAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetFeeRecipientAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetGlobalAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetMintAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetProgramAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetRentAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetTokenProgramAccount() *ag_solanago.AccountMeta
- func (inst *Buy) GetUserAccount() *ag_solanago.AccountMeta
- func (obj Buy) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
- func (inst *Buy) SetAmount(amount uint64) *Buy
- func (inst *Buy) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetAssociatedUserAccount(associatedUser ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetFeeRecipientAccount(feeRecipient ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetGlobalAccount(global ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetMaxSolCost(maxSolCost uint64) *Buy
- func (inst *Buy) SetMintAccount(mint ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetProgramAccount(program ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetRentAccount(rent ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Buy
- func (inst *Buy) SetUserAccount(user ag_solanago.PublicKey) *Buy
- func (obj *Buy) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
- func (inst *Buy) Validate() error
- func (inst Buy) ValidateAndBuild() (*Instruction, error)
- type Create
- func (inst Create) Build() *Instruction
- func (inst *Create) EncodeToTree(parent ag_treeout.Branches)
- func (inst *Create) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetAssociatedTokenProgramAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetEventAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetGlobalAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetMetadataAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetMintAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetMintAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetMplTokenMetadataAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetProgramAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetRentAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetTokenProgramAccount() *ag_solanago.AccountMeta
- func (inst *Create) GetUserAccount() *ag_solanago.AccountMeta
- func (obj Create) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
- func (inst *Create) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Create
- func (inst *Create) SetAssociatedTokenProgramAccount(associatedTokenProgram ag_solanago.PublicKey) *Create
- func (inst *Create) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Create
- func (inst *Create) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Create
- func (inst *Create) SetGlobalAccount(global ag_solanago.PublicKey) *Create
- func (inst *Create) SetMetadataAccount(metadata ag_solanago.PublicKey) *Create
- func (inst *Create) SetMintAccount(mint ag_solanago.PublicKey) *Create
- func (inst *Create) SetMintAuthorityAccount(mintAuthority ag_solanago.PublicKey) *Create
- func (inst *Create) SetMplTokenMetadataAccount(mplTokenMetadata ag_solanago.PublicKey) *Create
- func (inst *Create) SetName(name string) *Create
- func (inst *Create) SetProgramAccount(program ag_solanago.PublicKey) *Create
- func (inst *Create) SetRentAccount(rent ag_solanago.PublicKey) *Create
- func (inst *Create) SetSymbol(symbol string) *Create
- func (inst *Create) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Create
- func (inst *Create) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Create
- func (inst *Create) SetUri(uri string) *Create
- func (inst *Create) SetUserAccount(user ag_solanago.PublicKey) *Create
- func (obj *Create) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
- func (inst *Create) Validate() error
- func (inst Create) ValidateAndBuild() (*Instruction, error)
- type Global
- type Initialize
- func (inst Initialize) Build() *Instruction
- func (inst *Initialize) EncodeToTree(parent ag_treeout.Branches)
- func (inst *Initialize) GetGlobalAccount() *ag_solanago.AccountMeta
- func (inst *Initialize) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *Initialize) GetUserAccount() *ag_solanago.AccountMeta
- func (obj Initialize) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
- func (inst *Initialize) SetGlobalAccount(global ag_solanago.PublicKey) *Initialize
- func (inst *Initialize) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Initialize
- func (inst *Initialize) SetUserAccount(user ag_solanago.PublicKey) *Initialize
- func (obj *Initialize) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
- func (inst *Initialize) Validate() error
- func (inst Initialize) ValidateAndBuild() (*Instruction, error)
- type Instruction
- func (inst *Instruction) Accounts() (out []*ag_solanago.AccountMeta)
- func (inst *Instruction) Data() ([]byte, error)
- func (inst *Instruction) EncodeToTree(parent ag_treeout.Branches)
- func (inst *Instruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error
- func (inst *Instruction) ProgramID() ag_solanago.PublicKey
- func (inst *Instruction) TextEncode(encoder *ag_text.Encoder, option *ag_text.Option) error
- func (inst *Instruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
- type Sell
- func (inst Sell) Build() *Instruction
- func (inst *Sell) EncodeToTree(parent ag_treeout.Branches)
- func (inst *Sell) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetAssociatedTokenProgramAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetAssociatedUserAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetEventAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetFeeRecipientAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetGlobalAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetMintAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetProgramAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetTokenProgramAccount() *ag_solanago.AccountMeta
- func (inst *Sell) GetUserAccount() *ag_solanago.AccountMeta
- func (obj Sell) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
- func (inst *Sell) SetAmount(amount uint64) *Sell
- func (inst *Sell) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetAssociatedTokenProgramAccount(associatedTokenProgram ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetAssociatedUserAccount(associatedUser ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetFeeRecipientAccount(feeRecipient ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetGlobalAccount(global ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetMinSolOutput(minSolOutput uint64) *Sell
- func (inst *Sell) SetMintAccount(mint ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetProgramAccount(program ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Sell
- func (inst *Sell) SetUserAccount(user ag_solanago.PublicKey) *Sell
- func (obj *Sell) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
- func (inst *Sell) Validate() error
- func (inst Sell) ValidateAndBuild() (*Instruction, error)
- type SetParams
- func (inst SetParams) Build() *Instruction
- func (inst *SetParams) EncodeToTree(parent ag_treeout.Branches)
- func (inst *SetParams) GetEventAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *SetParams) GetGlobalAccount() *ag_solanago.AccountMeta
- func (inst *SetParams) GetProgramAccount() *ag_solanago.AccountMeta
- func (inst *SetParams) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *SetParams) GetUserAccount() *ag_solanago.AccountMeta
- func (obj SetParams) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
- func (inst *SetParams) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *SetParams
- func (inst *SetParams) SetFeeBasisPoints(feeBasisPoints uint64) *SetParams
- func (inst *SetParams) SetFeeRecipient(feeRecipient ag_solanago.PublicKey) *SetParams
- func (inst *SetParams) SetGlobalAccount(global ag_solanago.PublicKey) *SetParams
- func (inst *SetParams) SetInitialRealTokenReserves(initialRealTokenReserves uint64) *SetParams
- func (inst *SetParams) SetInitialVirtualSolReserves(initialVirtualSolReserves uint64) *SetParams
- func (inst *SetParams) SetInitialVirtualTokenReserves(initialVirtualTokenReserves uint64) *SetParams
- func (inst *SetParams) SetProgramAccount(program ag_solanago.PublicKey) *SetParams
- func (inst *SetParams) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *SetParams
- func (inst *SetParams) SetTokenTotalSupply(tokenTotalSupply uint64) *SetParams
- func (inst *SetParams) SetUserAccount(user ag_solanago.PublicKey) *SetParams
- func (obj *SetParams) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
- func (inst *SetParams) Validate() error
- func (inst SetParams) ValidateAndBuild() (*Instruction, error)
- type Withdraw
- func (inst Withdraw) Build() *Instruction
- func (inst *Withdraw) EncodeToTree(parent ag_treeout.Branches)
- func (inst *Withdraw) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetAssociatedUserAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetBondingCurveAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetEventAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetGlobalAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetMintAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetProgramAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetRentAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetTokenProgramAccount() *ag_solanago.AccountMeta
- func (inst *Withdraw) GetUserAccount() *ag_solanago.AccountMeta
- func (obj Withdraw) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
- func (inst *Withdraw) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetAssociatedUserAccount(associatedUser ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetGlobalAccount(global ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetMintAccount(mint ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetProgramAccount(program ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetRentAccount(rent ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Withdraw
- func (inst *Withdraw) SetUserAccount(user ag_solanago.PublicKey) *Withdraw
- func (obj *Withdraw) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
- func (inst *Withdraw) Validate() error
- func (inst Withdraw) ValidateAndBuild() (*Instruction, error)
Constants ¶
const ProgramName = "Pump"
Variables ¶
var ( // Creates the global state. Instruction_Initialize = ag_binary.TypeID([8]byte{175, 175, 109, 31, 13, 152, 155, 237}) // Sets the global state parameters. Instruction_SetParams = ag_binary.TypeID([8]byte{27, 234, 178, 52, 147, 2, 187, 141}) // Creates a new coin and bonding curve. Instruction_Create = ag_binary.TypeID([8]byte{24, 30, 200, 40, 5, 28, 7, 119}) // Buys tokens from a bonding curve. Instruction_Buy = ag_binary.TypeID([8]byte{102, 6, 61, 18, 1, 218, 235, 234}) // Sells tokens into a bonding curve. Instruction_Sell = ag_binary.TypeID([8]byte{51, 230, 133, 164, 1, 127, 131, 173}) // Allows the admin to withdraw liquidity for a migration once the bonding curve completes Instruction_Withdraw = ag_binary.TypeID([8]byte{183, 18, 70, 156, 148, 109, 161, 34}) )
var BondingCurveDiscriminator = [8]byte{23, 183, 248, 55, 96, 216, 172, 96}
var GlobalDiscriminator = [8]byte{167, 232, 232, 177, 200, 108, 114, 127}
var InstructionImplDef = ag_binary.NewVariantDefinition( ag_binary.AnchorTypeIDEncoding, []ag_binary.VariantType{ { "initialize", (*Initialize)(nil), }, { "set_params", (*SetParams)(nil), }, { "create", (*Create)(nil), }, { "buy", (*Buy)(nil), }, { "sell", (*Sell)(nil), }, { "withdraw", (*Withdraw)(nil), }, }, )
var ProgramID ag_solanago.PublicKey = ag_solanago.MustPublicKeyFromBase58("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P")
Functions ¶
func InstructionIDToName ¶
InstructionIDToName returns the name of the instruction given its ID.
func SetProgramID ¶
func SetProgramID(pubkey ag_solanago.PublicKey)
Types ¶
type BondingCurve ¶
type BondingCurve struct {
VirtualTokenReserves uint64
VirtualSolReserves uint64
RealTokenReserves uint64
RealSolReserves uint64
TokenTotalSupply uint64
Complete bool
}
func (BondingCurve) MarshalWithEncoder ¶
func (obj BondingCurve) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
func (*BondingCurve) UnmarshalWithDecoder ¶
func (obj *BondingCurve) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
type Buy ¶
type Buy struct {
Amount *uint64
MaxSolCost *uint64
// [0] = [] global
//
// [1] = [WRITE] feeRecipient
//
// [2] = [] mint
//
// [3] = [WRITE] bondingCurve
//
// [4] = [WRITE] associatedBondingCurve
//
// [5] = [WRITE] associatedUser
//
// [6] = [WRITE, SIGNER] user
//
// [7] = [] systemProgram
//
// [8] = [] tokenProgram
//
// [9] = [] rent
//
// [10] = [] eventAuthority
//
// [11] = [] program
ag_solanago.AccountMetaSlice `bin:"-"`
}
Buys tokens from a bonding curve.
func NewBuyInstruction ¶
func NewBuyInstruction( amount uint64, maxSolCost uint64, global ag_solanago.PublicKey, feeRecipient ag_solanago.PublicKey, mint ag_solanago.PublicKey, bondingCurve ag_solanago.PublicKey, associatedBondingCurve ag_solanago.PublicKey, associatedUser ag_solanago.PublicKey, user ag_solanago.PublicKey, systemProgram ag_solanago.PublicKey, tokenProgram ag_solanago.PublicKey, rent ag_solanago.PublicKey, eventAuthority ag_solanago.PublicKey, program ag_solanago.PublicKey) *Buy
NewBuyInstruction declares a new Buy instruction with the provided parameters and accounts.
func NewBuyInstructionBuilder ¶
func NewBuyInstructionBuilder() *Buy
NewBuyInstructionBuilder creates a new `Buy` instruction builder.
func (Buy) Build ¶
func (inst Buy) Build() *Instruction
func (*Buy) EncodeToTree ¶
func (inst *Buy) EncodeToTree(parent ag_treeout.Branches)
func (*Buy) GetAssociatedBondingCurveAccount ¶
func (inst *Buy) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
GetAssociatedBondingCurveAccount gets the "associatedBondingCurve" account.
func (*Buy) GetAssociatedUserAccount ¶
func (inst *Buy) GetAssociatedUserAccount() *ag_solanago.AccountMeta
GetAssociatedUserAccount gets the "associatedUser" account.
func (*Buy) GetBondingCurveAccount ¶
func (inst *Buy) GetBondingCurveAccount() *ag_solanago.AccountMeta
GetBondingCurveAccount gets the "bondingCurve" account.
func (*Buy) GetEventAuthorityAccount ¶
func (inst *Buy) GetEventAuthorityAccount() *ag_solanago.AccountMeta
GetEventAuthorityAccount gets the "eventAuthority" account.
func (*Buy) GetFeeRecipientAccount ¶
func (inst *Buy) GetFeeRecipientAccount() *ag_solanago.AccountMeta
GetFeeRecipientAccount gets the "feeRecipient" account.
func (*Buy) GetGlobalAccount ¶
func (inst *Buy) GetGlobalAccount() *ag_solanago.AccountMeta
GetGlobalAccount gets the "global" account.
func (*Buy) GetMintAccount ¶
func (inst *Buy) GetMintAccount() *ag_solanago.AccountMeta
GetMintAccount gets the "mint" account.
func (*Buy) GetProgramAccount ¶
func (inst *Buy) GetProgramAccount() *ag_solanago.AccountMeta
GetProgramAccount gets the "program" account.
func (*Buy) GetRentAccount ¶
func (inst *Buy) GetRentAccount() *ag_solanago.AccountMeta
GetRentAccount gets the "rent" account.
func (*Buy) GetSystemProgramAccount ¶
func (inst *Buy) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "systemProgram" account.
func (*Buy) GetTokenProgramAccount ¶
func (inst *Buy) GetTokenProgramAccount() *ag_solanago.AccountMeta
GetTokenProgramAccount gets the "tokenProgram" account.
func (*Buy) GetUserAccount ¶
func (inst *Buy) GetUserAccount() *ag_solanago.AccountMeta
GetUserAccount gets the "user" account.
func (Buy) MarshalWithEncoder ¶
func (*Buy) SetAssociatedBondingCurveAccount ¶
func (inst *Buy) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Buy
SetAssociatedBondingCurveAccount sets the "associatedBondingCurve" account.
func (*Buy) SetAssociatedUserAccount ¶
func (inst *Buy) SetAssociatedUserAccount(associatedUser ag_solanago.PublicKey) *Buy
SetAssociatedUserAccount sets the "associatedUser" account.
func (*Buy) SetBondingCurveAccount ¶
func (inst *Buy) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Buy
SetBondingCurveAccount sets the "bondingCurve" account.
func (*Buy) SetEventAuthorityAccount ¶
func (inst *Buy) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Buy
SetEventAuthorityAccount sets the "eventAuthority" account.
func (*Buy) SetFeeRecipientAccount ¶
func (inst *Buy) SetFeeRecipientAccount(feeRecipient ag_solanago.PublicKey) *Buy
SetFeeRecipientAccount sets the "feeRecipient" account.
func (*Buy) SetGlobalAccount ¶
func (inst *Buy) SetGlobalAccount(global ag_solanago.PublicKey) *Buy
SetGlobalAccount sets the "global" account.
func (*Buy) SetMaxSolCost ¶
SetMaxSolCost sets the "maxSolCost" parameter.
func (*Buy) SetMintAccount ¶
func (inst *Buy) SetMintAccount(mint ag_solanago.PublicKey) *Buy
SetMintAccount sets the "mint" account.
func (*Buy) SetProgramAccount ¶
func (inst *Buy) SetProgramAccount(program ag_solanago.PublicKey) *Buy
SetProgramAccount sets the "program" account.
func (*Buy) SetRentAccount ¶
func (inst *Buy) SetRentAccount(rent ag_solanago.PublicKey) *Buy
SetRentAccount sets the "rent" account.
func (*Buy) SetSystemProgramAccount ¶
func (inst *Buy) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Buy
SetSystemProgramAccount sets the "systemProgram" account.
func (*Buy) SetTokenProgramAccount ¶
func (inst *Buy) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Buy
SetTokenProgramAccount sets the "tokenProgram" account.
func (*Buy) SetUserAccount ¶
func (inst *Buy) SetUserAccount(user ag_solanago.PublicKey) *Buy
SetUserAccount sets the "user" account.
func (*Buy) UnmarshalWithDecoder ¶
func (Buy) ValidateAndBuild ¶
func (inst Buy) 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 Create ¶
type Create struct {
Name *string
Symbol *string
Uri *string
// [0] = [WRITE, SIGNER] mint
//
// [1] = [] mintAuthority
//
// [2] = [WRITE] bondingCurve
//
// [3] = [WRITE] associatedBondingCurve
//
// [4] = [] global
//
// [5] = [] mplTokenMetadata
//
// [6] = [WRITE] metadata
//
// [7] = [WRITE, SIGNER] user
//
// [8] = [] systemProgram
//
// [9] = [] tokenProgram
//
// [10] = [] associatedTokenProgram
//
// [11] = [] rent
//
// [12] = [] eventAuthority
//
// [13] = [] program
ag_solanago.AccountMetaSlice `bin:"-"`
}
Creates a new coin and bonding curve.
func NewCreateInstruction ¶
func NewCreateInstruction( name string, symbol string, uri string, mint ag_solanago.PublicKey, mintAuthority ag_solanago.PublicKey, bondingCurve ag_solanago.PublicKey, associatedBondingCurve ag_solanago.PublicKey, global ag_solanago.PublicKey, mplTokenMetadata ag_solanago.PublicKey, metadata ag_solanago.PublicKey, user ag_solanago.PublicKey, systemProgram ag_solanago.PublicKey, tokenProgram ag_solanago.PublicKey, associatedTokenProgram ag_solanago.PublicKey, rent ag_solanago.PublicKey, eventAuthority ag_solanago.PublicKey, program ag_solanago.PublicKey) *Create
NewCreateInstruction declares a new Create instruction with the provided parameters and accounts.
func NewCreateInstructionBuilder ¶
func NewCreateInstructionBuilder() *Create
NewCreateInstructionBuilder creates a new `Create` instruction builder.
func (Create) Build ¶
func (inst Create) Build() *Instruction
func (*Create) EncodeToTree ¶
func (inst *Create) EncodeToTree(parent ag_treeout.Branches)
func (*Create) GetAssociatedBondingCurveAccount ¶
func (inst *Create) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
GetAssociatedBondingCurveAccount gets the "associatedBondingCurve" account.
func (*Create) GetAssociatedTokenProgramAccount ¶
func (inst *Create) GetAssociatedTokenProgramAccount() *ag_solanago.AccountMeta
GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account.
func (*Create) GetBondingCurveAccount ¶
func (inst *Create) GetBondingCurveAccount() *ag_solanago.AccountMeta
GetBondingCurveAccount gets the "bondingCurve" account.
func (*Create) GetEventAuthorityAccount ¶
func (inst *Create) GetEventAuthorityAccount() *ag_solanago.AccountMeta
GetEventAuthorityAccount gets the "eventAuthority" account.
func (*Create) GetGlobalAccount ¶
func (inst *Create) GetGlobalAccount() *ag_solanago.AccountMeta
GetGlobalAccount gets the "global" account.
func (*Create) GetMetadataAccount ¶
func (inst *Create) GetMetadataAccount() *ag_solanago.AccountMeta
GetMetadataAccount gets the "metadata" account.
func (*Create) GetMintAccount ¶
func (inst *Create) GetMintAccount() *ag_solanago.AccountMeta
GetMintAccount gets the "mint" account.
func (*Create) GetMintAuthorityAccount ¶
func (inst *Create) GetMintAuthorityAccount() *ag_solanago.AccountMeta
GetMintAuthorityAccount gets the "mintAuthority" account.
func (*Create) GetMplTokenMetadataAccount ¶
func (inst *Create) GetMplTokenMetadataAccount() *ag_solanago.AccountMeta
GetMplTokenMetadataAccount gets the "mplTokenMetadata" account.
func (*Create) GetProgramAccount ¶
func (inst *Create) GetProgramAccount() *ag_solanago.AccountMeta
GetProgramAccount gets the "program" account.
func (*Create) GetRentAccount ¶
func (inst *Create) GetRentAccount() *ag_solanago.AccountMeta
GetRentAccount gets the "rent" account.
func (*Create) GetSystemProgramAccount ¶
func (inst *Create) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "systemProgram" account.
func (*Create) GetTokenProgramAccount ¶
func (inst *Create) GetTokenProgramAccount() *ag_solanago.AccountMeta
GetTokenProgramAccount gets the "tokenProgram" account.
func (*Create) GetUserAccount ¶
func (inst *Create) GetUserAccount() *ag_solanago.AccountMeta
GetUserAccount gets the "user" account.
func (Create) MarshalWithEncoder ¶
func (*Create) SetAssociatedBondingCurveAccount ¶
func (inst *Create) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Create
SetAssociatedBondingCurveAccount sets the "associatedBondingCurve" account.
func (*Create) SetAssociatedTokenProgramAccount ¶
func (inst *Create) SetAssociatedTokenProgramAccount(associatedTokenProgram ag_solanago.PublicKey) *Create
SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account.
func (*Create) SetBondingCurveAccount ¶
func (inst *Create) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Create
SetBondingCurveAccount sets the "bondingCurve" account.
func (*Create) SetEventAuthorityAccount ¶
func (inst *Create) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Create
SetEventAuthorityAccount sets the "eventAuthority" account.
func (*Create) SetGlobalAccount ¶
func (inst *Create) SetGlobalAccount(global ag_solanago.PublicKey) *Create
SetGlobalAccount sets the "global" account.
func (*Create) SetMetadataAccount ¶
func (inst *Create) SetMetadataAccount(metadata ag_solanago.PublicKey) *Create
SetMetadataAccount sets the "metadata" account.
func (*Create) SetMintAccount ¶
func (inst *Create) SetMintAccount(mint ag_solanago.PublicKey) *Create
SetMintAccount sets the "mint" account.
func (*Create) SetMintAuthorityAccount ¶
func (inst *Create) SetMintAuthorityAccount(mintAuthority ag_solanago.PublicKey) *Create
SetMintAuthorityAccount sets the "mintAuthority" account.
func (*Create) SetMplTokenMetadataAccount ¶
func (inst *Create) SetMplTokenMetadataAccount(mplTokenMetadata ag_solanago.PublicKey) *Create
SetMplTokenMetadataAccount sets the "mplTokenMetadata" account.
func (*Create) SetProgramAccount ¶
func (inst *Create) SetProgramAccount(program ag_solanago.PublicKey) *Create
SetProgramAccount sets the "program" account.
func (*Create) SetRentAccount ¶
func (inst *Create) SetRentAccount(rent ag_solanago.PublicKey) *Create
SetRentAccount sets the "rent" account.
func (*Create) SetSystemProgramAccount ¶
func (inst *Create) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Create
SetSystemProgramAccount sets the "systemProgram" account.
func (*Create) SetTokenProgramAccount ¶
func (inst *Create) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Create
SetTokenProgramAccount sets the "tokenProgram" account.
func (*Create) SetUserAccount ¶
func (inst *Create) SetUserAccount(user ag_solanago.PublicKey) *Create
SetUserAccount sets the "user" account.
func (*Create) UnmarshalWithDecoder ¶
func (Create) ValidateAndBuild ¶
func (inst Create) 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 Global ¶
type Global struct {
Initialized bool
Authority ag_solanago.PublicKey
FeeRecipient ag_solanago.PublicKey
InitialVirtualTokenReserves uint64
InitialVirtualSolReserves uint64
InitialRealTokenReserves uint64
TokenTotalSupply uint64
FeeBasisPoints uint64
}
func (Global) MarshalWithEncoder ¶
type Initialize ¶
type Initialize struct {
// [0] = [WRITE] global
//
// [1] = [WRITE, SIGNER] user
//
// [2] = [] systemProgram
ag_solanago.AccountMetaSlice `bin:"-"`
}
Creates the global state.
func NewInitializeInstruction ¶
func NewInitializeInstruction( global ag_solanago.PublicKey, user ag_solanago.PublicKey, systemProgram ag_solanago.PublicKey) *Initialize
NewInitializeInstruction declares a new Initialize instruction with the provided parameters and accounts.
func NewInitializeInstructionBuilder ¶
func NewInitializeInstructionBuilder() *Initialize
NewInitializeInstructionBuilder creates a new `Initialize` instruction builder.
func (Initialize) Build ¶
func (inst Initialize) Build() *Instruction
func (*Initialize) EncodeToTree ¶
func (inst *Initialize) EncodeToTree(parent ag_treeout.Branches)
func (*Initialize) GetGlobalAccount ¶
func (inst *Initialize) GetGlobalAccount() *ag_solanago.AccountMeta
GetGlobalAccount gets the "global" account.
func (*Initialize) GetSystemProgramAccount ¶
func (inst *Initialize) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "systemProgram" account.
func (*Initialize) GetUserAccount ¶
func (inst *Initialize) GetUserAccount() *ag_solanago.AccountMeta
GetUserAccount gets the "user" account.
func (Initialize) MarshalWithEncoder ¶
func (obj Initialize) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)
func (*Initialize) SetGlobalAccount ¶
func (inst *Initialize) SetGlobalAccount(global ag_solanago.PublicKey) *Initialize
SetGlobalAccount sets the "global" account.
func (*Initialize) SetSystemProgramAccount ¶
func (inst *Initialize) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Initialize
SetSystemProgramAccount sets the "systemProgram" account.
func (*Initialize) SetUserAccount ¶
func (inst *Initialize) SetUserAccount(user ag_solanago.PublicKey) *Initialize
SetUserAccount sets the "user" account.
func (*Initialize) UnmarshalWithDecoder ¶
func (obj *Initialize) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)
func (*Initialize) Validate ¶
func (inst *Initialize) Validate() error
func (Initialize) ValidateAndBuild ¶
func (inst Initialize) 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 Instruction ¶
type Instruction struct {
ag_binary.BaseVariant
}
func DecodeInstruction ¶
func DecodeInstruction(accounts []*ag_solanago.AccountMeta, data []byte) (*Instruction, error)
func (*Instruction) Accounts ¶
func (inst *Instruction) Accounts() (out []*ag_solanago.AccountMeta)
func (*Instruction) Data ¶
func (inst *Instruction) Data() ([]byte, error)
func (*Instruction) EncodeToTree ¶
func (inst *Instruction) EncodeToTree(parent ag_treeout.Branches)
func (*Instruction) MarshalWithEncoder ¶
func (inst *Instruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error
func (*Instruction) ProgramID ¶
func (inst *Instruction) ProgramID() ag_solanago.PublicKey
func (*Instruction) TextEncode ¶
func (*Instruction) UnmarshalWithDecoder ¶
func (inst *Instruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
type Sell ¶
type Sell struct {
Amount *uint64
MinSolOutput *uint64
// [0] = [] global
//
// [1] = [WRITE] feeRecipient
//
// [2] = [] mint
//
// [3] = [WRITE] bondingCurve
//
// [4] = [WRITE] associatedBondingCurve
//
// [5] = [WRITE] associatedUser
//
// [6] = [WRITE, SIGNER] user
//
// [7] = [] systemProgram
//
// [8] = [] associatedTokenProgram
//
// [9] = [] tokenProgram
//
// [10] = [] eventAuthority
//
// [11] = [] program
ag_solanago.AccountMetaSlice `bin:"-"`
}
Sells tokens into a bonding curve.
func NewSellInstruction ¶
func NewSellInstruction( amount uint64, minSolOutput uint64, global ag_solanago.PublicKey, feeRecipient ag_solanago.PublicKey, mint ag_solanago.PublicKey, bondingCurve ag_solanago.PublicKey, associatedBondingCurve ag_solanago.PublicKey, associatedUser ag_solanago.PublicKey, user ag_solanago.PublicKey, systemProgram ag_solanago.PublicKey, associatedTokenProgram ag_solanago.PublicKey, tokenProgram ag_solanago.PublicKey, eventAuthority ag_solanago.PublicKey, program ag_solanago.PublicKey) *Sell
NewSellInstruction declares a new Sell instruction with the provided parameters and accounts.
func NewSellInstructionBuilder ¶
func NewSellInstructionBuilder() *Sell
NewSellInstructionBuilder creates a new `Sell` instruction builder.
func (Sell) Build ¶
func (inst Sell) Build() *Instruction
func (*Sell) EncodeToTree ¶
func (inst *Sell) EncodeToTree(parent ag_treeout.Branches)
func (*Sell) GetAssociatedBondingCurveAccount ¶
func (inst *Sell) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
GetAssociatedBondingCurveAccount gets the "associatedBondingCurve" account.
func (*Sell) GetAssociatedTokenProgramAccount ¶
func (inst *Sell) GetAssociatedTokenProgramAccount() *ag_solanago.AccountMeta
GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account.
func (*Sell) GetAssociatedUserAccount ¶
func (inst *Sell) GetAssociatedUserAccount() *ag_solanago.AccountMeta
GetAssociatedUserAccount gets the "associatedUser" account.
func (*Sell) GetBondingCurveAccount ¶
func (inst *Sell) GetBondingCurveAccount() *ag_solanago.AccountMeta
GetBondingCurveAccount gets the "bondingCurve" account.
func (*Sell) GetEventAuthorityAccount ¶
func (inst *Sell) GetEventAuthorityAccount() *ag_solanago.AccountMeta
GetEventAuthorityAccount gets the "eventAuthority" account.
func (*Sell) GetFeeRecipientAccount ¶
func (inst *Sell) GetFeeRecipientAccount() *ag_solanago.AccountMeta
GetFeeRecipientAccount gets the "feeRecipient" account.
func (*Sell) GetGlobalAccount ¶
func (inst *Sell) GetGlobalAccount() *ag_solanago.AccountMeta
GetGlobalAccount gets the "global" account.
func (*Sell) GetMintAccount ¶
func (inst *Sell) GetMintAccount() *ag_solanago.AccountMeta
GetMintAccount gets the "mint" account.
func (*Sell) GetProgramAccount ¶
func (inst *Sell) GetProgramAccount() *ag_solanago.AccountMeta
GetProgramAccount gets the "program" account.
func (*Sell) GetSystemProgramAccount ¶
func (inst *Sell) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "systemProgram" account.
func (*Sell) GetTokenProgramAccount ¶
func (inst *Sell) GetTokenProgramAccount() *ag_solanago.AccountMeta
GetTokenProgramAccount gets the "tokenProgram" account.
func (*Sell) GetUserAccount ¶
func (inst *Sell) GetUserAccount() *ag_solanago.AccountMeta
GetUserAccount gets the "user" account.
func (Sell) MarshalWithEncoder ¶
func (*Sell) SetAssociatedBondingCurveAccount ¶
func (inst *Sell) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Sell
SetAssociatedBondingCurveAccount sets the "associatedBondingCurve" account.
func (*Sell) SetAssociatedTokenProgramAccount ¶
func (inst *Sell) SetAssociatedTokenProgramAccount(associatedTokenProgram ag_solanago.PublicKey) *Sell
SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account.
func (*Sell) SetAssociatedUserAccount ¶
func (inst *Sell) SetAssociatedUserAccount(associatedUser ag_solanago.PublicKey) *Sell
SetAssociatedUserAccount sets the "associatedUser" account.
func (*Sell) SetBondingCurveAccount ¶
func (inst *Sell) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Sell
SetBondingCurveAccount sets the "bondingCurve" account.
func (*Sell) SetEventAuthorityAccount ¶
func (inst *Sell) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Sell
SetEventAuthorityAccount sets the "eventAuthority" account.
func (*Sell) SetFeeRecipientAccount ¶
func (inst *Sell) SetFeeRecipientAccount(feeRecipient ag_solanago.PublicKey) *Sell
SetFeeRecipientAccount sets the "feeRecipient" account.
func (*Sell) SetGlobalAccount ¶
func (inst *Sell) SetGlobalAccount(global ag_solanago.PublicKey) *Sell
SetGlobalAccount sets the "global" account.
func (*Sell) SetMinSolOutput ¶
SetMinSolOutput sets the "minSolOutput" parameter.
func (*Sell) SetMintAccount ¶
func (inst *Sell) SetMintAccount(mint ag_solanago.PublicKey) *Sell
SetMintAccount sets the "mint" account.
func (*Sell) SetProgramAccount ¶
func (inst *Sell) SetProgramAccount(program ag_solanago.PublicKey) *Sell
SetProgramAccount sets the "program" account.
func (*Sell) SetSystemProgramAccount ¶
func (inst *Sell) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Sell
SetSystemProgramAccount sets the "systemProgram" account.
func (*Sell) SetTokenProgramAccount ¶
func (inst *Sell) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Sell
SetTokenProgramAccount sets the "tokenProgram" account.
func (*Sell) SetUserAccount ¶
func (inst *Sell) SetUserAccount(user ag_solanago.PublicKey) *Sell
SetUserAccount sets the "user" account.
func (*Sell) UnmarshalWithDecoder ¶
func (Sell) ValidateAndBuild ¶
func (inst Sell) 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 SetParams ¶
type SetParams struct {
FeeRecipient *ag_solanago.PublicKey
InitialVirtualTokenReserves *uint64
InitialVirtualSolReserves *uint64
InitialRealTokenReserves *uint64
TokenTotalSupply *uint64
FeeBasisPoints *uint64
// [0] = [WRITE] global
//
// [1] = [WRITE, SIGNER] user
//
// [2] = [] systemProgram
//
// [3] = [] eventAuthority
//
// [4] = [] program
ag_solanago.AccountMetaSlice `bin:"-"`
}
Sets the global state parameters.
func NewSetParamsInstruction ¶
func NewSetParamsInstruction( feeRecipient ag_solanago.PublicKey, initialVirtualTokenReserves uint64, initialVirtualSolReserves uint64, initialRealTokenReserves uint64, tokenTotalSupply uint64, feeBasisPoints uint64, global ag_solanago.PublicKey, user ag_solanago.PublicKey, systemProgram ag_solanago.PublicKey, eventAuthority ag_solanago.PublicKey, program ag_solanago.PublicKey) *SetParams
NewSetParamsInstruction declares a new SetParams instruction with the provided parameters and accounts.
func NewSetParamsInstructionBuilder ¶
func NewSetParamsInstructionBuilder() *SetParams
NewSetParamsInstructionBuilder creates a new `SetParams` instruction builder.
func (SetParams) Build ¶
func (inst SetParams) Build() *Instruction
func (*SetParams) EncodeToTree ¶
func (inst *SetParams) EncodeToTree(parent ag_treeout.Branches)
func (*SetParams) GetEventAuthorityAccount ¶
func (inst *SetParams) GetEventAuthorityAccount() *ag_solanago.AccountMeta
GetEventAuthorityAccount gets the "eventAuthority" account.
func (*SetParams) GetGlobalAccount ¶
func (inst *SetParams) GetGlobalAccount() *ag_solanago.AccountMeta
GetGlobalAccount gets the "global" account.
func (*SetParams) GetProgramAccount ¶
func (inst *SetParams) GetProgramAccount() *ag_solanago.AccountMeta
GetProgramAccount gets the "program" account.
func (*SetParams) GetSystemProgramAccount ¶
func (inst *SetParams) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "systemProgram" account.
func (*SetParams) GetUserAccount ¶
func (inst *SetParams) GetUserAccount() *ag_solanago.AccountMeta
GetUserAccount gets the "user" account.
func (SetParams) MarshalWithEncoder ¶
func (*SetParams) SetEventAuthorityAccount ¶
func (inst *SetParams) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *SetParams
SetEventAuthorityAccount sets the "eventAuthority" account.
func (*SetParams) SetFeeBasisPoints ¶
SetFeeBasisPoints sets the "feeBasisPoints" parameter.
func (*SetParams) SetFeeRecipient ¶
func (inst *SetParams) SetFeeRecipient(feeRecipient ag_solanago.PublicKey) *SetParams
SetFeeRecipient sets the "feeRecipient" parameter.
func (*SetParams) SetGlobalAccount ¶
func (inst *SetParams) SetGlobalAccount(global ag_solanago.PublicKey) *SetParams
SetGlobalAccount sets the "global" account.
func (*SetParams) SetInitialRealTokenReserves ¶
SetInitialRealTokenReserves sets the "initialRealTokenReserves" parameter.
func (*SetParams) SetInitialVirtualSolReserves ¶
SetInitialVirtualSolReserves sets the "initialVirtualSolReserves" parameter.
func (*SetParams) SetInitialVirtualTokenReserves ¶
func (inst *SetParams) SetInitialVirtualTokenReserves(initialVirtualTokenReserves uint64) *SetParams
SetInitialVirtualTokenReserves sets the "initialVirtualTokenReserves" parameter.
func (*SetParams) SetProgramAccount ¶
func (inst *SetParams) SetProgramAccount(program ag_solanago.PublicKey) *SetParams
SetProgramAccount sets the "program" account.
func (*SetParams) SetSystemProgramAccount ¶
func (inst *SetParams) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *SetParams
SetSystemProgramAccount sets the "systemProgram" account.
func (*SetParams) SetTokenTotalSupply ¶
SetTokenTotalSupply sets the "tokenTotalSupply" parameter.
func (*SetParams) SetUserAccount ¶
func (inst *SetParams) SetUserAccount(user ag_solanago.PublicKey) *SetParams
SetUserAccount sets the "user" account.
func (*SetParams) UnmarshalWithDecoder ¶
func (SetParams) ValidateAndBuild ¶
func (inst SetParams) 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 Withdraw ¶
type Withdraw struct {
// [0] = [] global
//
// [1] = [] mint
//
// [2] = [WRITE] bondingCurve
//
// [3] = [WRITE] associatedBondingCurve
//
// [4] = [WRITE] associatedUser
//
// [5] = [WRITE, SIGNER] user
//
// [6] = [] systemProgram
//
// [7] = [] tokenProgram
//
// [8] = [] rent
//
// [9] = [] eventAuthority
//
// [10] = [] program
ag_solanago.AccountMetaSlice `bin:"-"`
}
Allows the admin to withdraw liquidity for a migration once the bonding curve completes
func NewWithdrawInstruction ¶
func NewWithdrawInstruction( global ag_solanago.PublicKey, mint ag_solanago.PublicKey, bondingCurve ag_solanago.PublicKey, associatedBondingCurve ag_solanago.PublicKey, associatedUser ag_solanago.PublicKey, user ag_solanago.PublicKey, systemProgram ag_solanago.PublicKey, tokenProgram ag_solanago.PublicKey, rent ag_solanago.PublicKey, eventAuthority ag_solanago.PublicKey, program ag_solanago.PublicKey) *Withdraw
NewWithdrawInstruction declares a new Withdraw instruction with the provided parameters and accounts.
func NewWithdrawInstructionBuilder ¶
func NewWithdrawInstructionBuilder() *Withdraw
NewWithdrawInstructionBuilder creates a new `Withdraw` instruction builder.
func (Withdraw) Build ¶
func (inst Withdraw) Build() *Instruction
func (*Withdraw) EncodeToTree ¶
func (inst *Withdraw) EncodeToTree(parent ag_treeout.Branches)
func (*Withdraw) GetAssociatedBondingCurveAccount ¶
func (inst *Withdraw) GetAssociatedBondingCurveAccount() *ag_solanago.AccountMeta
GetAssociatedBondingCurveAccount gets the "associatedBondingCurve" account.
func (*Withdraw) GetAssociatedUserAccount ¶
func (inst *Withdraw) GetAssociatedUserAccount() *ag_solanago.AccountMeta
GetAssociatedUserAccount gets the "associatedUser" account.
func (*Withdraw) GetBondingCurveAccount ¶
func (inst *Withdraw) GetBondingCurveAccount() *ag_solanago.AccountMeta
GetBondingCurveAccount gets the "bondingCurve" account.
func (*Withdraw) GetEventAuthorityAccount ¶
func (inst *Withdraw) GetEventAuthorityAccount() *ag_solanago.AccountMeta
GetEventAuthorityAccount gets the "eventAuthority" account.
func (*Withdraw) GetGlobalAccount ¶
func (inst *Withdraw) GetGlobalAccount() *ag_solanago.AccountMeta
GetGlobalAccount gets the "global" account.
func (*Withdraw) GetMintAccount ¶
func (inst *Withdraw) GetMintAccount() *ag_solanago.AccountMeta
GetMintAccount gets the "mint" account.
func (*Withdraw) GetProgramAccount ¶
func (inst *Withdraw) GetProgramAccount() *ag_solanago.AccountMeta
GetProgramAccount gets the "program" account.
func (*Withdraw) GetRentAccount ¶
func (inst *Withdraw) GetRentAccount() *ag_solanago.AccountMeta
GetRentAccount gets the "rent" account.
func (*Withdraw) GetSystemProgramAccount ¶
func (inst *Withdraw) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "systemProgram" account.
func (*Withdraw) GetTokenProgramAccount ¶
func (inst *Withdraw) GetTokenProgramAccount() *ag_solanago.AccountMeta
GetTokenProgramAccount gets the "tokenProgram" account.
func (*Withdraw) GetUserAccount ¶
func (inst *Withdraw) GetUserAccount() *ag_solanago.AccountMeta
GetUserAccount gets the "user" account.
func (Withdraw) MarshalWithEncoder ¶
func (*Withdraw) SetAssociatedBondingCurveAccount ¶
func (inst *Withdraw) SetAssociatedBondingCurveAccount(associatedBondingCurve ag_solanago.PublicKey) *Withdraw
SetAssociatedBondingCurveAccount sets the "associatedBondingCurve" account.
func (*Withdraw) SetAssociatedUserAccount ¶
func (inst *Withdraw) SetAssociatedUserAccount(associatedUser ag_solanago.PublicKey) *Withdraw
SetAssociatedUserAccount sets the "associatedUser" account.
func (*Withdraw) SetBondingCurveAccount ¶
func (inst *Withdraw) SetBondingCurveAccount(bondingCurve ag_solanago.PublicKey) *Withdraw
SetBondingCurveAccount sets the "bondingCurve" account.
func (*Withdraw) SetEventAuthorityAccount ¶
func (inst *Withdraw) SetEventAuthorityAccount(eventAuthority ag_solanago.PublicKey) *Withdraw
SetEventAuthorityAccount sets the "eventAuthority" account.
func (*Withdraw) SetGlobalAccount ¶
func (inst *Withdraw) SetGlobalAccount(global ag_solanago.PublicKey) *Withdraw
SetGlobalAccount sets the "global" account.
func (*Withdraw) SetMintAccount ¶
func (inst *Withdraw) SetMintAccount(mint ag_solanago.PublicKey) *Withdraw
SetMintAccount sets the "mint" account.
func (*Withdraw) SetProgramAccount ¶
func (inst *Withdraw) SetProgramAccount(program ag_solanago.PublicKey) *Withdraw
SetProgramAccount sets the "program" account.
func (*Withdraw) SetRentAccount ¶
func (inst *Withdraw) SetRentAccount(rent ag_solanago.PublicKey) *Withdraw
SetRentAccount sets the "rent" account.
func (*Withdraw) SetSystemProgramAccount ¶
func (inst *Withdraw) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Withdraw
SetSystemProgramAccount sets the "systemProgram" account.
func (*Withdraw) SetTokenProgramAccount ¶
func (inst *Withdraw) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Withdraw
SetTokenProgramAccount sets the "tokenProgram" account.
func (*Withdraw) SetUserAccount ¶
func (inst *Withdraw) SetUserAccount(user ag_solanago.PublicKey) *Withdraw
SetUserAccount sets the "user" account.
func (*Withdraw) UnmarshalWithDecoder ¶
func (Withdraw) ValidateAndBuild ¶
func (inst Withdraw) 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.