gasstation

package
v1.6.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDAO added in v0.11.0

type BlockDAO interface {
	GetBlockHash(uint64) (hash.Hash256, error)
	GetBlockByHeight(uint64) (*block.Block, error)
}

BlockDAO represents the block data access object

type GasStation

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

GasStation provide gas related api

func NewGasStation

func NewGasStation(bc blockchain.Blockchain, simulator SimulateFunc, dao BlockDAO, cfg config.API) *GasStation

NewGasStation creates a new gas station

func (*GasStation) EstimateGasForAction

func (gs *GasStation) EstimateGasForAction(actPb *iotextypes.Action) (uint64, error)

EstimateGasForAction estimate gas for action

func (*GasStation) IsSystemAction added in v0.7.1

func (gs *GasStation) IsSystemAction(act action.SealedEnvelope) bool

IsSystemAction determine whether input action belongs to system action

func (*GasStation) SuggestGasPrice

func (gs *GasStation) SuggestGasPrice() (uint64, error)

SuggestGasPrice suggest gas price

type SimulateFunc added in v0.11.0

SimulateFunc is function that simulate execution

Jump to

Keyboard shortcuts

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