service

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 15 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONAccount added in v0.3.6

type JSONAccount struct {
	Address string            `json:"address"`
	Balance *big.Int          `json:"balance"`
	Nonce   uint64            `json:"nonce"`
	Storage map[string]string `json:"storage,omitempty"`
	Code    string            `json:"bytecode,omitempty"`
}

JSONAccount is the JSON structure used for the account endpoint

type JSONCallRes added in v0.3.6

type JSONCallRes struct {
	Data string `json:"data"`
}

JSONCallRes is the JSON structure for the return from the call endpoint

type JSONContract added in v0.3.6

type JSONContract struct {
	Address common.Address `json:"address"`
	ABI     string         `json:"abi"`
}

JSONContract is the JSON structure returned by the poa endpoint

type JSONTxRes added in v0.3.6

type JSONTxRes struct {
	TxHash string `json:"txHash"`
}

JSONTxRes has been replaced by JSONReceipt

type SendTxArgs

type SendTxArgs struct {
	From     common.Address  `json:"from"`
	To       *common.Address `json:"to"`
	Gas      uint64          `json:"gas"`
	GasPrice *big.Int        `json:"gasPrice"`
	Value    *big.Int        `json:"value"`
	Data     string          `json:"data"`
	Nonce    *uint64         `json:"nonce"`
}

SendTxArgs represents the arguments to sumbit a new transaction into the transaction pool.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service controls the EVM-Lite endpoints

func NewService

func NewService(apiAddr string,
	state *state.State,
	submitCh chan []byte,
	minGasPrice *big.Int,
	logger *logrus.Entry) *Service

NewService is a factory method that returns a new instance of Service

func (*Service) GetSubmitCh

func (m *Service) GetSubmitCh() chan []byte

GetSubmitCh returns the submit channel

func (*Service) Run

func (m *Service) Run()

Run starts the Service serving

func (*Service) SetInfoCallback

func (m *Service) SetInfoCallback(f infoCallback)

SetInfoCallback the info callback. This is used to call the babble stats endpoint to populate the info endpoint

Jump to

Keyboard shortcuts

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