evm

package
v0.0.0-...-1129cfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CallMessageSent  = Event{"CallMessageSent", "0x69e53ea70fdf945f6d035b3979748bc999151691fb1dc69d66f8017f8840ae28", "xcall"}
	CallMessage      = Event{"CallMessage", "0x2cbc78425621c181f9f8a25fc06e44a0ac2b67cd6a31f8ed7918934187f8cc59", "xcall"}
	ResponseMessage  = Event{"ResponseMessage", "0xbeacafd006c5e60667f6f04aec3a498f81c8e94142b4e95b5a5a763de43ca0ab", "xcall"}
	RollbackExecuted = Event{"RollbackExecuted", "0x08f0ac7aef6da8bbe43bee8b1444a1883f1359566618bc379ce5abba44883837", "xcall"}
)

Functions

func NewEVMRemotenet

func NewEVMRemotenet(testName string, log *zap.Logger, chainConfig chains.ChainConfig, client *client.Client, network string, testconfig *testconfig.Chain) chains.Chain

func NewEVMRemotenet(testName string, log *zap.Logger, chainConfig ibc.ChainConfig, numValidators int, numFullNodes int, scorePaths map[string]string) chains.Chain {

Types

type DebugTrace

type DebugTrace struct {
	Logs []struct {
		Level   uint   `json:"level"`
		Message string `json:"msg"`
		Ts      int    `json:"ts"`
	} `json:"logs"`
	Status icontypes.HexInt `json:"status"`
}

type EVMRemotenet

type EVMRemotenet struct {
	IBCAddresses map[string]string     `json:"addresses"`
	Wallets      map[string]ibc.Wallet `json:"wallets"`
	DockerClient *client.Client
	ContractABI  map[string]abi.ABI
	Network      string

	Client ethclient.Client
	// contains filtered or unexported fields
}

func (*EVMRemotenet) BackupConfig

func (an *EVMRemotenet) BackupConfig() ([]byte, error)

func (*EVMRemotenet) BinCommand

func (an *EVMRemotenet) BinCommand(command ...string) []string

func (*EVMRemotenet) Config

func (an *EVMRemotenet) Config() chains.ChainConfig

Config fetches the chain configuration.

func (*EVMRemotenet) DeployContractRemote

func (an *EVMRemotenet) DeployContractRemote(ctx context.Context, contractPath, key string, params ...interface{}) (common.Address, error)

func (*EVMRemotenet) DeployXCallMockApp

func (an *EVMRemotenet) DeployXCallMockApp(ctx context.Context, keyName string, connections []chains.XCallConnection) error

func (*EVMRemotenet) Exec

func (an *EVMRemotenet) 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 (*EVMRemotenet) ExecBin

func (an *EVMRemotenet) ExecBin(ctx context.Context, command ...string) ([]byte, []byte, error)

func (*EVMRemotenet) ExecCallTx

func (an *EVMRemotenet) ExecCallTx(ctx context.Context, contractAddress, methodName, pKey string, params ...interface{}) (*eth_types.Receipt, error)

func (*EVMRemotenet) ExecCallTxCommand

func (an *EVMRemotenet) ExecCallTxCommand(contractAddress, methodName, pKey string, params ...interface{}) []string

func (*EVMRemotenet) ExecuteCall

func (an *EVMRemotenet) ExecuteCall(ctx context.Context, reqId, data string) (context.Context, error)

func (*EVMRemotenet) ExecuteRollback

func (an *EVMRemotenet) ExecuteRollback(ctx context.Context, sn string) (context.Context, error)

func (*EVMRemotenet) FindCallMessage

func (an *EVMRemotenet) FindCallMessage(ctx context.Context, startHeight uint64, from, to, sn string) (string, string, error)

func (*EVMRemotenet) FindCallResponse

func (an *EVMRemotenet) FindCallResponse(ctx context.Context, startHeight uint64, sn string) (string, error)

func (*EVMRemotenet) FindEvent

func (an *EVMRemotenet) FindEvent(ctx context.Context, startHeight uint64, event Event, topics []common.Hash) (map[string]interface{}, error)

func (*EVMRemotenet) FindRollbackExecutedMessage

func (an *EVMRemotenet) FindRollbackExecutedMessage(ctx context.Context, startHeight uint64, sn string) (string, error)

func (*EVMRemotenet) FindTargetXCallMessage

func (an *EVMRemotenet) 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 (*EVMRemotenet) GetContractAddress

func (an *EVMRemotenet) GetContractAddress(key string) string

func (*EVMRemotenet) GetGRPCAddress

func (an *EVMRemotenet) GetGRPCAddress() string

GetGRPCAddress retrieves the grpc address that can be reached by other containers in the docker network. Not Applicable for Icon

func (*EVMRemotenet) GetHostGRPCAddress

func (an *EVMRemotenet) 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 (*EVMRemotenet) GetHostRPCAddress

func (an *EVMRemotenet) 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 (*EVMRemotenet) GetRPCAddress

func (an *EVMRemotenet) GetRPCAddress() string

GetRPCAddress retrieves the rpc address that can be reached by other containers in the docker network.

func (*EVMRemotenet) GetRelayConfig

func (an *EVMRemotenet) GetRelayConfig(ctx context.Context, rlyHome string, keyName string) ([]byte, error)

func (*EVMRemotenet) Height

func (an *EVMRemotenet) Height(ctx context.Context) (uint64, error)

Height returns the current block height or an error if unable to get current height.

func (*EVMRemotenet) ParseEvent

func (an *EVMRemotenet) ParseEvent(event Event, logs []*eth_types.Log) (map[string]interface{}, error)

func (*EVMRemotenet) RestoreConfig

func (an *EVMRemotenet) RestoreConfig(backup []byte) error

func (*EVMRemotenet) SendPacketXCall

func (an *EVMRemotenet) SendPacketXCall(ctx context.Context, keyName, _to string, data, rollback []byte) (context.Context, error)

func (*EVMRemotenet) SetupConnection

func (an *EVMRemotenet) SetupConnection(ctx context.Context, target chains.Chain) error

func (*EVMRemotenet) SetupXCall

func (an *EVMRemotenet) SetupXCall(ctx context.Context) error

func (*EVMRemotenet) XCall

func (an *EVMRemotenet) XCall(ctx context.Context, targetChain chains.Chain, keyName, to string, data, rollback []byte) (*chains.XCallResponse, error)

type Event

type Event struct {
	// contains filtered or unexported fields
}

type Query

type Query struct {
	MethodName string
	Value      Value
}

type Value

type Value struct {
	Params map[string]interface{} `json:"params,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL