Documentation
¶
Index ¶
- func NewIconRemotenet(testName string, log *zap.Logger, chainConfig chains.ChainConfig, ...) chains.Chain
- type DebugTrace
- type IconRemotenet
- func (in *IconRemotenet) BackupConfig() ([]byte, error)
- func (in *IconRemotenet) BinCommand(command ...string) []string
- func (in *IconRemotenet) Config() chains.ChainConfig
- func (in *IconRemotenet) DeployContractRemote(ctx context.Context, contractPath, keystorePath, initMessage string) (string, error)
- func (in *IconRemotenet) DeployXCallMockApp(ctx context.Context, keyName string, connections []chains.XCallConnection) error
- func (in *IconRemotenet) Exec(ctx context.Context, cmd []string, env []string) (stdout []byte, stderr []byte, err error)
- func (in *IconRemotenet) ExecBin(ctx context.Context, command ...string) ([]byte, []byte, error)
- func (in *IconRemotenet) ExecCallTx(ctx context.Context, scoreAddress, methodName, keystorePath, params string) (string, error)
- func (in *IconRemotenet) ExecCallTxCommand(ctx context.Context, scoreAddress, methodName, keystorePath, params string) []string
- func (in *IconRemotenet) ExecTx(ctx context.Context, initMessage string, filePath string, keystorePath string, ...) (string, error)
- func (in *IconRemotenet) ExecuteRemoteContract(ctx context.Context, scoreAddress, methodName, keyStorePath, params string) (string, error)
- func (in *IconRemotenet) FindCallMessage(ctx context.Context, startHeight uint64, from, to, sn string) (string, string, error)
- func (in *IconRemotenet) FindCallResponse(ctx context.Context, startHeight uint64, sn string) (string, error)
- func (in *IconRemotenet) FindEvent(ctx context.Context, startHeight uint64, contract, signature string, ...) (*icontypes.EventNotification, error)
- func (in *IconRemotenet) FindRollbackExecutedMessage(ctx context.Context, startHeight uint64, sn string) (string, error)
- func (in *IconRemotenet) FindTargetXCallMessage(ctx context.Context, target chains.Chain, height uint64, to string) (*chains.XCallResponse, error)
- func (in *IconRemotenet) GetContractAddress(key string) string
- func (in *IconRemotenet) GetDebugTrace(ctx context.Context, hash icontypes.HexBytes) (*DebugTrace, error)
- func (in *IconRemotenet) GetGRPCAddress() string
- func (in *IconRemotenet) GetGasFeesInNativeDenom(gasPaid int64) int64
- func (in *IconRemotenet) GetHostGRPCAddress() string
- func (in *IconRemotenet) GetHostRPCAddress() string
- func (in *IconRemotenet) GetRPCAddress() string
- func (in *IconRemotenet) GetRelayConfig(ctx context.Context, rlyHome string, keyName string) ([]byte, error)
- func (in *IconRemotenet) Height(ctx context.Context) (uint64, error)
- func (in *IconRemotenet) HomeDir() string
- func (in *IconRemotenet) IsPacketReceived(ctx context.Context, params map[string]interface{}, order ibc.Order) bool
- func (in *IconRemotenet) NodeCommand(command ...string) []string
- func (in *IconRemotenet) RestoreConfig(backup []byte) error
- func (in *IconRemotenet) SendPacketXCall(ctx context.Context, keyName, _to string, data, rollback []byte) (context.Context, error)
- func (in *IconRemotenet) SetupConnection(ctx context.Context, target chains.Chain) error
- func (in *IconRemotenet) SetupXCall(ctx context.Context) error
- func (in *IconRemotenet) TransactionResult(ctx context.Context, hash string) (*icontypes.TransactionResult, error)
- func (in *IconRemotenet) TxCommand(ctx context.Context, initMessage, filePath, keystorePath string, ...) []string
- func (in *IconRemotenet) XCall(ctx context.Context, targetChain chains.Chain, keyName, to string, ...) (*chains.XCallResponse, error)
- type Query
- type Value
- type WebSocketListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIconRemotenet ¶
Types ¶
type DebugTrace ¶
type IconRemotenet ¶
type IconRemotenet struct { IBCAddresses map[string]string `json:"addresses"` Wallets map[string]ibc.Wallet `json:"wallets"` Client *client.Client Network string IconClient iconclient.Client // contains filtered or unexported fields }
func (*IconRemotenet) BackupConfig ¶
func (in *IconRemotenet) BackupConfig() ([]byte, error)
func (*IconRemotenet) BinCommand ¶
func (in *IconRemotenet) BinCommand(command ...string) []string
func (*IconRemotenet) Config ¶
func (in *IconRemotenet) Config() chains.ChainConfig
Config fetches the chain configuration.
func (*IconRemotenet) DeployContractRemote ¶
func (*IconRemotenet) DeployXCallMockApp ¶
func (in *IconRemotenet) DeployXCallMockApp(ctx context.Context, keyName string, connections []chains.XCallConnection) error
func (*IconRemotenet) Exec ¶
func (in *IconRemotenet) 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 (*IconRemotenet) ExecCallTx ¶
func (*IconRemotenet) ExecCallTxCommand ¶
func (in *IconRemotenet) ExecCallTxCommand(ctx context.Context, scoreAddress, methodName, keystorePath, params string) []string
func (*IconRemotenet) ExecuteRemoteContract ¶
func (*IconRemotenet) FindCallMessage ¶
func (*IconRemotenet) FindCallResponse ¶
func (*IconRemotenet) FindEvent ¶
func (in *IconRemotenet) FindEvent(ctx context.Context, startHeight uint64, contract, signature string, index []*string) (*icontypes.EventNotification, error)
func (*IconRemotenet) FindRollbackExecutedMessage ¶
func (*IconRemotenet) FindTargetXCallMessage ¶
func (in *IconRemotenet) 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 (*IconRemotenet) GetContractAddress ¶
func (in *IconRemotenet) GetContractAddress(key string) string
func (*IconRemotenet) GetDebugTrace ¶
func (in *IconRemotenet) GetDebugTrace(ctx context.Context, hash icontypes.HexBytes) (*DebugTrace, error)
func (*IconRemotenet) GetGRPCAddress ¶
func (in *IconRemotenet) GetGRPCAddress() string
GetGRPCAddress retrieves the grpc address that can be reached by other containers in the docker network. Not Applicable for Icon
func (*IconRemotenet) GetGasFeesInNativeDenom ¶
func (in *IconRemotenet) GetGasFeesInNativeDenom(gasPaid int64) int64
GetGasFeesInNativeDenom gets the fees in native denom for an amount of spent gas.
func (*IconRemotenet) GetHostGRPCAddress ¶
func (in *IconRemotenet) 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 (*IconRemotenet) GetHostRPCAddress ¶
func (in *IconRemotenet) 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 (*IconRemotenet) GetRPCAddress ¶
func (in *IconRemotenet) GetRPCAddress() string
GetRPCAddress retrieves the rpc address that can be reached by other containers in the docker network.
func (*IconRemotenet) GetRelayConfig ¶
func (*IconRemotenet) Height ¶
func (in *IconRemotenet) Height(ctx context.Context) (uint64, error)
Height returns the current block height or an error if unable to get current height.
func (*IconRemotenet) HomeDir ¶
func (in *IconRemotenet) 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 (*IconRemotenet) IsPacketReceived ¶
func (in *IconRemotenet) 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 (*IconRemotenet) NodeCommand ¶
func (in *IconRemotenet) NodeCommand(command ...string) []string
func (*IconRemotenet) RestoreConfig ¶
func (in *IconRemotenet) RestoreConfig(backup []byte) error
func (*IconRemotenet) SendPacketXCall ¶
func (*IconRemotenet) SetupConnection ¶
func (*IconRemotenet) SetupXCall ¶
func (in *IconRemotenet) SetupXCall(ctx context.Context) error
func (*IconRemotenet) TransactionResult ¶
func (in *IconRemotenet) TransactionResult(ctx context.Context, hash string) (*icontypes.TransactionResult, error)
type WebSocketListener ¶
type WebSocketListener struct { Shutdown chan struct{} Events []map[string][]string // contains filtered or unexported fields }
func NewIconEventListener ¶
func NewIconEventListener(c *IconRemotenet, contract string) *WebSocketListener
func (*WebSocketListener) Start ¶
func (w *WebSocketListener) Start()
func (*WebSocketListener) Stop ¶
func (w *WebSocketListener) Stop()