evm

package
v1.0.2-beta Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeSuccess = iota
	CodeTxFailed
	CodeNoResult
	CodeServerUnresponsive
	CodeUnauthorized
	CodeUnsupportedTransaction
	CodeInvalidFormat
)

Variables

View Source
var (
	ErrNoEVMTypes = errors.New("no evm types were given to the server")
)

Functions

This section is empty.

Types

type Option

type Option func(*msgServerImpl)

func WithCredentials

func WithCredentials(certPath, keyPath string) Option

func WithPort

func WithPort(port string) Option

type Server

type Server interface {
	routerv1.MsgServer
	// Serve serves the application in a new go routine.
	Serve() error
	Shutdown()
}

func NewServer

func NewServer(w *ecs.World, opts ...Option) (Server, error)

NewServer returns a new EVM connection server. This server is responsible for handling requests originating from the EVM. It runs on a default port of 9020, but a custom port can be set using options, or by setting an env variable with key CARDINAL_EVM_PORT.

NewServer will return ErrNoEvmTypes if no transactions OR queries were given with EVM support.

Jump to

Keyboard shortcuts

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