client_base

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mainnet = iota
	Testnet
	Devnet
)
View Source
const (
	Http = iota
	WebSocket
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientBase

type ClientBase struct {
	EthClient *ethclient.Client
	Config    NetConfig
}

func NewClientBase

func NewClientBase(config NetConfig, communicationProtocol CommunicationProtocol) (*ClientBase, error)

func (*ClientBase) CreateNewTransactOpts

func (ClientBase *ClientBase) CreateNewTransactOpts(transactor *Transactor) (*bind.TransactOpts, error)

func (*ClientBase) NewTransactor

func (ClientBase *ClientBase) NewTransactor(privateKeyStr string) (*Transactor, error)

type CommunicationProtocol

type CommunicationProtocol uint8

type NetConfig

type NetConfig struct {
	HttpUrl         string         `json:"http_url"`
	WsUrl           string         `json:"ws_url"`
	ChainID         *big.Int       `json:"chain_id"`
	ContractAddress common.Address `json:"contract_address"`
}

type Network

type Network uint8

type Transactor

type Transactor struct {
	TransactOpts *bind.TransactOpts
	Address      common.Address
	Nonce        uint64
}

Jump to

Keyboard shortcuts

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