Documentation ¶
Index ¶
- Variables
- func NewSolanaRemoteNet(testName string, log *zap.Logger, chainConfig chains.ChainConfig, ...) chains.Chain
- type CallMessageEvent
- type CallMessageSent
- type Client
- func (cl Client) GetAccountInfo(ctx context.Context, acAddr string, accPtr interface{}) error
- func (cl Client) GetAccountInfoRaw(ctx context.Context, addr string) (*solrpc.Account, error)
- func (cl Client) GetEvent(ctx context.Context, account solana.PublicKey, allEvents []IdlEvent, ...) (*EventResponseEvent, error)
- func (cl Client) GetLatestBlockHash(ctx context.Context) (*solana.Hash, error)
- func (cl Client) GetLatestBlockHeight(ctx context.Context, ctype solrpc.CommitmentType) (uint64, error)
- func (cl Client) GetSignatureStatus(ctx context.Context, searchTxHistory bool, sign solana.Signature) (*solrpc.SignatureStatusesResult, error)
- func (cl Client) GetSignaturesForAddress(ctx context.Context, account solana.PublicKey, ...) ([]*solrpc.TransactionSignature, error)
- func (cl Client) GetTransaction(ctx context.Context, signature solana.Signature, ...) (*solrpc.GetTransactionResult, error)
- func (cl Client) SendTx(ctx context.Context, tx *solana.Transaction, opts *solrpc.TransactionOpts) (solana.Signature, error)
- func (cl Client) SimulateTx(ctx context.Context, tx *solana.Transaction, ...) (*solrpc.SimulateTransactionResult, error)
- type Conn
- type ConnAc
- type DappConfigAccount
- type EventResponse
- type EventResponseEvent
- type IDL
- type IdlAccount
- type IdlDS
- type IdlEvent
- type IdlField
- type IdlInstruction
- type IdlMetadata
- type IdlType
- type NetworkAddress
- type ResponseMessage
- type RollbackExecuted
- type SolEvent
- type SolanaRemoteNet
- func (sn *SolanaRemoteNet) BinCommand(command ...string) []string
- func (sn *SolanaRemoteNet) Config() chains.ChainConfig
- func (sn *SolanaRemoteNet) DeployContractRemote(ctx context.Context, contractName string) (string, error)
- func (sn *SolanaRemoteNet) DeployXCallMockApp(ctx context.Context, keyName string, connections []chains.XCallConnection) error
- func (sn *SolanaRemoteNet) Exec(ctx context.Context, cmd []string, env []string) (stdout []byte, stderr []byte, err error)
- func (sn *SolanaRemoteNet) ExecBin(ctx context.Context, command ...string) ([]byte, []byte, error)
- func (sn *SolanaRemoteNet) ExecTx(ctx context.Context, contractName string, command ...string) (string, error)
- func (sn *SolanaRemoteNet) FindCallMessage(ctx context.Context, startHeight uint64, from, to, sno string) (string, string, error)
- func (sn *SolanaRemoteNet) FindCallResponse(ctx context.Context, startHeight uint64, sno string) (string, error)
- func (sn *SolanaRemoteNet) FindEvent(ctx context.Context, startHeight uint64, allEvents []IdlEvent, ...) (*EventResponseEvent, error)
- func (sn *SolanaRemoteNet) FindRollbackExecutedMessage(ctx context.Context, startHeight uint64, sno string) (string, error)
- func (sn *SolanaRemoteNet) FindTargetXCallMessage(ctx context.Context, target chains.Chain, height uint64, to string) (*chains.XCallResponse, error)
- func (sn *SolanaRemoteNet) GetAddress(ctx context.Context, keyName string) ([]byte, error)
- func (sn *SolanaRemoteNet) GetClientBlockByHeight(ctx context.Context, height int64) (string, error)
- func (sn *SolanaRemoteNet) GetContractAddress(key string) string
- func (sn *SolanaRemoteNet) GetGRPCAddress() string
- func (sn *SolanaRemoteNet) GetHostGRPCAddress() string
- func (sn *SolanaRemoteNet) GetHostRPCAddress() string
- func (sn *SolanaRemoteNet) GetLastBlock(ctx context.Context) (context.Context, error)
- func (sn *SolanaRemoteNet) GetRPCAddress() string
- func (sn *SolanaRemoteNet) GetRelayConfig(ctx context.Context, rlyHome string, keyName string) ([]byte, error)
- func (sn *SolanaRemoteNet) Height(ctx context.Context) (uint64, error)
- func (sn *SolanaRemoteNet) HomeDir() string
- func (sn *SolanaRemoteNet) NodeCommand(command ...string) []string
- func (sn *SolanaRemoteNet) QueryContract(ctx context.Context, contractAddress, methodName string, ...) (context.Context, error)
- func (sn *SolanaRemoteNet) SendPacketXCall(ctx context.Context, keyName, _to string, data, rollback []byte) (context.Context, error)
- func (sn *SolanaRemoteNet) SetupConnection(ctx context.Context, target chains.Chain) error
- func (sn *SolanaRemoteNet) SetupXCall(ctx context.Context) error
- func (sn *SolanaRemoteNet) TxCommand(ctx context.Context, contractName string, command ...string) []string
- func (sn *SolanaRemoteNet) XCall(ctx context.Context, targetChain chains.Chain, keyName, to string, ...) (*chains.XCallResponse, error)
- type XcallConfigAccount
Constants ¶
This section is empty.
Variables ¶
var ( EventLogPrefix = "Program data: " EventSendMessage = "SendMessage" EventCallMessage = "CallMessage" EventRollbackMessage = "RollbackMessage" EventCallMessageSent = "CallMessageSent" EventRollbackExecuted = "RollbackExecuted" EventResponseMessage = "ResponseMessage" )
Functions ¶
func NewSolanaRemoteNet ¶
Types ¶
type CallMessageEvent ¶
type CallMessageSent ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) GetAccountInfo ¶
func (Client) GetAccountInfoRaw ¶
func (Client) GetLatestBlockHash ¶
func (Client) GetLatestBlockHeight ¶
func (Client) GetSignatureStatus ¶
func (Client) GetSignaturesForAddress ¶
func (cl Client) GetSignaturesForAddress( ctx context.Context, account solana.PublicKey, opts *solrpc.GetSignaturesForAddressOpts, ) ([]*solrpc.TransactionSignature, error)
func (Client) GetTransaction ¶
func (cl Client) GetTransaction( ctx context.Context, signature solana.Signature, opts *solrpc.GetTransactionOpts, ) (*solrpc.GetTransactionResult, error)
func (Client) SimulateTx ¶
func (cl Client) SimulateTx( ctx context.Context, tx *solana.Transaction, opts *solrpc.SimulateTransactionOpts, ) (*solrpc.SimulateTransactionResult, error)
type DappConfigAccount ¶
type EventResponse ¶
type EventResponse struct {
Events []EventResponseEvent `json:"events"`
}
type EventResponseEvent ¶
type IDL ¶
type IDL struct { Address string `json:"address"` Metadata IdlMetadata `json:"metadata"` Instructions []IdlInstruction `json:"instructions"` Accounts []IdlAccount `json:"accounts"` Events []IdlEvent `json:"events"` Types []IdlType `json:"types"` }
func (*IDL) GetInstructionDiscriminator ¶
func (*IDL) GetProgramID ¶
type IdlAccount ¶
type IdlDS ¶
type IdlDS struct { Kind string `json:"kind"` Fields []interface{} `json:"fields"` }
IdlDS DS means data structure
type IdlInstruction ¶
type IdlInstruction struct { Name string `json:"name"` Discriminator []byte `json:"discriminator"` Accounts []IdlAccount `json:"accounts"` Args []IdlField `json:"args"` }
type IdlMetadata ¶
type NetworkAddress ¶
type NetworkAddress struct {
Address string
}
type ResponseMessage ¶
type RollbackExecuted ¶
type SolanaRemoteNet ¶
type SolanaRemoteNet struct { IBCAddresses map[string]string `json:"addresses"` Wallets map[string]ibc.Wallet `json:"wallets"` Client *client.Client Network string CNids []string // contains filtered or unexported fields }
func (*SolanaRemoteNet) BinCommand ¶
func (sn *SolanaRemoteNet) BinCommand(command ...string) []string
func (*SolanaRemoteNet) Config ¶
func (sn *SolanaRemoteNet) Config() chains.ChainConfig
Config fetches the chain configuration.
func (*SolanaRemoteNet) DeployContractRemote ¶
func (*SolanaRemoteNet) DeployXCallMockApp ¶
func (sn *SolanaRemoteNet) DeployXCallMockApp(ctx context.Context, keyName string, connections []chains.XCallConnection) error
func (*SolanaRemoteNet) Exec ¶
func (sn *SolanaRemoteNet) Exec(ctx context.Context, cmd []string, env []string) (stdout []byte, stderr []byte, err error)
Exec runs an arbitrary command using Chain's docker environment. Whether the invoked command is run in a one-off container or execing into an already running container is up to the chain implementation.
"env" are environment variables in the format "MY_ENV_VAR=value"
func (*SolanaRemoteNet) FindCallMessage ¶
func (*SolanaRemoteNet) FindCallResponse ¶
func (*SolanaRemoteNet) FindEvent ¶
func (sn *SolanaRemoteNet) FindEvent(ctx context.Context, startHeight uint64, allEvents []IdlEvent, contract, signature, sno string) (*EventResponseEvent, error)
func (*SolanaRemoteNet) FindRollbackExecutedMessage ¶
func (*SolanaRemoteNet) FindTargetXCallMessage ¶
func (sn *SolanaRemoteNet) FindTargetXCallMessage(ctx context.Context, target chains.Chain, height uint64, to string) (*chains.XCallResponse, error)
FindTargetXCallMessage returns the request id and the data of the message sent to the target chain
func (*SolanaRemoteNet) GetAddress ¶
GetAddress fetches the bech32 address for a test key on the "user" node (either the first fullnode or the first validator if no fullnodes).
func (*SolanaRemoteNet) GetClientBlockByHeight ¶
func (sn *SolanaRemoteNet) GetClientBlockByHeight(ctx context.Context, height int64) (string, error)
GetBlockByHeight implements chains.Chain
func (*SolanaRemoteNet) GetContractAddress ¶
func (sn *SolanaRemoteNet) GetContractAddress(key string) string
func (*SolanaRemoteNet) GetGRPCAddress ¶
func (sn *SolanaRemoteNet) GetGRPCAddress() string
GetGRPCAddress retrieves the grpc address that can be reached by other containers in the docker network. Not Applicable for Icon
func (*SolanaRemoteNet) GetHostGRPCAddress ¶
func (sn *SolanaRemoteNet) GetHostGRPCAddress() string
GetHostGRPCAddress returns the grpc address that can be reached by processes on the host machine. Note that this will not return a valid value until after Start returns. Not applicable for Icon
func (*SolanaRemoteNet) GetHostRPCAddress ¶
func (sn *SolanaRemoteNet) GetHostRPCAddress() string
GetHostRPCAddress returns the rpc address that can be reached by processes on the host machine. Note that this will not return a valid value until after Start returns.
func (*SolanaRemoteNet) GetLastBlock ¶
GetLastBlock implements chains.Chain
func (*SolanaRemoteNet) GetRPCAddress ¶
func (sn *SolanaRemoteNet) GetRPCAddress() string
GetRPCAddress retrieves the rpc address that can be reached by other containers in the docker network.
func (*SolanaRemoteNet) GetRelayConfig ¶
func (*SolanaRemoteNet) Height ¶
func (sn *SolanaRemoteNet) Height(ctx context.Context) (uint64, error)
Height returns the current block height or an error if unable to get current height.
func (*SolanaRemoteNet) HomeDir ¶
func (sn *SolanaRemoteNet) HomeDir() string
HomeDir is the home directory of a node running in a docker container. Therefore, this maps to the container's filesystem (not the host).
func (*SolanaRemoteNet) NodeCommand ¶
func (sn *SolanaRemoteNet) NodeCommand(command ...string) []string
func (*SolanaRemoteNet) QueryContract ¶
func (sn *SolanaRemoteNet) QueryContract(ctx context.Context, contractAddress, methodName string, params map[string]interface{}) (context.Context, error)
QueryContract implements chains.Chain
func (*SolanaRemoteNet) SendPacketXCall ¶
func (*SolanaRemoteNet) SetupConnection ¶
func (*SolanaRemoteNet) SetupXCall ¶
func (sn *SolanaRemoteNet) SetupXCall(ctx context.Context) error