client

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient() http.Client

NewHttpClient generates new HTTP Client

Types

type HermezClient

type HermezClient struct {
	EthClient                *ethclient.Client
	AuctionContract          *HermezAuctionProtocol.Auction
	HttpClient               http.Client
	BootCoordinatorURL       string
	BootCoordinatorClient    *sling.Sling
	CurrentCoordinatorURL    string
	CurrentCoordinatorClient *sling.Sling
	EthereumChainID          int
}

HermezClient connect to Ethereum node and Hermez Coordinator and Smart Contracts

func NewHermezClient

func NewHermezClient(nodeURL string, auctionContractAddressHex string, ethereumChainID int) (hezClient HermezClient, err error)

func NewHermezClientFromEnv added in v0.1.6

func NewHermezClientFromEnv() (HermezClient, error)

func (*HermezClient) SetCurrentCoordinator added in v0.1.4

func (hezClient *HermezClient) SetCurrentCoordinator(URL string)

SetCurrentCoordinator updates coordinator definitions based on current coordinator URL

Jump to

Keyboard shortcuts

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