services

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TopicsInErc20DepositOrWithdrawal = 2
	TopicsInErc20Transfer            = 3
)
View Source
const (
	OpenEthereumTrace = iota // == 2
)

Variables

This section is empty.

Functions

func Erc20Ops

func Erc20Ops(
	transferLog *EthTypes.Log,
	currency *evmClient.ContractCurrency,
	opsLen int64,
) []*RosettaTypes.Operation

Erc20Ops returns a list of erc20 operations parsed from the log from a transaction receipt

func NewBlockchainRouter

func NewBlockchainRouter(
	config *configuration.Configuration,
	types *AssetTypes.Types,
	errors []*types.Error,
	client construction.Client,

	asserter *asserter.Asserter,
) http.Handler

NewBlockchainRouter creates a Mux http.Handler from a collection of server controllers.

func TraceOps

func TraceOps(
	calls []*evmClient.FlatCall,
	startIndex int,
) []*RosettaTypes.Operation

TraceOps returns all *RosettaTypes.Operation for a given array of flattened traces. nolint:gocognit

func TransferOps added in v0.0.5

func TransferOps(tx *evmClient.LoadedTransaction, startIndex int) []*RosettaTypes.Operation

Types

type AccountAPIService

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

AccountAPIService implements the server.AccountAPIServicer interface.

func NewAccountAPIService

func NewAccountAPIService(
	cfg *configuration.Configuration,
	types *AssetTypes.Types,
	errors []*types.Error,
	client construction.Client,
) *AccountAPIService

NewAccountAPIService returns a new *AccountAPIService.

func (*AccountAPIService) AccountBalance

AccountBalance implements /account/balance.

func (*AccountAPIService) AccountCoins

AccountCoins implements /account/coins.

type BlockAPIService

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

BlockAPIService implements the server.BlockAPIServicer interface.

func NewBlockAPIService

func NewBlockAPIService(
	cfg *configuration.Configuration,
	client construction.Client,
) *BlockAPIService

NewBlockAPIService creates a new instance of a BlockAPIService.

func (*BlockAPIService) Block

Block implements the /block endpoint.

func (*BlockAPIService) BlockTransaction

BlockTransaction implements the /block/transaction endpoint.

func (*BlockAPIService) GetBlock

func (s *BlockAPIService) GetBlock(
	ctx context.Context,
	blockMethod string,
	args ...interface{},
) (
	*EthTypes.Block,
	[]*client.LoadedTransaction,
	*client.RPCBlock,
	error,
)

func (*BlockAPIService) GetEthBlock

GetEthBlock returns a populated block at the *RosettaTypes.PartialBlockIdentifier. If neither the hash or index is populated in the *RosettaTypes.PartialBlockIdentifier, the current block is returned.

func (*BlockAPIService) PopulateTransaction

func (s *BlockAPIService) PopulateTransaction(
	ctx context.Context,
	tx *client.LoadedTransaction,
) (*RosettaTypes.Transaction, error)

type NetworkAPIService

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

NetworkAPIService implements the server.NetworkAPIServicer interface.

func NewNetworkAPIService

func NewNetworkAPIService(
	cfg *configuration.Configuration,
	types *AssetTypes.Types,
	errors []*types.Error,
	client construction.Client,
) *NetworkAPIService

NewNetworkAPIService creates a new instance of a NetworkAPIService.

func (*NetworkAPIService) NetworkList

NetworkList implements the /network/list endpoint

func (*NetworkAPIService) NetworkOptions

func (s *NetworkAPIService) NetworkOptions(
	ctx context.Context,
	request *types.NetworkRequest,
) (*types.NetworkOptionsResponse, *types.Error)

NetworkOptions implements the /network/options endpoint.

func (*NetworkAPIService) NetworkStatus

NetworkStatus implements the /network/status endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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