royal

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package royal is for utilities that should be shared by all golang apps at royal

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthClient

type EthClient interface {
	ethereum.ChainStateReader
	ethereum.PendingStateReader
	ethereum.GasPricer
	ethereum.GasEstimator
	ethereum.TransactionReader
	ethereum.TransactionSender
	bind.ContractBackend

	// GetChainID is a helper method for retrieving the ChainId of the current chain
	GetChainID() uint64
}

EthClient is an interface that supports all the methods of backends.SimulatedBackend and ethclient.Client so mocking is way easier. This is interface that should be used in our code

func NewClient

func NewClient(chainID uint64, rpcURL string) (EthClient, error)

NewClient initializes a new connection to the given chainID given the rpcURL

Jump to

Keyboard shortcuts

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