Documentation
¶
Index ¶
- Constants
- type Chain
- func (c Chain) ChainSelector() uint64
- func (c Chain) CloseBuffers(logger logger.Logger, buffer string) error
- func (c Chain) DeployProgram(logger logger.Logger, programInfo ProgramInfo, isUpgrade bool, ...) (string, error)
- func (c Chain) Family() string
- func (c Chain) GetAccountDataBorshInto(ctx context.Context, pubkey sollib.PublicKey, accountState interface{}) error
- func (c Chain) Name() string
- func (c Chain) String() string
- type ProgramInfo
Constants ¶
View Source
const ( ProgramIDPrefix = "Program Id: " BufferIDPrefix = "Buffer: " SolDefaultCommitment = solrpc.CommitmentConfirmed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { Selector uint64 // RPC client Client *solrpc.Client URL string WSURL string // TODO: raw private key for now, need to replace with a more secure way DeployerKey *sollib.PrivateKey // SendAndConfim provides a utility function to send a transaction and waits for confirmation. // Options can be passed to modify the transaction such as setting additional signers or // modifying compute unit limits. SendAndConfirm func( ctx context.Context, instructions []sollib.Instruction, opts ...rpcclient.TxModifier, ) error // Legacy: Use SendAndConfirm instead. This function will be removed in the future. // Confirm is a legacy function that sends a transaction and waits for confirmation. Confirm func(instructions []sollib.Instruction, opts ...solCommonUtil.TxModifier) error // deploy uses the solana CLI which needs a keyfile KeypairPath string ProgramsPath string }
Chain represents a Solana chain.
func (Chain) ChainSelector ¶
ChainSelector returns the chain selector of the chain
func (Chain) DeployProgram ¶
func (c Chain) DeployProgram(logger logger.Logger, programInfo ProgramInfo, isUpgrade bool, overallocate bool) (string, error)
Overallocate should be set when deploying any program that may eventually be owned by timelock Overallocate is mutually exclusive with isUpgrade
func (Chain) GetAccountDataBorshInto ¶
type ProgramInfo ¶
ProgramInfo contains information about a Solana program.
Click to show internal directories.
Click to hide internal directories.