eth

package
v0.0.0-...-a0fa9d7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrivKeyFromKeyStore

func NewPrivKeyFromKeyStore(keystoreFile, passwordFile string, needPass bool) (*ecdsa.PrivateKey, error)

Types

type Config

type Config struct {
	ChainId           *big.Int      `yaml:"chain_id" mapstructure:"chain_id"`
	RpcUrl            string        `yaml:"rpc_url" mapstructure:"rpc_url"`
	EnabledRequestLog bool          `yaml:"enabled_request_log" mapstructure:"enabled_request_log"`
	Timeout           time.Duration `yaml:"timeout" mapstructure:"timeout"`
}

func NewDefConfig

func NewDefConfig() Config

func (Config) String

func (c Config) String() string

func (Config) Validate

func (c Config) Validate() error

type LoggerTransport

type LoggerTransport struct {
	http.RoundTripper
	// contains filtered or unexported fields
}

func (*LoggerTransport) RoundTrip

func (l *LoggerTransport) RoundTrip(req *http.Request) (*http.Response, error)

type RPCClient

type RPCClient interface {
	ChainID(ctx context.Context) (*big.Int, error)
	BlockNumber(ctx context.Context) (uint64, error)
	BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)

	bind.ContractCaller
	bind.PendingContractCaller
	bind.ContractTransactor
	bind.ContractFilterer
	bind.DeployBackend
	bind.ContractBackend

	ethereum.ChainStateReader

	Close()
}

func NewRPCClient

func NewRPCClient(ctx context.Context, logger log.Logger, config Config) (RPCClient, error)

Jump to

Keyboard shortcuts

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