Documentation ¶
Index ¶
- Constants
- func Erc20Ops(transferLog *EthTypes.Log, currency *evmClient.ContractCurrency, opsLen int64) []*RosettaTypes.Operation
- func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation
- func NewBlockchainRouter(config *configuration.Configuration, types *AssetTypes.Types, ...) http.Handler
- func TraceOps(calls []*evmClient.FlatCall, startIndex int) []*RosettaTypes.Operation
- func TransferOps(tx *evmClient.LoadedTransaction, startIndex int) []*RosettaTypes.Operation
- type AccountAPIService
- type BlockAPIService
- func (s *BlockAPIService) Block(ctx context.Context, request *RosettaTypes.BlockRequest) (*RosettaTypes.BlockResponse, *RosettaTypes.Error)
- func (s *BlockAPIService) BlockTransaction(ctx context.Context, request *RosettaTypes.BlockTransactionRequest) (*RosettaTypes.BlockTransactionResponse, *RosettaTypes.Error)
- func (s *BlockAPIService) GetBlock(ctx context.Context, blockMethod string, args ...interface{}) (*EthTypes.Block, []*client.LoadedTransaction, *client.RPCBlock, error)
- func (s *BlockAPIService) GetEthBlock(ctx context.Context, blockIdentifier *RosettaTypes.PartialBlockIdentifier) (*EthTypes.Block, []*client.LoadedTransaction, *client.RPCBlock, error)
- func (s *BlockAPIService) PopulateTransaction(ctx context.Context, tx *client.LoadedTransaction) (*RosettaTypes.Transaction, error)
- type NetworkAPIService
- func (s *NetworkAPIService) NetworkList(ctx context.Context, request *types.MetadataRequest) (*types.NetworkListResponse, *types.Error)
- func (s *NetworkAPIService) NetworkOptions(ctx context.Context, request *types.NetworkRequest) (*types.NetworkOptionsResponse, *types.Error)
- func (s *NetworkAPIService) NetworkStatus(ctx context.Context, request *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error)
Constants ¶
const ( // LRUCacheSize determines how many contract currencies we cache LRUCacheSize = 100 OpenEthereumTrace = iota // == 2 )
const ( TopicsInErc20DepositOrWithdrawal = 2 TopicsInErc20Transfer = 3 )
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 FeeOps ¶
func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation
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 ¶
func (s *AccountAPIService) AccountBalance( ctx context.Context, request *types.AccountBalanceRequest, ) (*types.AccountBalanceResponse, *types.Error)
AccountBalance implements /account/balance.
func (*AccountAPIService) AccountCoins ¶
func (s *AccountAPIService) AccountCoins( ctx context.Context, request *types.AccountCoinsRequest, ) (*types.AccountCoinsResponse, *types.Error)
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 ¶
func (s *BlockAPIService) Block( ctx context.Context, request *RosettaTypes.BlockRequest, ) (*RosettaTypes.BlockResponse, *RosettaTypes.Error)
Block implements the /block endpoint.
func (*BlockAPIService) BlockTransaction ¶
func (s *BlockAPIService) BlockTransaction( ctx context.Context, request *RosettaTypes.BlockTransactionRequest, ) (*RosettaTypes.BlockTransactionResponse, *RosettaTypes.Error)
BlockTransaction implements the /block/transaction endpoint.
func (*BlockAPIService) GetEthBlock ¶
func (s *BlockAPIService) GetEthBlock( ctx context.Context, blockIdentifier *RosettaTypes.PartialBlockIdentifier, ) (*EthTypes.Block, []*client.LoadedTransaction, *client.RPCBlock, error)
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 ¶
func (s *NetworkAPIService) NetworkList( ctx context.Context, request *types.MetadataRequest, ) (*types.NetworkListResponse, *types.Error)
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 ¶
func (s *NetworkAPIService) NetworkStatus( ctx context.Context, request *types.NetworkRequest, ) (*types.NetworkStatusResponse, *types.Error)
NetworkStatus implements the /network/status endpoint.