construction

package
v0.0.0-...-46a0b90 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TokenContractAddressKey is the key in the currency metadata map
	// that represents the contract address of a token
	TokenContractAddressKey = "token_address"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIService

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

APIService implements the server.ConstructionAPIServicer interface.

func NewAPIService

func NewAPIService(
	cfg *configuration.Configuration,
	client Client,
) *APIService

NewAPIService creates a new instance of a APIService.

func (*APIService) ConstructionCombine

ConstructionCombine implements the /construction/combine endpoint.

func (*APIService) ConstructionDerive

ConstructionDerive implements the /construction/derive endpoint.

func (*APIService) ConstructionHash

ConstructionHash implements the /construction/hash endpoint.

func (*APIService) ConstructionMetadata

ConstructionMetadata implements the /construction/metadata endpoint.

func (*APIService) ConstructionParse

ConstructionParse implements the /construction/parse endpoint.

func (*APIService) ConstructionPayloads

ConstructionPayloads implements the /construction/payloads endpoint.

func (*APIService) ConstructionPreprocess

ConstructionPreprocess implements the /construction/preprocess endpoint.

func (*APIService) ConstructionSubmit

ConstructionSubmit implements the /construction/submit endpoint.

type Client

type Client interface {
	Status(context.Context) (
		*types.BlockIdentifier,
		int64,
		*types.SyncStatus,
		[]*types.Peer,
		error,
	)

	Block(
		context.Context,
		*types.PartialBlockIdentifier,
	) (*types.Block, error)

	Balance(
		context.Context,
		*types.AccountIdentifier,
		*types.PartialBlockIdentifier,
		[]*types.Currency,
	) (*types.AccountBalanceResponse, error)

	PendingNonceAt(context.Context, common.Address) (uint64, error)

	EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)

	BlockHeader(ctx context.Context, number *big.Int) (*ethTypes.Header, error)

	SendTransaction(ctx context.Context, tx *ethTypes.Transaction) error

	SuggestGasTipCap(ctx context.Context) (*big.Int, error)

	Call(
		ctx context.Context,
		request *types.CallRequest,
	) (*types.CallResponse, error)
}

Client is used by the servicers to get block data and to submit transactions.

Jump to

Keyboard shortcuts

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