Documentation ¶
Index ¶
- func NewStellarRemotenet(testName string, log *zap.Logger, chainConfig chains.ChainConfig, ...) chains.Chain
- type Client
- func (c *Client) CallContext(ctx context.Context, result interface{}, method string, params interface{}) error
- func (c *Client) GetEvent(ctx context.Context, height uint64, inputSn, contractId, eventSignature string) (*EventResponseEvent, error)
- func (c *Client) GetLatestLedger(ctx context.Context) (*LatestLedgerResponse, error)
- type EventQueryFilter
- type EventResponse
- type EventResponseEvent
- type Filter
- type HTTPError
- type LatestLedgerResponse
- type Pagination
- type StellarMessage
- type StellarRemotenet
- func (sn *StellarRemotenet) BackupConfig() ([]byte, error)
- func (sn *StellarRemotenet) BinCommand(command ...string) []string
- func (sn *StellarRemotenet) Config() chains.ChainConfig
- func (sn *StellarRemotenet) DeployContract(ctx context.Context, keyName string) (context.Context, error)
- func (sn *StellarRemotenet) DeployContractRemote(ctx context.Context, contractPath string) (string, error)
- func (sn *StellarRemotenet) DeployXCallMockApp(ctx context.Context, keyName string, connections []chains.XCallConnection) error
- func (sn *StellarRemotenet) Exec(ctx context.Context, cmd []string, env []string) (stdout []byte, stderr []byte, err error)
- func (sn *StellarRemotenet) ExecBin(ctx context.Context, command ...string) ([]byte, []byte, error)
- func (sn *StellarRemotenet) ExecCallTx(ctx context.Context, scoreAddress, methodName string, params map[string]string) (string, error)
- func (sn *StellarRemotenet) ExecCallTxCommand(ctx context.Context, scoreAddress, methodName string, params map[string]string) []string
- func (sn *StellarRemotenet) ExecTx(ctx context.Context, filePath string, command ...string) (string, error)
- func (sn *StellarRemotenet) ExportState(ctx context.Context, height int64) (string, error)
- func (sn *StellarRemotenet) FindCallMessage(ctx context.Context, startHeight uint64, from, to, sno string) (string, string, error)
- func (sn *StellarRemotenet) FindCallResponse(ctx context.Context, startHeight uint64, sno string) (string, error)
- func (sn *StellarRemotenet) FindEvent(ctx context.Context, startHeight uint64, contract, signature, sno string) (*EventResponseEvent, error)
- func (sn *StellarRemotenet) FindRollbackExecutedMessage(ctx context.Context, startHeight uint64, sno string) (string, error)
- func (sn *StellarRemotenet) FindTargetXCallMessage(ctx context.Context, target chains.Chain, height uint64, to string) (*chains.XCallResponse, error)
- func (sn *StellarRemotenet) GetAddress(ctx context.Context, keyName string) ([]byte, error)
- func (sn *StellarRemotenet) GetClientBlockByHeight(ctx context.Context, height int64) (string, error)
- func (sn *StellarRemotenet) GetContractAddress(key string) string
- func (sn *StellarRemotenet) GetGRPCAddress() string
- func (sn *StellarRemotenet) GetGasFeesInNativeDenom(gasPaid int64) int64
- func (sn *StellarRemotenet) GetHostGRPCAddress() string
- func (sn *StellarRemotenet) GetHostRPCAddress() string
- func (sn *StellarRemotenet) GetLastBlock(ctx context.Context) (context.Context, error)
- func (sn *StellarRemotenet) GetRPCAddress() string
- func (sn *StellarRemotenet) GetRelayConfig(ctx context.Context, rlyHome string, keyName string) ([]byte, error)
- func (sn *StellarRemotenet) Height(ctx context.Context) (uint64, error)
- func (sn *StellarRemotenet) IsPacketReceived(ctx context.Context, params map[string]interface{}, order ibc.Order) bool
- func (sn *StellarRemotenet) NodeCommand(command ...string) []string
- func (sn *StellarRemotenet) QueryContract(ctx context.Context, contractAddress, methodName string, ...) (context.Context, error)
- func (sn *StellarRemotenet) RestoreConfig(backup []byte) error
- func (sn *StellarRemotenet) SendPacketXCall(ctx context.Context, keyName, _to string, data, rollback []byte) (context.Context, error)
- func (sn *StellarRemotenet) SetupConnection(ctx context.Context, target chains.Chain) error
- func (sn *StellarRemotenet) SetupXCall(ctx context.Context) error
- func (sn *StellarRemotenet) TxCommand(ctx context.Context, filePath string, command ...string) []string
- func (sn *StellarRemotenet) XCall(ctx context.Context, targetChain chains.Chain, keyName, to string, ...) (*chains.XCallResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStellarRemotenet ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CallContext ¶
func (*Client) GetLatestLedger ¶
func (c *Client) GetLatestLedger(ctx context.Context) (*LatestLedgerResponse, error)
type EventQueryFilter ¶
type EventQueryFilter struct { StartLedger uint64 `json:"startLedger"` Pagination Pagination `json:"pagination"` Filters []Filter `json:"filters"` }
type EventResponse ¶
type EventResponse struct {
Events []EventResponseEvent `json:"events"`
}
type EventResponseEvent ¶
type LatestLedgerResponse ¶
type Pagination ¶
type Pagination struct {
Limit uint64 `json:"limit"`
}
type StellarMessage ¶
func (*StellarMessage) MsgBytes ¶
func (m *StellarMessage) MsgBytes() ([]byte, error)
func (*StellarMessage) Type ¶
func (m *StellarMessage) Type() string
type StellarRemotenet ¶
type StellarRemotenet struct { IBCAddresses map[string]string `json:"addresses"` Wallets map[string]ibc.Wallet `json:"wallets"` Client *client.Client Network string // contains filtered or unexported fields }
func (*StellarRemotenet) BackupConfig ¶
func (sn *StellarRemotenet) BackupConfig() ([]byte, error)
func (*StellarRemotenet) BinCommand ¶
func (sn *StellarRemotenet) BinCommand(command ...string) []string
func (*StellarRemotenet) Config ¶
func (sn *StellarRemotenet) Config() chains.ChainConfig
Config fetches the chain configuration.
func (*StellarRemotenet) DeployContract ¶
func (sn *StellarRemotenet) DeployContract(ctx context.Context, keyName string) (context.Context, error)
Remote implements chains.Chain
func (*StellarRemotenet) DeployContractRemote ¶
func (*StellarRemotenet) DeployXCallMockApp ¶
func (sn *StellarRemotenet) DeployXCallMockApp(ctx context.Context, keyName string, connections []chains.XCallConnection) error
func (*StellarRemotenet) Exec ¶
func (sn *StellarRemotenet) 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 (*StellarRemotenet) ExecCallTx ¶
func (*StellarRemotenet) ExecCallTxCommand ¶
func (*StellarRemotenet) ExportState ¶
ExportState exports the chain state at specific height.
func (*StellarRemotenet) FindCallMessage ¶
func (*StellarRemotenet) FindCallResponse ¶
func (*StellarRemotenet) FindEvent ¶
func (sn *StellarRemotenet) FindEvent(ctx context.Context, startHeight uint64, contract, signature, sno string) (*EventResponseEvent, error)
func (*StellarRemotenet) FindRollbackExecutedMessage ¶
func (*StellarRemotenet) FindTargetXCallMessage ¶
func (sn *StellarRemotenet) 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 (*StellarRemotenet) 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 (*StellarRemotenet) GetClientBlockByHeight ¶
func (sn *StellarRemotenet) GetClientBlockByHeight(ctx context.Context, height int64) (string, error)
GetBlockByHeight implements chains.Chain
func (*StellarRemotenet) GetContractAddress ¶
func (sn *StellarRemotenet) GetContractAddress(key string) string
func (*StellarRemotenet) GetGRPCAddress ¶
func (sn *StellarRemotenet) GetGRPCAddress() string
GetGRPCAddress retrieves the grpc address that can be reached by other containers in the docker network. Not Applicable for Icon
func (*StellarRemotenet) GetGasFeesInNativeDenom ¶
func (sn *StellarRemotenet) GetGasFeesInNativeDenom(gasPaid int64) int64
GetGasFeesInNativeDenom gets the fees in native denom for an amount of spent gas.
func (*StellarRemotenet) GetHostGRPCAddress ¶
func (sn *StellarRemotenet) 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 (*StellarRemotenet) GetHostRPCAddress ¶
func (sn *StellarRemotenet) 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 (*StellarRemotenet) GetLastBlock ¶
GetLastBlock implements chains.Chain
func (*StellarRemotenet) GetRPCAddress ¶
func (sn *StellarRemotenet) GetRPCAddress() string
GetRPCAddress retrieves the rpc address that can be reached by other containers in the docker network.
func (*StellarRemotenet) GetRelayConfig ¶
func (*StellarRemotenet) Height ¶
func (sn *StellarRemotenet) Height(ctx context.Context) (uint64, error)
Height returns the current block height or an error if unable to get current height.
func (*StellarRemotenet) IsPacketReceived ¶
func (sn *StellarRemotenet) IsPacketReceived(ctx context.Context, params map[string]interface{}, order ibc.Order) bool
HasPacketReceipt returns the receipt of the packet sent to the target chain
func (*StellarRemotenet) NodeCommand ¶
func (sn *StellarRemotenet) NodeCommand(command ...string) []string
func (*StellarRemotenet) QueryContract ¶
func (sn *StellarRemotenet) QueryContract(ctx context.Context, contractAddress, methodName string, params map[string]interface{}) (context.Context, error)
QueryContract implements chains.Chain
func (*StellarRemotenet) RestoreConfig ¶
func (sn *StellarRemotenet) RestoreConfig(backup []byte) error
func (*StellarRemotenet) SendPacketXCall ¶
func (*StellarRemotenet) SetupConnection ¶
func (*StellarRemotenet) SetupXCall ¶
func (sn *StellarRemotenet) SetupXCall(ctx context.Context) error